From 7fe9dd5dd701e4933dd2bfc91e43d47a1780a9a5 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 4 Apr 2006 08:23:59 +0000 Subject: [PATCH] - 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) --- util-linux/mount.c | 5 +++-- 1 file 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) // 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? -- 2.25.1