[PATCH 6/16] UML - make the ubd driver recognize letters in device names

From: Jeff Dike
Date: Mon Mar 07 2005 - 14:19:34 EST


ubd_get_config wasn't using the standard device number parser, which caused
it not to recognize letters.

Signed-off-by: Jeff Dike <jdike@xxxxxxxxxxx>

Index: linux-2.6.11/arch/um/drivers/ubd_kern.c
===================================================================
--- linux-2.6.11.orig/arch/um/drivers/ubd_kern.c 2005-03-05 12:07:35.000000000 -0500
+++ linux-2.6.11/arch/um/drivers/ubd_kern.c 2005-03-05 12:11:43.000000000 -0500
@@ -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);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/