* [uml-devel] [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);
-------------------------------------------------------
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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-03-07 19:07 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 [uml-devel] [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