mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
libzfs: get rid of libzfs_handle::libzfs_mnttab
All users did a freopen() on it. Even some non-users did! This is point-less ‒ just open the mtab when needed If I understand Solaris' getextmntent(3C) correctly, the non-user freopen()s are very likely an odd, twisted vestigial tail of that ‒ but it's got a completely different calling convention and caching semantics than any platform we support Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #11868
This commit is contained in:
@@ -127,11 +127,7 @@ getextmntent(const char *path, struct extmnttab *entry, struct stat64 *statbuf)
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_SETMNTENT
|
||||
if ((fp = setmntent(MNTTAB, "re")) == NULL) {
|
||||
#else
|
||||
if ((fp = fopen(MNTTAB, "re")) == NULL) {
|
||||
#endif
|
||||
(void) fprintf(stderr, "cannot open %s\n", MNTTAB);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user