]> git.ozlabs.org Git - petitboot/blobdiff - discover/device-handler.c
Make device instance constant
[petitboot] / discover / device-handler.c
index c7e0227f242529d0673c22655c4064a5daf8e930..8a4930e1efd565d8487f88875b26774adddcc882 100644 (file)
@@ -8,13 +8,13 @@
 
 #include <talloc/talloc.h>
 #include <list/list.h>
+#include <log/log.h>
 #include <pb-protocol/pb-protocol.h>
 
 #include "device-handler.h"
 #include "discover-server.h"
 #include "parser.h"
 #include "udev.h"
-#include "log.h"
 #include "paths.h"
 
 #define MOUNT_BIN "/bin/mount"
@@ -53,8 +53,9 @@ static struct device device = {
        .icon_file = "meep.png",
 };
 
-int device_handler_get_current_devices(struct device_handler *handler,
-               struct device **devices)
+int device_handler_get_current_devices(
+               struct device_handler *handler __attribute__((unused)),
+               const struct device **devices)
 
 {
        *devices = &device;
@@ -377,7 +378,7 @@ int device_handler_event(struct device_handler *handler,
 struct device_handler *device_handler_init(struct discover_server *server)
 {
        struct device_handler *handler;
-       int i;
+       unsigned int i;
 
        handler = talloc(NULL, struct device_handler);
        handler->devices = NULL;