mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Log sys errors
This commit is contained in:
parent
de3692152f
commit
bead3fc2c0
@ -1390,9 +1390,12 @@ int lvm2_main(int argc, char **argv)
|
||||
if (is_static() && strcmp(base, "lvm.static") &&
|
||||
path_exists(LVM_SHARED_PATH) &&
|
||||
!getenv("LVM_DID_EXEC")) {
|
||||
setenv("LVM_DID_EXEC", base, 1);
|
||||
execvp(LVM_SHARED_PATH, argv);
|
||||
unsetenv("LVM_DID_EXEC");
|
||||
if (setenv("LVM_DID_EXEC", base, 1))
|
||||
log_sys_error("setenv", "LVM_DID_EXEC");
|
||||
if (execvp(LVM_SHARED_PATH, argv) == -1)
|
||||
log_sys_error("execvp", "LVM_SHARED_PATH");
|
||||
if (unsetenv("LVM_DID_EXEC"))
|
||||
log_sys_error("unsetenv", "LVM_DID_EXEC");
|
||||
}
|
||||
|
||||
/* "version" command is simple enough so it doesn't need any complex init */
|
||||
|
Loading…
Reference in New Issue
Block a user