Merge commit 'refs/remotes/origin/linux-have-mntent' into HEAD
This commit is contained in:
commit
a799d209d3
17
.topmsg
17
.topmsg
|
@ -1,19 +1,6 @@
|
||||||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||||
Subject: [PATCH] zfs branch
|
Subject: [PATCH] linux have mntent
|
||||||
|
|
||||||
Merged result of all changes which are relevant to both Solaris
|
Use mount entry if HAVE_SETMNTENT defined
|
||||||
and Linux builds of the ZFS code. These are changes where there
|
|
||||||
is a reasonable chance they will be accepted upstream.
|
|
||||||
|
|
||||||
Additionally, since this is effectively the root of the linux
|
|
||||||
ZFS tree the core linux build system is added here. This
|
|
||||||
includes autogen.sh, configure.ac, m4 macros, some scripts/*,
|
|
||||||
and makefiles for all the core ZFS components. Linux-only
|
|
||||||
features which require tweaks to the build system should appear
|
|
||||||
on the relevant topic branches. All autotools products which
|
|
||||||
result from autogen.sh are commited to the linux-configure-branch.
|
|
||||||
|
|
||||||
This branch also contains the META, ChangeLog, AUTHORS, TODO,
|
|
||||||
and README, files.
|
|
||||||
|
|
||||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||||
|
|
|
@ -564,7 +564,11 @@ libzfs_init(void)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_SETMNTENT
|
||||||
|
if ((hdl->libzfs_mnttab = setmntent(MNTTAB, "r")) == NULL) {
|
||||||
|
#else
|
||||||
if ((hdl->libzfs_mnttab = fopen(MNTTAB, "r")) == NULL) {
|
if ((hdl->libzfs_mnttab = fopen(MNTTAB, "r")) == NULL) {
|
||||||
|
#endif
|
||||||
(void) close(hdl->libzfs_fd);
|
(void) close(hdl->libzfs_fd);
|
||||||
free(hdl);
|
free(hdl);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
@ -583,7 +587,11 @@ libzfs_fini(libzfs_handle_t *hdl)
|
||||||
{
|
{
|
||||||
(void) close(hdl->libzfs_fd);
|
(void) close(hdl->libzfs_fd);
|
||||||
if (hdl->libzfs_mnttab)
|
if (hdl->libzfs_mnttab)
|
||||||
|
#ifdef HAVE_SETMNTENT
|
||||||
|
(void) endmntent(hdl->libzfs_mnttab);
|
||||||
|
#else
|
||||||
(void) fclose(hdl->libzfs_mnttab);
|
(void) fclose(hdl->libzfs_mnttab);
|
||||||
|
#endif
|
||||||
if (hdl->libzfs_sharetab)
|
if (hdl->libzfs_sharetab)
|
||||||
(void) fclose(hdl->libzfs_sharetab);
|
(void) fclose(hdl->libzfs_sharetab);
|
||||||
zfs_uninit_libshare(hdl);
|
zfs_uninit_libshare(hdl);
|
||||||
|
|
Loading…
Reference in New Issue