[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Patch: mount: Allow mounting single devices by UUID
From:       MiLo <milo () pli-images ! org>
Date:       2011-09-17 10:08:43
Message-ID: 4E7471AB.7010100 () pli-images ! org
[Download RAW message or body]

mount -a
can mount devices from /etc/fstab using UUID=... designation (if that's 
configured)

mount /dev/sda
will fail to mount /dev/sda if it is only listed by UUID in the fstab 
file. The patch lets mount check and parse UUID entries in fstab, and 
also find a match based on UUID. The behavior is now the same as for 
util-linux-ng-mount.

Patch is based on 1.18.5 (but should apply on later versions as well).

I've tested and used this patch in the OpenPLi distribution.

Kind regards,
Mike Looijmans

["mount_single_uuid.patch" (text/plain)]

Index: busybox-1.18.5/util-linux/mount.c
===================================================================
--- busybox-1.18.5.orig/util-linux/mount.c
+++ busybox-1.18.5/util-linux/mount.c
@@ -1934,6 +1934,8 @@ int mount_main(int argc UNUSED_PARAM, ch
 		// "proc") or a full path from root
 		if (argv[0]) {
 
+			// Check for UUID= or LABEL= entries too
+			resolve_mount_spec(&mtcur->mnt_fsname);
 			// Is this what we're looking for?
 			if (strcmp(argv[0], mtcur->mnt_fsname) != 0
 			 && strcmp(storage_path, mtcur->mnt_fsname) != 0


_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic