]> git.ozlabs.org Git - petitboot/blobdiff - discover/device-handler.c
discover: Remove {U,}MOUNT_BIN defines
[petitboot] / discover / device-handler.c
index 9589bb20d16c0e8ac57f390138aafca4ccd0b2be..bda724cc3badcf1ea46e6d92520b7e3c71411644 100644 (file)
 #include "udev.h"
 #include "paths.h"
 
 #include "udev.h"
 #include "paths.h"
 
-#define MOUNT_BIN "/bin/mount"
-
-#define UMOUNT_BIN "/bin/umount"
-
 struct device_handler {
        struct discover_server *server;
 
 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));
 
                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";
        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. */
 
 
                /* 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;
                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) {
        }
 
        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);
        }
 
                exit(EXIT_FAILURE);
        }