Author: trasz
Date: Thu May 12 07:38:10 2016
New Revision: 299523
URL: https://svnweb.freebsd.org/changeset/base/299523

Log:
  Stop hiding errors that result in failure to mount /dev.  Otherwise,
  missing /dev directory makes one end up with a completely deaf (init
  without stdout/stderr) system with no hints on the console, unless
  you've booted up with bootverbose.
  
  MFC after:    1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/kern/vfs_mountroot.c

Modified: head/sys/kern/vfs_mountroot.c
==============================================================================
--- head/sys/kern/vfs_mountroot.c       Thu May 12 06:55:42 2016        
(r299522)
+++ head/sys/kern/vfs_mountroot.c       Thu May 12 07:38:10 2016        
(r299523)
@@ -347,9 +347,9 @@ vfs_mountroot_shuffle(struct thread *td,
                }
                NDFREE(&nd, NDF_ONLY_PNBUF);
 
-               if (error && bootverbose)
+               if (error)
                        printf("mountroot: unable to remount previous root "
-                           "under /.mount or /mnt (error %d).\n", error);
+                           "under /.mount or /mnt (error %d)\n", error);
        }
 
        /* Remount devfs under /dev */
@@ -373,9 +373,9 @@ vfs_mountroot_shuffle(struct thread *td,
                } else
                        vput(vp);
        }
-       if (error && bootverbose)
+       if (error)
                printf("mountroot: unable to remount devfs under /dev "
-                   "(error %d).\n", error);
+                   "(error %d)\n", error);
        NDFREE(&nd, NDF_ONLY_PNBUF);
 
        if (mporoot == mpdevfs) {
@@ -383,7 +383,7 @@ vfs_mountroot_shuffle(struct thread *td,
                /* Unlink the no longer needed /dev/dev -> / symlink */
                error = kern_unlinkat(td, AT_FDCWD, "/dev/dev",
                    UIO_SYSSPACE, 0);
-               if (error && bootverbose)
+               if (error)
                        printf("mountroot: unable to unlink /dev/dev "
                            "(error %d)\n", error);
        }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to