diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2022-01-04 23:17:29 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2022-01-11 18:52:54 +0100 |
commit | 8a0ba3b13152e162c968faf5002c13c11ac58b74 (patch) | |
tree | 3ad8c2e1d0ea458906e2c8225fba9fd89523f59e /libfstools/extroot.c | |
parent | 128ecaf8da9887b3a1fe35ed95d352a9b64b6342 (diff) | |
download | fstools-8a0ba3b13152e162c968faf5002c13c11ac58b74.tar.gz |
libfstools: get rid of "extroot_prefix" global variable
Replace it with mount_extroot() argument. It's cleaner than a global
var.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'libfstools/extroot.c')
-rw-r--r-- | libfstools/extroot.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libfstools/extroot.c b/libfstools/extroot.c index 418df94..7cc0b19 100644 --- a/libfstools/extroot.c +++ b/libfstools/extroot.c @@ -23,13 +23,11 @@ #include "libfstools.h" -char const *extroot_prefix = NULL; - /* * This will execute "block extroot" and make use of mounted extroot or return * an error. */ -int mount_extroot(void) +int mount_extroot(char const *extroot_prefix) { char ldlib_path[32]; char block_path[32]; @@ -37,9 +35,6 @@ int mount_extroot(void) struct stat s; pid_t pid; - if (!extroot_prefix) - return -1; - /* try finding the library directory */ snprintf(ldlib_path, sizeof(ldlib_path), "%s/upper/lib", extroot_prefix); |