kernel - Add root mount support for hammer2
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 27 Aug 2015 05:21:21 +0000 (22:21 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 27 Aug 2015 05:21:21 +0000 (22:21 -0700)
* Don't try to interpret the device string in mountroot for
  hammer2 either (it was already not being interpreted for hammer).

sys/kern/vfs_conf.c

index 5495fe7..65d23b9 100644 (file)
@@ -420,10 +420,12 @@ vfs_mountroot_try(const char *mountfrom)
                }
                mp->mnt_flag |= MNT_ROOTFS;
 
-               /* do our best to set rootdev */
-               if ((strcmp(vfsname, "hammer") != 0) && (devname[0] != 0) &&
-                   setrootbyname(devname))
+               /* do our best to set rootdev (really just for UFS) */
+               if (strcmp(vfsname, "hammer") != 0 &&
+                   strcmp(vfsname, "hammer2") != 0 &&
+                   (devname[0] != 0) && setrootbyname(devname)) {
                        kprintf("setrootbyname failed\n");
+               }
 
                /* If the root device is a type "memory disk", mount RW */
                if (rootdev != NULL && dev_is_good(rootdev) &&