diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-02-24 08:13:30 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-02-24 08:13:30 +0100 |
| commit | bf1d347964eac6bf25c1595d29fcb761e58c99c3 (patch) | |
| tree | 8413bb0df7116d741c5265b150508138c5f17b77 /util-linux | |
| parent | b702d9aa5ab18e441a7d3cd9f4d65a249b43a351 (diff) | |
| download | busybox-w32-bf1d347964eac6bf25c1595d29fcb761e58c99c3.tar.gz busybox-w32-bf1d347964eac6bf25c1595d29fcb761e58c99c3.tar.bz2 busybox-w32-bf1d347964eac6bf25c1595d29fcb761e58c99c3.zip | |
fdisk: do not treat names ending in '0' as partitions
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
| -rw-r--r-- | util-linux/fdisk.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index a731316ce..980568bc8 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c | |||
| @@ -2802,8 +2802,9 @@ list_devs_in_proc_partititons(void) | |||
| 2802 | &ma, &mi, &sz, ptname) != 4) | 2802 | &ma, &mi, &sz, ptname) != 4) |
| 2803 | continue; | 2803 | continue; |
| 2804 | for (s = ptname; *s; s++) | 2804 | for (s = ptname; *s; s++) |
| 2805 | continue; | 2805 | continue; |
| 2806 | if (isdigit(s[-1])) | 2806 | /* note: excluding '0': e.g. mmcblk0 is not a partition name! */ |
| 2807 | if (s[-1] >= '1' && s[-1] <= '9') | ||
| 2807 | continue; | 2808 | continue; |
| 2808 | sprintf(devname, "/dev/%s", ptname); | 2809 | sprintf(devname, "/dev/%s", ptname); |
| 2809 | open_list_and_close(devname, 0); | 2810 | open_list_and_close(devname, 0); |
