mirror of
https://github.com/sheumann/hush.git
synced 2024-12-28 22:30:05 +00:00
fdisk: do not treat names ending in '0' as partitions
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
b702d9aa5a
commit
bf1d347964
@ -2803,7 +2803,8 @@ list_devs_in_proc_partititons(void)
|
||||
continue;
|
||||
for (s = ptname; *s; s++)
|
||||
continue;
|
||||
if (isdigit(s[-1]))
|
||||
/* note: excluding '0': e.g. mmcblk0 is not a partition name! */
|
||||
if (s[-1] >= '1' && s[-1] <= '9')
|
||||
continue;
|
||||
sprintf(devname, "/dev/%s", ptname);
|
||||
open_list_and_close(devname, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user