Fix random bytes in string in kboot parser
[petitboot] / devices.c
index 43a388dfbecd832da7098eea799bf285802838b7..e4d6913875b6025f7f6a22ec685e861cb766c744 100644 (file)
--- a/devices.c
+++ b/devices.c
@@ -13,7 +13,7 @@
 #include "petitboot-paths.h"
 #include "devices/message.h"
 
-#define PBOOT_DEFAULT_ICON     "usbpen.png"
+#define PBOOT_DEFAULT_ICON     "tux.png"
 
 static const char *default_icon = artwork_pathname(PBOOT_DEFAULT_ICON);
 
@@ -238,7 +238,7 @@ static twin_bool_t pboot_proc_server_sock(int sock, twin_file_op_t ops,
        return TWIN_TRUE;
 }
 
-int pboot_start_device_discovery(void)
+int pboot_start_device_discovery(int udev_trigger)
 {
        int sock;
        struct sockaddr_un addr;
@@ -269,6 +269,12 @@ int pboot_start_device_discovery(void)
 
        twin_set_file(pboot_proc_server_sock, sock, TWIN_READ, &_ctx);
 
+       if (udev_trigger) {
+               int rc = system("udevtrigger");
+               if (rc)
+                       LOG("udevtrigger failed, rc %d\n", rc);
+       }
+
        return TWIN_TRUE;
 }