mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 6/16] UML - make the ubd driver recognize letters in device names
@ 2005-03-07 20:37 Jeff Dike
  0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2005-03-07 20:37 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, user-mode-linux-devel

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

Signed-off-by: Jeff Dike <jdike@addtoit.com>

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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-07 19:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-07 20:37 [PATCH 6/16] UML - make the ubd driver recognize letters in device names Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®