summaryrefslogtreecommitdiffstats
path: root/sys-utils/swapon.c
diff options
context:
space:
mode:
authorKarel Zak2018-02-01 15:44:25 +0100
committerKarel Zak2018-02-01 15:44:25 +0100
commitfd777151bf71eb8e2238a24e20efa8ce132e74e9 (patch)
tree1ae3e4645354823e93c6ef4d9c67aac3c2f40ce1 /sys-utils/swapon.c
parentvipw: use errexec() (diff)
downloadkernel-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.c4
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;