aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-03-22 07:34:05 -0800
committerDavid S. Miller <davem@kernel.bkbits.net>2003-03-22 07:34:05 -0800
commit500b81a8eb226ab0fe0241b37afbf06c7bf71985 (patch)
treec619894fbb5ba41dd7d75ecadfcf341a9dddd037 /init
parentb548867b77cd8de4c34cddce5ef4a3831f105059 (diff)
downloadhistory-500b81a8eb226ab0fe0241b37afbf06c7bf71985.tar.gz
[PATCH] make the bdevname() API sane
bdevname returns a pointer to a static string. Change it so that the caller passes in the buffer.
Diffstat (limited to 'init')
-rw-r--r--init/do_mounts.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 0db87ed3810b12..51f1ff56ff4d27 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -245,6 +245,7 @@ void __init mount_block_root(char *name, int flags)
{
char *fs_names = __getname();
char *p;
+ char b[BDEVNAME_SIZE];
get_fs_names(fs_names);
retry:
@@ -263,12 +264,13 @@ retry:
* Allow the user to distinguish between failed open
* and bad superblock on root device.
*/
+ __bdevname(ROOT_DEV, b);
printk("VFS: Cannot open root device \"%s\" or %s\n",
- root_device_name, __bdevname(ROOT_DEV));
+ root_device_name, b);
printk("Please append a correct \"root=\" boot option\n");
- panic("VFS: Unable to mount root fs on %s", __bdevname(ROOT_DEV));
+ panic("VFS: Unable to mount root fs on %s", b);
}
- panic("VFS: Unable to mount root fs on %s", __bdevname(ROOT_DEV));
+ panic("VFS: Unable to mount root fs on %s", __bdevname(ROOT_DEV, b));
out:
putname(fs_names);
}