summaryrefslogtreecommitdiff
path: root/blockd.c
diff options
context:
space:
mode:
authorMichael Heimpold <mhei@heimpold.de>2018-11-24 10:22:44 +0100
committerJohn Crispin <john@phrozen.org>2018-11-26 09:46:01 +0100
commite12c0d64a1446be30135954502a6f747b138e4e5 (patch)
tree255870c09459b39c437e6108f39f21f95d2a068c /blockd.c
parent091aa3d72dcbbfdb4795bb17e260e35a635b0bf5 (diff)
downloadfstools-e12c0d64a1446be30135954502a6f747b138e4e5.tar.gz
fstools: use EXIT_FAILURE when indicating error on exit
According to man page, using the EXIT_* macros is more portable than using plain integer values. Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Diffstat (limited to 'blockd.c')
-rw-r--r--blockd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/blockd.c b/blockd.c
index 3af5390..a5da32c 100644
--- a/blockd.c
+++ b/blockd.c
@@ -95,7 +95,7 @@ block(char *cmd, char *action, char *device)
argv[a++] = device;
execvp(argv[0], argv);
ULOG_ERR("failed to spawn %s %s %s\n", *argv, action, device);
- exit(-1);
+ exit(EXIT_FAILURE);
default:
waitpid(pid, &status, 0);
@@ -422,7 +422,7 @@ static int autofs_mount(void)
if (kproto_version != 5) {
ULOG_ERR("only kernel protocol version 5 is tested. You have %d.\n",
kproto_version);
- exit(1);
+ exit(EXIT_FAILURE);
}
if (ioctl(fd_autofs_write, AUTOFS_IOC_SETTIMEOUT, &autofs_timeout))
ULOG_ERR("failed to set autofs timeout\n");