#include <linux/suspend.h>
#include <linux/root_dev.h>
#include <linux/security.h>
+#include <linux/delay.h>
#include <linux/nfs_fs.h>
#include <linux/nfs_fs_sb.h>
int part;
#ifdef CONFIG_SYSFS
- sys_mkdir("/sys", 0700);
+ int mkdir_err = sys_mkdir("/sys", 0700);
if (sys_mount("sysfs", "/sys", "sysfs", 0, NULL) < 0)
goto out;
#endif
#ifdef CONFIG_SYSFS
sys_umount("/sys", 0);
out:
- sys_rmdir("/sys");
+ if (!mkdir_err)
+ sys_rmdir("/sys");
#endif
return res;
fail:
return 1;
}
+static unsigned int __initdata root_delay;
+static int __init root_delay_setup(char *str)
+{
+ root_delay = simple_strtoul(str, NULL, 0);
+ return 1;
+}
+
__setup("rootflags=", root_data_setup);
__setup("rootfstype=", fs_names_setup);
+__setup("rootdelay=", root_delay_setup);
static void __init get_fs_names(char *page)
{
mount_devfs();
+ if (root_delay) {
+ printk(KERN_INFO "Waiting %dsec before mounting root device...\n",
+ root_delay);
+ ssleep(root_delay);
+ }
+
md_run_setup();
if (saved_root_name[0]) {