diff options
author | Geoff Levand <geoffrey.levand@am.sony.com> | 2009-02-15 22:57:13 -0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2009-02-21 14:33:58 +1100 |
commit | 03f8fa62281b250f2b832a58d49d1b85fadc3338 (patch) | |
tree | 35e6b5eee5e4a47e8cd8730aa7e06cb1ce73f79a /ui/common | |
parent | d7196a1972f05a17abf979fe71231ccf94e13976 (diff) | |
download | talos-petitboot-03f8fa62281b250f2b832a58d49d1b85fadc3338.tar.gz talos-petitboot-03f8fa62281b250f2b832a58d49d1b85fadc3338.zip |
Pass cb_arg to discover_client_init
Pass the client cb_arg to discover_client_init() and have it
initialize the structure member.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'ui/common')
-rw-r--r-- | ui/common/discover-client.c | 3 | ||||
-rw-r--r-- | ui/common/discover-client.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/ui/common/discover-client.c b/ui/common/discover-client.c index 8672ae0..6b991b1 100644 --- a/ui/common/discover-client.c +++ b/ui/common/discover-client.c @@ -33,7 +33,7 @@ static int discover_client_destructor(void *arg) } struct discover_client* discover_client_init( - const struct discover_client_ops *ops) + const struct discover_client_ops *ops, void *cb_arg) { struct discover_client *client; struct sockaddr_un addr; @@ -43,6 +43,7 @@ struct discover_client* discover_client_init( return NULL; memcpy(&client->ops, ops, sizeof(client->ops)); + client->ops.cb_arg = cb_arg; client->fd = socket(AF_UNIX, SOCK_STREAM, 0); if (!client->fd < 0) { diff --git a/ui/common/discover-client.h b/ui/common/discover-client.h index 719f72a..fdcf930 100644 --- a/ui/common/discover-client.h +++ b/ui/common/discover-client.h @@ -19,7 +19,7 @@ struct discover_client_ops { }; struct discover_client *discover_client_init( - const struct discover_client_ops *ops); + const struct discover_client_ops *ops, void *cb_arg); int discover_client_get_fd(const struct discover_client *client); |