libmount: improve conversion from root= to the devname
Currently the code supports /dev/name or PARTUUID= only. We also need to support 'maj:min' and 'hexhex' notations. Reported-by: George Spelvin <linux@horizon.com> Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
12f5cbe159
commit
40f00b4f8e
5 changed files with 132 additions and 9 deletions
|
@ -183,6 +183,15 @@ int isdigit_string(const char *str)
|
|||
return p && p > str && !*p;
|
||||
}
|
||||
|
||||
int isxdigit_string(const char *str)
|
||||
{
|
||||
const char *p;
|
||||
|
||||
for (p = str; p && *p && isxdigit((unsigned char) *p); p++);
|
||||
|
||||
return p && p > str && !*p;
|
||||
}
|
||||
|
||||
/*
|
||||
* parse_switch(argv[i], "on", "off", "yes", "no", NULL);
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue