summarylogtreecommitdiffstats
path: root/init.patch
diff options
context:
space:
mode:
authoralyptik2017-08-23 10:38:11 -1000
committeralyptik2017-08-23 10:38:11 -1000
commit388121bf9bac019d2caccb38af705feed138c259 (patch)
treeb9b5c7e585f39d2a03dc20963a5c005dfe605101 /init.patch
downloadaur-388121bf9bac019d2caccb38af705feed138c259.tar.gz
addpkg: linux-surfacepro3-git 4.13rc6.r65.g2acf097f16ab-1
Diffstat (limited to 'init.patch')
-rw-r--r--init.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/init.patch b/init.patch
new file mode 100644
index 000000000000..60af1eb9412a
--- /dev/null
+++ b/init.patch
@@ -0,0 +1,38 @@
+--- a/init/do_mounts.c 2015-08-19 10:27:16.753852576 -0400
++++ b/init/do_mounts.c 2015-08-19 10:34:25.473850353 -0400
+@@ -490,7 +490,11 @@ void __init change_floppy(char *fmt, ...
+ va_start(args, fmt);
+ vsprintf(buf, fmt, args);
+ va_end(args);
+- fd = sys_open("/dev/root", O_RDWR | O_NDELAY, 0);
++ if (saved_root_name[0])
++ fd = sys_open(saved_root_name, O_RDWR | O_NDELAY, 0);
++ else
++ fd = sys_open("/dev/root", O_RDWR | O_NDELAY, 0);
++
+ if (fd >= 0) {
+ sys_ioctl(fd, FDEJECT, 0);
+ sys_close(fd);
+@@ -534,11 +538,17 @@ void __init mount_root(void)
+ #endif
+ #ifdef CONFIG_BLOCK
+ {
+- int err = create_dev("/dev/root", ROOT_DEV);
+-
+- if (err < 0)
+- pr_emerg("Failed to create /dev/root: %d\n", err);
+- mount_block_root("/dev/root", root_mountflags);
++ if (saved_root_name[0] == '/') {
++ int err = create_dev(saved_root_name, ROOT_DEV);
++ if (err < 0)
++ pr_emerg("Failed to create %s: %d\n", saved_root_name, err);
++ mount_block_root(saved_root_name, root_mountflags);
++ } else {
++ int err = create_dev("/dev/root", ROOT_DEV);
++ if (err < 0)
++ pr_emerg("Failed to create /dev/root: %d\n", err);
++ mount_block_root("/dev/root", root_mountflags);
++ }
+ }
+ #endif
+ }