FreeBSD Bugzilla – Attachment 221111 Details for
Bug 251906
autofs: automounter always only adds to /var/db/mounttab but never clears it
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
attempt 2: use f_mntfromname for umount
automount-fix2.diff (text/plain), 952 bytes, created by
Robert Wing
on 2020-12-30 20:55:43 UTC
(
hide
)
Description:
attempt 2: use f_mntfromname for umount
Filename:
MIME Type:
Creator:
Robert Wing
Created:
2020-12-30 20:55:43 UTC
Size:
952 bytes
patch
obsolete
>diff --git a/usr.sbin/autofs/automount.c b/usr.sbin/autofs/automount.c >index e28129eee5b..d0247470996 100644 >--- a/usr.sbin/autofs/automount.c >+++ b/usr.sbin/autofs/automount.c >@@ -84,6 +84,23 @@ unmount_by_statfs(const struct statfs *sb, bool force) > return (error); > } > >+static int >+unmount_by_umount(struct statfs* sfp, bool force) >+{ >+ FILE *f; >+ >+ if (sfp->f_fsid.val[0] == 0 || sfp->f_fsid.val[1] == 0) >+ return (-1); >+ >+ if (force) >+ f = auto_popen("umount", "-f", sfp->f_mntfromname, NULL); >+ else >+ f = auto_popen("umount", sfp->f_mntfromname, NULL); >+ >+ assert(f != NULL); >+ return (auto_pclose(f)); >+} >+ > static const struct statfs * > find_statfs(const struct statfs *mntbuf, int nitems, const char *mountpoint) > { >@@ -304,7 +321,8 @@ unmount_automounted(bool force) > continue; > } > >- unmount_by_statfs(&(mntbuf[i]), force); >+ if (unmount_by_umount(&(mntbuf[i]), force) != 0) >+ unmount_by_statfs(&(mntbuf[i]), force); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 251906
:
221111
|
221372
|
222930