diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2016-01-12 10:40:53 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2016-01-12 10:40:53 +0000 |
commit | f34c562adf43b9df9206464be7aafa2f0ec231df (patch) | |
tree | fc3e364a557091480c989adca26342645a92d85f /src | |
parent | cf3da0b32afc1f17b3805858d68d7b2718deff45 (diff) | |
download | s6-linux-utils-f34c562adf43b9df9206464be7aafa2f0ec231df.tar.gz s6-linux-utils-f34c562adf43b9df9206464be7aafa2f0ec231df.tar.xz s6-linux-utils-f34c562adf43b9df9206464be7aafa2f0ec231df.zip |
s6-mount: exit 1, not 111, on EBUSY (already mounted)
Diffstat (limited to 'src')
-rw-r--r-- | src/minutils/s6-mount.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/minutils/s6-mount.c b/src/minutils/s6-mount.c index 318a4a0..b6ac674 100644 --- a/src/minutils/s6-mount.c +++ b/src/minutils/s6-mount.c @@ -1,5 +1,6 @@ /* ISC license. */ +#include <errno.h> #include <sys/mount.h> #include <mntent.h> #include <stdio.h> @@ -124,6 +125,6 @@ int main (int argc, char const *const *argv) else if (argc == 1) strerr_dieusage(100, USAGE) ; else if (!stralloc_0(&data)) strerr_diefu1sys(111, "build data string") ; else if (mount(argv[0], argv[1], fstype, flags, data.s) == -1) - strerr_diefu4sys(111, "mount ", argv[0], " on ", argv[1]) ; + strerr_diefu4sys(errno == EBUSY ? 1 : 111, "mount ", argv[0], " on ", argv[1]) ; return 0 ; } |