]> git.ozlabs.org Git - petitboot/blobdiff - discover/udev.c
Increase protocol payload size to 64KiB
[petitboot] / discover / udev.c
index 16d050e7702aae28de901f7ed969494804c3d129..b93c1a5f0ff6d68dace1c0cf8605c528dd11f3c2 100644 (file)
 #include <sys/un.h>
 
 #include <talloc/talloc.h>
+#include <waiter/waiter.h>
+#include <log/log.h>
 
 #include "udev.h"
-#include "log.h"
-#include "waiter.h"
 #include "pb-discover.h"
 #include "device-handler.h"
 
@@ -60,7 +60,7 @@ static void parse_event_params(struct udev_event *event, char *buf, int len)
        }
 }
 
-static const char *event_param(struct udev_event *event, const char *name)
+const char *udev_event_param(struct udev_event *event, const char *name)
 {
        int i;
 
@@ -82,11 +82,11 @@ static void print_event(struct udev_event *event)
        action = event->action == UDEV_ACTION_ADD ? "add" : "remove";
 
        pb_log("udev %s event:\n", action);
-       printf("\tdevice: %s\n", event->device);
+       pb_log("\tdevice: %s\n", event->device);
 
        for (i = 0; params[i]; i++)
-               printf("\t%-12s => %s\n",
-                               params[i], event_param(event, params[i]));
+               pb_log("\t%-12s => %s\n",
+                               params[i], udev_event_param(event, params[i]));
 
 }