X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fdevice-handler.c;h=0d4349671dfa6c375f223cde0f43877c41ddad71;hp=9589bb20d16c0e8ac57f390138aafca4ccd0b2be;hb=1b0b59295d0500764c5096753f7cd11bf3ab5df4;hpb=59caf989e5e20f4a1238f23e512a586d5ba67de1 diff --git a/discover/device-handler.c b/discover/device-handler.c index 9589bb2..0d43496 100644 --- a/discover/device-handler.c +++ b/discover/device-handler.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include "device-handler.h" @@ -20,10 +20,6 @@ #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); }