diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/common/discover-client.c | 5 | ||||
-rw-r--r-- | ui/common/discover-client.h | 9 | ||||
-rw-r--r-- | ui/test/pb-test.c | 5 |
3 files changed, 11 insertions, 8 deletions
diff --git a/ui/common/discover-client.c b/ui/common/discover-client.c index 112fa65..d30498c 100644 --- a/ui/common/discover-client.c +++ b/ui/common/discover-client.c @@ -30,7 +30,8 @@ static int discover_client_destructor(void *arg) return 0; } -struct discover_client* discover_client_init(struct discover_client_ops *ops) +struct discover_client* discover_client_init( + const struct discover_client_ops *ops) { struct discover_client *client; struct sockaddr_un addr; @@ -64,7 +65,7 @@ out_err: return NULL; } -int discover_client_get_fd(struct discover_client *client) +int discover_client_get_fd(const struct discover_client *client) { return client->fd; } diff --git a/ui/common/discover-client.h b/ui/common/discover-client.h index bc2294a..132da02 100644 --- a/ui/common/discover-client.h +++ b/ui/common/discover-client.h @@ -13,14 +13,15 @@ struct discover_client; */ struct discover_client_ops { - int (*add_device)(struct device *device, void *arg); - void (*remove_device)(char *dev_id, void *arg); + int (*add_device)(const struct device *device, void *arg); + void (*remove_device)(const char *dev_id, void *arg); void *cb_arg; }; -struct discover_client *discover_client_init(struct discover_client_ops *ops); +struct discover_client *discover_client_init( + const struct discover_client_ops *ops); -int discover_client_get_fd(struct discover_client *client); +int discover_client_get_fd(const struct discover_client *client); void discover_client_destroy(struct discover_client *client); diff --git a/ui/test/pb-test.c b/ui/test/pb-test.c index b6ff627..551c9b0 100644 --- a/ui/test/pb-test.c +++ b/ui/test/pb-test.c @@ -3,7 +3,7 @@ #include "ui/common/discover-client.h" -static int print_device_add(struct device *device, +static int print_device_add(const struct device *device, void __attribute__((unused)) *arg) { struct boot_option *opt; @@ -28,7 +28,8 @@ static int print_device_add(struct device *device, return 0; } -static void print_device_remove(char *dev_id, void __attribute__((unused)) *arg) +static void print_device_remove(const char *dev_id, + void __attribute__((unused)) *arg) { printf("removed device:\n"); printf("\tid: %s\n", dev_id); |