[PATCH] do not ignore mmc or micro sd block devices

Waldemar Brodkorb wbx at openadk.org
Tue Feb 23 20:10:08 UTC 2010


On Linux MMC or MicroSD devices are named f.e. mmcblk0 like
on a FOX Board G20. When using fdisk -l on such targets, the
partition table is not listed. With this patch you get the requested
output.

Signed-off-by: Waldemar Brodkorb <wbx at openadk.org>
---
 util-linux/fdisk.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index a731316..101bba5 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -2804,7 +2804,9 @@ list_devs_in_proc_partititons(void)
 		for (s = ptname; *s; s++)
 			continue;
 		if (isdigit(s[-1]))
-			continue;
+			if (s[-1] != '0')
+				continue;
+
 		sprintf(devname, "/dev/%s", ptname);
 		open_list_and_close(devname, 0);
 	}
-- 
1.7.0



More information about the busybox mailing list