Commit dc2f204a authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[PATCH] uml: make the ubd driver recognize letters in device names

ubd_get_config wasn't using the standard device number parser, which caused it
not to recognize letters.
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e61ef4a6
......@@ -746,15 +746,9 @@ static int ubd_config(char *str)
static int ubd_get_config(char *name, char *str, int size, char **error_out)
{
struct ubd *dev;
char *end;
int n, len = 0;
n = simple_strtoul(name, &end, 0);
if((*end != '\0') || (end == name)){
*error_out = "ubd_get_config : didn't parse device number";
return(-1);
}
n = parse_unit(&name);
if((n >= MAX_DEV) || (n < 0)){
*error_out = "ubd_get_config : device number out of range";
return(-1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment