Commit 7cf1a22b authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[PATCH] uml: fix fencepost errors in printks

Simple corrections to some error messages, which list wrong limits for UBD
devices and such.
Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
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 4f955f2f
...@@ -332,7 +332,7 @@ int line_setup(struct line *lines, int num, char *init, int all_allowed) ...@@ -332,7 +332,7 @@ int line_setup(struct line *lines, int num, char *init, int all_allowed)
init++; init++;
if((n >= 0) && (n >= num)){ if((n >= 0) && (n >= num)){
printk("line_setup - %d out of range ((0 ... %d) allowed)\n", printk("line_setup - %d out of range ((0 ... %d) allowed)\n",
n, num); n, num - 1);
return(0); return(0);
} }
else if(n >= 0){ else if(n >= 0){
......
...@@ -299,7 +299,7 @@ static int ubd_setup_common(char *str, int *index_out) ...@@ -299,7 +299,7 @@ static int ubd_setup_common(char *str, int *index_out)
} }
if(n >= MAX_DEV){ if(n >= MAX_DEV){
printk(KERN_ERR "ubd_setup : index %d out of range " printk(KERN_ERR "ubd_setup : index %d out of range "
"(%d devices)\n", n, MAX_DEV); "(%d devices, from 0 to %d)\n", n, MAX_DEV, MAX_DEV - 1);
return(1); 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