From 9b020fd97a3dc449a94baec028b30b1fe3c2d5bc Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 26 Aug 2010 11:57:29 -0700 Subject: Add linux user util support This topic branch contains required changes to the user space utilities to allow them to integrate cleanly with Linux. Signed-off-by: Brian Behlendorf --- lib/libzfs/libzfs_sendrecv.c | 5 +++++ lib/libzfs/libzfs_util.c | 7 +++++++ 2 files changed, 12 insertions(+) (limited to 'lib') 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 #include #include +#include +#include +#include +#include +#include #include #include 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); } -- cgit v1.2.3