diff options
author | Karel Zak | 2018-02-01 15:44:25 +0100 |
---|---|---|
committer | Karel Zak | 2018-02-01 15:44:25 +0100 |
commit | fd777151bf71eb8e2238a24e20efa8ce132e74e9 (patch) | |
tree | 1ae3e4645354823e93c6ef4d9c67aac3c2f40ce1 /sys-utils/swapon.c | |
parent | vipw: use errexec() (diff) | |
download | kernel-qcow2-util-linux-fd777151bf71eb8e2238a24e20efa8ce132e74e9.tar.gz kernel-qcow2-util-linux-fd777151bf71eb8e2238a24e20efa8ce132e74e9.tar.xz kernel-qcow2-util-linux-fd777151bf71eb8e2238a24e20efa8ce132e74e9.zip |
sys-utils: use errexec()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/swapon.c')
-rw-r--r-- | sys-utils/swapon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c index 13437f771..757601ae6 100644 --- a/sys-utils/swapon.c +++ b/sys-utils/swapon.c @@ -341,7 +341,7 @@ static int swap_reinitialize(struct swap_device *dev) cmd[idx++] = dev->path; cmd[idx++] = NULL; execvp(cmd[0], (char * const *) cmd); - err(EXIT_FAILURE, _("failed to execute %s"), cmd[0]); + errexec(cmd[0]); default: /* parent */ do { @@ -353,7 +353,7 @@ static int swap_reinitialize(struct swap_device *dev) return -1; } - /* mkswap returns: 0=suss, 1=error */ + /* mkswap returns: 0=suss, >0 error */ if (WIFEXITED(status) && WEXITSTATUS(status)==0) return 0; /* ok */ break; |