← Commit list

3ba7bd143

Rob Landley
Rob Landley
2006-08-09
SOURCE BUG Duration: 31s

Subject

Vladimir Dronnikov convinced me to twiddle the semantics of the new shared subtree stuff to look more like http://lwn.net/Articles/159077/ thinks they should.

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/mount.c+14 -5
@@ -28,6 +28,7 @@
// Not real flags, but we want to be able to check for this.
#define MOUNT_NOAUTO (1<<29)
#define MOUNT_SWAP (1<<30)
+
/* Standard mount options (from -o options or --options), with corresponding
* flags */
@@ -291,7 +292,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
// Look at the file. (Not found isn't a failure for remount, or for
// a synthetic filesystem like proc or sysfs.)
- if (!lstat(mp->mnt_fsname, &st) && !(vfsflags & (MS_REMOUNT | MS_BIND | MS_MOVE | MS_SHARED | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE)))
+ if (!lstat(mp->mnt_fsname, &st) && !(vfsflags & (MS_REMOUNT | MS_BIND | MS_MOVE)))
{
// Do we need to allocate a loopback device for it?
@@ -455,16 +456,24 @@ int mount_main(int argc, char **argv)
goto clean_up;
}
- // If we have at least one argument, it's the storage location
-
- if (optind < argc) storage_path = bb_simplify_path(argv[optind]);
-
+ // If we have a shared subtree flag, don't worry about fstab or mtab.
+ i = parse_mount_options(cmdopts,0);
+ if (ENABLE_FEATURE_MOUNT_FLAGS &&
+ (i & (MS_SHARED | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE )))
+ {
+ rc = mount("", argv[optind], "", i, "");
+ if (rc) bb_perror_msg_and_die("%s", argv[optind]);
+ goto clean_up;
+ }
+
// Open either fstab or mtab
if (parse_mount_options(cmdopts,0) & MS_REMOUNT)
fstabname = bb_path_mtab_file;
else fstabname="/etc/fstab";
+ storage_path = bb_simplify_path(argv[optind]);
+
if (!(fstab=setmntent(fstabname,"r")))
bb_perror_msg_and_die("Cannot read %s",fstabname);