Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 67647 Details for
Bug 104697
util-linux `mount --move` doesn't properly update /etc/mtab
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
util-linux-update-mtab-when-moving.patch
util-linux-update-mtab-when-moving.patch (text/plain), 907 bytes, created by
SpanKY
on 2005-09-04 12:08:56 UTC
(
hide
)
Description:
util-linux-update-mtab-when-moving.patch
Filename:
MIME Type:
Creator:
SpanKY
Created:
2005-09-04 12:08:56 UTC
Size:
907 bytes
patch
obsolete
>http://bugs.gentoo.org/104697 > >--- mount/mount.c >+++ mount/mount.c >@@ -665,6 +665,25 @@ > else { > mntFILE *mfp; > >+ /* when moving a mount point, we have to make sure the mtab >+ * gets updated properly. We get info about the old mount >+ * point, copy it to the new mount point, and then delete >+ * the old mount point. */ >+ if (flags & MS_MOVE) { >+ const char *olddir = mnt.mnt_fsname; >+ struct mntentchn *oldmc = oldmc = getmntfile(olddir); >+ if (oldmc != NULL) { >+ mnt.mnt_fsname = strdup(oldmc->m.mnt_fsname); >+ mnt.mnt_type = oldmc->m.mnt_type; >+ mnt.mnt_opts = oldmc->m.mnt_opts; >+ mnt.mnt_freq = oldmc->m.mnt_freq; >+ mnt.mnt_passno = oldmc->m.mnt_passno; >+ } >+ update_mtab(olddir, NULL); >+ if (oldmc != NULL) >+ my_free(olddir); >+ } >+ > lock_mtab(); > mfp = my_setmntent(MOUNTED, "a+"); > if (mfp == NULL || mfp->mntent_fp == NULL) {
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 104697
: 67647