From f34c562adf43b9df9206464be7aafa2f0ec231df Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 12 Jan 2016 10:40:53 +0000 Subject: s6-mount: exit 1, not 111, on EBUSY (already mounted) --- src/minutils/s6-mount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/minutils') 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 #include #include #include @@ -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 ; } -- cgit v1.2.3