]> git.ozlabs.org Git - petitboot/blobdiff - discover/device-handler.c
ui: callback & boot actions: kexec -> boot
[petitboot] / discover / device-handler.c
index 9589bb20d16c0e8ac57f390138aafca4ccd0b2be..0d4349671dfa6c375f223cde0f43877c41ddad71 100644 (file)
@@ -10,7 +10,7 @@
 #include <talloc/talloc.h>
 #include <list/list.h>
 #include <log/log.h>
-#include <pb-protocol/pb-protocol.h>
+#include <types/types.h>
 #include <system/system.h>
 
 #include "device-handler.h"
 #include "udev.h"
 #include "paths.h"
 
-#define MOUNT_BIN "/bin/mount"
-
-#define UMOUNT_BIN "/bin/umount"
-
 struct device_handler {
        struct discover_server *server;
 
@@ -189,7 +185,7 @@ static int mount_device(struct discover_context *ctx)
                pb_log("couldn't create mount directory %s: %s\n",
                                ctx->mount_path, strerror(errno));
 
-       argv[0] = MOUNT_BIN;
+       argv[0] = pb_system_apps.mount;
        argv[1] = ctx->device_path;
        argv[2] = ctx->mount_path;
        argv[3] = "-o";
@@ -200,7 +196,7 @@ static int mount_device(struct discover_context *ctx)
 
                /* Retry mount without ro option. */
 
-               argv[0] = MOUNT_BIN;
+               argv[0] = pb_system_apps.mount;
                argv[1] = ctx->device_path;
                argv[2] = ctx->mount_path;
                argv[3] = NULL;
@@ -231,7 +227,8 @@ static int umount_device(struct discover_context *ctx)
        }
 
        if (pid == 0) {
-               execl(UMOUNT_BIN, UMOUNT_BIN, ctx->mount_path, NULL);
+               execl(pb_system_apps.umount, pb_system_apps.umount,
+                                               ctx->mount_path, NULL);
                exit(EXIT_FAILURE);
        }