diff options
author | Brian Behlendorf <[email protected]> | 2010-08-26 11:57:29 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-08-31 13:42:01 -0700 |
commit | 9b020fd97a3dc449a94baec028b30b1fe3c2d5bc (patch) | |
tree | 63adfe1e69722f283a5115ff431abb550f691bed /lib/libzfs | |
parent | d603ed6c278f9c25b17ba8e75e9bce6e5d715ac0 (diff) |
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 <[email protected]>
Diffstat (limited to 'lib/libzfs')
-rw-r--r-- | lib/libzfs/libzfs_sendrecv.c | 5 | ||||
-rw-r--r-- | lib/libzfs/libzfs_util.c | 7 |
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); } |