Skip to contentSkip to conversation

UML - make the ubd driver recognize letters in device names

PATCH New Jeff Dike 1 participant 1 message Mar 7, 2005 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 6/16 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.

arch/um/drivers/ubd_kern.c +1 -7
Index: linux-2.6.11/arch/um/drivers/ubd_kern.c
===================================================================
@@ -746,15 +746,9 @@
 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);

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel