Refresh linux-have-mntent
This commit is contained in:
parent
9baaa468ac
commit
9c1b2c3446
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,
|
|
||||||
README, and GIT files.
|
|
||||||
|
|
||||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||||
|
|
|
@ -566,7 +566,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);
|
||||||
|
@ -585,7 +589,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