Merge branch 'linux-have-sysevent' into refs/top-bases/linux-zfs-branch
This commit is contained in:
commit
6ca96b06b4
|
@ -2330,7 +2330,7 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
kernel_init(FREAD);
|
kernel_init(FREAD);
|
||||||
g_zfs = libzfs_init();
|
g_zfs = libzfs_init();
|
||||||
ASSERT(g_zfs != NULL);
|
VERIFY(g_zfs != NULL);
|
||||||
|
|
||||||
for (c = 0; c < 256; c++) {
|
for (c = 0; c < 256; c++) {
|
||||||
if (dump_all && c != 'l' && c != 'R')
|
if (dump_all && c != 'l' && c != 'R')
|
||||||
|
|
|
@ -560,17 +560,11 @@ libzfs_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((hdl->libzfs_fd = open(ZFS_DEV, O_RDWR)) < 0) {
|
if ((hdl->libzfs_fd = open(ZFS_DEV, O_RDWR)) < 0) {
|
||||||
/* XXX: Allow this failure on linux systems for now. It
|
(void) fprintf(stderr, "Unable to open %s: (%d) %s\n",
|
||||||
* occurs when we attempt to open the /dev/zfs without the
|
ZFS_DEV, errno, strerror(errno));
|
||||||
* ZFS module stack loaded. This is normally a problem but
|
|
||||||
* tools such as zdb call this function and never use the
|
|
||||||
* ioctl() interface. Long term this should be cleaned up.
|
|
||||||
*/
|
|
||||||
if (errno != ENXIO) {
|
|
||||||
free(hdl);
|
free(hdl);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_SETMNTENT
|
#ifdef HAVE_SETMNTENT
|
||||||
if ((hdl->libzfs_mnttab = setmntent(MNTTAB, "r")) == NULL) {
|
if ((hdl->libzfs_mnttab = setmntent(MNTTAB, "r")) == NULL) {
|
||||||
|
@ -593,7 +587,6 @@ libzfs_init(void)
|
||||||
void
|
void
|
||||||
libzfs_fini(libzfs_handle_t *hdl)
|
libzfs_fini(libzfs_handle_t *hdl)
|
||||||
{
|
{
|
||||||
if (hdl->libzfs_fd != -1)
|
|
||||||
(void) close(hdl->libzfs_fd);
|
(void) close(hdl->libzfs_fd);
|
||||||
if (hdl->libzfs_mnttab)
|
if (hdl->libzfs_mnttab)
|
||||||
#ifdef HAVE_SETMNTENT
|
#ifdef HAVE_SETMNTENT
|
||||||
|
|
Loading…
Reference in New Issue