[PATCH] block:do_mounts - add device info to mount message

From: Marton Balint
Date: Fri Oct 24 2008 - 07:45:40 EST


Printing the minor and major number of the successfully mounted root
device can be quite useful, the patch adds this piece of information
to the "VFS: Mounted root..." message.

Signed-off-by: Marton Balint <cus@xxxxxxxxxx>--- linux/init/do_mounts.c.orig 2008-10-24 12:47:21.000000000 +0200
+++ linux/init/do_mounts.c 2008-10-24 12:49:05.000000000 +0200
@@ -220,10 +220,10 @@

sys_chdir("/root");
ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev;
- printk("VFS: Mounted root (%s filesystem)%s.\n",
+ printk("VFS: Mounted root (%s filesystem)%s on device %u:%u.\n",
current->fs->pwd.mnt->mnt_sb->s_type->name,
current->fs->pwd.mnt->mnt_sb->s_flags & MS_RDONLY ?
- " readonly" : "");
+ " readonly" : "", MAJOR(ROOT_DEV), MINOR(ROOT_DEV));
return 0;
}