当前位置: 技术问答>linux和unix
救命吖,谁教教如何修改/init/do_mounts.c文件啊
来源: 互联网 发布时间:2016-03-21
本文导语: 按下面的代码修改不行吖,编译的时候会出错,出错信息忘截了,谁能帮忙改一下呢? /init/do_mounts.c …… * Allow the user to distinguish between failed open * and bad superblock on root device. */ - pr...
按下面的代码修改不行吖,编译的时候会出错,出错信息忘截了,谁能帮忙改一下呢?
/init/do_mounts.c
……
* Allow the user to distinguish between failed open
* and bad superblock on root device.
*/
- printk ("VFS: Cannot open root device "%s" or %s",
+ printk ("VFS: Cannot open root device "%s" or %s,
retrying in 1 second.", root_device_name, kdevname (ROOT_DEV));
- printk ("Please append a correct "root=" boot option");
- panic("VFS: Unable to mount root fs on %s",
- kdevname(ROOT_DEV));
+ printk ("You may need to append a correct "root=" boot option");
+ printk ("or wait for the root device to become ready.");
+
+ /* wait 1 second and try again,
+ * allowing time for hubs/devices to become ready */
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(HZ);
+ goto retry;
}
panic("VFS: Unable to mount root fs on %s", kdevname(ROOT_DEV));
out:
……
/init/do_mounts.c
……
* Allow the user to distinguish between failed open
* and bad superblock on root device.
*/
- printk ("VFS: Cannot open root device "%s" or %s",
+ printk ("VFS: Cannot open root device "%s" or %s,
retrying in 1 second.", root_device_name, kdevname (ROOT_DEV));
- printk ("Please append a correct "root=" boot option");
- panic("VFS: Unable to mount root fs on %s",
- kdevname(ROOT_DEV));
+ printk ("You may need to append a correct "root=" boot option");
+ printk ("or wait for the root device to become ready.");
+
+ /* wait 1 second and try again,
+ * allowing time for hubs/devices to become ready */
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(HZ);
+ goto retry;
}
panic("VFS: Unable to mount root fs on %s", kdevname(ROOT_DEV));
out:
……
|
printk ("VFS: Cannot open root device "%s" or %s,
需要转义符的吧,
printk("VFS: Cannot open root device "%s" or %sn",
这个东西为什么要修改? 你可以参考kernel.org的代码。
需要转义符的吧,
printk("VFS: Cannot open root device "%s" or %sn",
这个东西为什么要修改? 你可以参考kernel.org的代码。
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。