aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-04-04 08:23:59 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-04-04 08:23:59 +0000
commit7fe9dd5dd701e4933dd2bfc91e43d47a1780a9a5 (patch)
tree2fff899a74b63bb323ad0f2e3b1b1871c526d287
parent5e8995327325bb625a5abf965df3a07edb05fe5a (diff)
downloadbusybox-w32-7fe9dd5dd701e4933dd2bfc91e43d47a1780a9a5.tar.gz
busybox-w32-7fe9dd5dd701e4933dd2bfc91e43d47a1780a9a5.tar.bz2
busybox-w32-7fe9dd5dd701e4933dd2bfc91e43d47a1780a9a5.zip
- fix one-argument mount in cases where fstab or mtab contain overlapping
entries. (Such as "mount -o remount,rw /" where you're not on rootfs.). (r14723 from trunk)
-rw-r--r--util-linux/mount.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 1b6ff965b..1e4d5aa31 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -477,8 +477,9 @@ int mount_main(int argc, char **argv)
477 477
478 // Get next fstab entry 478 // Get next fstab entry
479 479
480 if (!getmntent_r(fstab, mtcur, bb_common_bufsiz1, 480 if (!getmntent_r(fstab, mtcur, bb_common_bufsiz1
481 sizeof(bb_common_bufsiz1))) 481 + (mtcur==mtpair ? sizeof(bb_common_bufsiz1)/2 : 0),
482 sizeof(bb_common_bufsiz1)/2))
482 { 483 {
483 // Were we looking for something specific? 484 // Were we looking for something specific?
484 485