2900_dev-root-proc-mount-fix.patch 919 B

12345678910111213141516171819202122232425262728293031
  1. --- a/init/do_mounts.c 2014-08-26 08:03:30.000013100 -0400
  2. +++ b/init/do_mounts.c 2014-08-26 08:11:19.720014712 -0400
  3. @@ -484,7 +484,10 @@ void __init change_floppy(char *fmt, ...
  4. va_start(args, fmt);
  5. vsprintf(buf, fmt, args);
  6. va_end(args);
  7. - fd = sys_open("/dev/root", O_RDWR | O_NDELAY, 0);
  8. + if (saved_root_name[0])
  9. + fd = sys_open(saved_root_name, O_RDWR | O_NDELAY, 0);
  10. + else
  11. + fd = sys_open("/dev/root", O_RDWR | O_NDELAY, 0);
  12. if (fd >= 0) {
  13. sys_ioctl(fd, FDEJECT, 0);
  14. sys_close(fd);
  15. @@ -527,8 +530,13 @@ void __init mount_root(void)
  16. }
  17. #endif
  18. #ifdef CONFIG_BLOCK
  19. - create_dev("/dev/root", ROOT_DEV);
  20. - mount_block_root("/dev/root", root_mountflags);
  21. + if (saved_root_name[0]) {
  22. + create_dev(saved_root_name, ROOT_DEV);
  23. + mount_block_root(saved_root_name, root_mountflags);
  24. + } else {
  25. + create_dev("/dev/root", ROOT_DEV);
  26. + mount_block_root("/dev/root", root_mountflags);
  27. + }
  28. #endif
  29. }