aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs/libzfs_sendrecv.c5
-rw-r--r--lib/libzfs/libzfs_util.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c
index 40d1d2e53..94e64e63f 100644
--- a/lib/libzfs/libzfs_sendrecv.c
+++ b/lib/libzfs/libzfs_sendrecv.c
@@ -34,6 +34,11 @@
#include <stddef.h>
#include <fcntl.h>
#include <sys/mount.h>
+#include <sys/mntent.h>
+#include <sys/mnttab.h>
+#include <sys/avl.h>
+#include <sys/debug.h>
+#include <stddef.h>
#include <pthread.h>
#include <umem.h>
diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c
index 71f81831b..3c4fae5aa 100644
--- a/lib/libzfs/libzfs_util.c
+++ b/lib/libzfs/libzfs_util.c
@@ -614,6 +614,13 @@ libzfs_init(void)
}
if ((hdl->libzfs_fd = open(ZFS_DEV, O_RDWR)) < 0) {
+ (void) fprintf(stderr, gettext("Unable to open %s: %s.\n"),
+ ZFS_DEV, strerror(errno));
+ if (errno == ENOENT)
+ (void) fprintf(stderr,
+ gettext("Verify the ZFS module stack is "
+ "loaded by running '/sbin/modprobe zfs'.\n"));
+
free(hdl);
return (NULL);
}