From aff40d8515c66cc12fd4376f05e867700115304a Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Fri, 3 May 2019 19:40:02 -0700 Subject: [PATCH] libmisc/btrfs: no sense trying to calculate 'btrfs' string Signed-off-by: Serge Hallyn --- libmisc/btrfs.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libmisc/btrfs.c b/libmisc/btrfs.c index f6024bfb..cae93476 100644 --- a/libmisc/btrfs.c +++ b/libmisc/btrfs.c @@ -32,7 +32,7 @@ static int run_btrfs_subvolume_cmd(const char *subcmd, const char *arg1, const c int status = 0; const char *cmd = btrfs_cmd(); const char *argv[] = { - strrchr(cmd, '/'), + "btrfs", "subvolume", subcmd, arg1, @@ -40,11 +40,6 @@ static int run_btrfs_subvolume_cmd(const char *subcmd, const char *arg1, const c NULL }; - if (argv[0] == NULL) - argv[0] = cmd; - else - argv[0] = argv[0] + 1; - if (access(cmd, X_OK)) { return 1; }