summaryrefslogtreecommitdiff
path: root/lib/misc/lvm-exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/misc/lvm-exec.c')
-rw-r--r--lib/misc/lvm-exec.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/misc/lvm-exec.c b/lib/misc/lvm-exec.c
index 273e7f90c..e4145242b 100644
--- a/lib/misc/lvm-exec.c
+++ b/lib/misc/lvm-exec.c
@@ -62,8 +62,11 @@ int exec_cmd(struct cmd_context *cmd, const char *const argv[],
*rstatus = -1;
if (sync_needed)
- if (!sync_local_dev_names(cmd)) /* Flush ops and reset dm cookie */
- return_0;
+ /* Flush ops and reset dm cookie */
+ if (!sync_local_dev_names(cmd)) {
+ log_error("Failed to sync local device names before forking.");
+ return 0;
+ }
log_verbose("Executing:%s", _verbose_args(argv, buf, sizeof(buf)));
@@ -148,8 +151,11 @@ FILE *pipe_open(struct cmd_context *cmd, const char *const argv[],
char buf[PATH_MAX * 2];
if (sync_needed)
- if (!sync_local_dev_names(cmd)) /* Flush ops and reset dm cookie */
- return_0;
+ /* Flush ops and reset dm cookie */
+ if (!sync_local_dev_names(cmd)) {
+ log_error("Failed to sync local device names before forking.");
+ return 0;
+ }
if (pipe(pipefd)) {
log_sys_error("pipe", "");