summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libspl/include/sys/mntent.h1
-rw-r--r--lib/libzfs/libzfs_mount.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/libspl/include/sys/mntent.h b/lib/libspl/include/sys/mntent.h
index 8fad65b56..736c3f866 100644
--- a/lib/libspl/include/sys/mntent.h
+++ b/lib/libspl/include/sys/mntent.h
@@ -39,6 +39,7 @@
#define MOUNT_FILEIO 0x10 /* Error updating/locking /etc/mtab */
#define MOUNT_FAIL 0x20 /* Mount failed */
#define MOUNT_SOMEOK 0x40 /* At least on mount succeeded */
+#define MOUNT_BUSY 0x80 /* Mount failed due to EBUSY */
#define MNTOPT_ASYNC "async" /* all I/O is asynchronous */
#define MNTOPT_ATIME "atime" /* update atime for files */
diff --git a/lib/libzfs/libzfs_mount.c b/lib/libzfs/libzfs_mount.c
index bded1f001..68e4ef4de 100644
--- a/lib/libzfs/libzfs_mount.c
+++ b/lib/libzfs/libzfs_mount.c
@@ -292,6 +292,8 @@ do_mount(const char *src, const char *mntpt, char *opts)
return EINTR;
if (rc & MOUNT_SOFTWARE)
return EPIPE;
+ if (rc & MOUNT_BUSY)
+ return EBUSY;
if (rc & MOUNT_SYSERR)
return EAGAIN;
if (rc & MOUNT_USAGE)