diff options
author | Bernhard Reutner-Fischer | 2006-04-04 08:23:59 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2006-04-04 08:23:59 +0000 |
commit | 7fe9dd5dd701e4933dd2bfc91e43d47a1780a9a5 (patch) | |
tree | 2fff899a74b63bb323ad0f2e3b1b1871c526d287 | |
parent | 5e8995327325bb625a5abf965df3a07edb05fe5a (diff) | |
download | busybox-7fe9dd5dd701e4933dd2bfc91e43d47a1780a9a5.zip busybox-7fe9dd5dd701e4933dd2bfc91e43d47a1780a9a5.tar.gz |
- 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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c index 1b6ff96..1e4d5aa 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -477,8 +477,9 @@ int mount_main(int argc, char **argv) // Get next fstab entry - if (!getmntent_r(fstab, mtcur, bb_common_bufsiz1, - sizeof(bb_common_bufsiz1))) + if (!getmntent_r(fstab, mtcur, bb_common_bufsiz1 + + (mtcur==mtpair ? sizeof(bb_common_bufsiz1)/2 : 0), + sizeof(bb_common_bufsiz1)/2)) { // Were we looking for something specific? |