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 <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf
2010-08-26 11:57:29 -07:00
parent d603ed6c27
commit 9b020fd97a
6 changed files with 41 additions and 36 deletions
+5
View File
@@ -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>
+7
View File
@@ -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);
}