diff options
author | John Sonnenschein <johns@joyent.com> | 2012-11-07 22:04:45 +0000 |
---|---|---|
committer | John Sonnenschein <johns@joyent.com> | 2012-11-07 22:04:45 +0000 |
commit | ad2a40e16d2bee59cfe84f89db3ce92b9f15adff (patch) | |
tree | bc8e23c4588b29e4602a54b72dbe2f1d8786468d /usr/src/uts/common/fs/vfs.c | |
parent | b5f683274309a9c6f46eea8ce5d0cca514d977a8 (diff) | |
parent | 7c45eec5760d4195b6b85770e7ac51c380adfb8a (diff) | |
download | illumos-joyent-ad2a40e16d2bee59cfe84f89db3ce92b9f15adff.tar.gz |
Illumos sync
Diffstat (limited to 'usr/src/uts/common/fs/vfs.c')
-rw-r--r-- | usr/src/uts/common/fs/vfs.c | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/usr/src/uts/common/fs/vfs.c b/usr/src/uts/common/fs/vfs.c index abe3a23e75..8d5c741428 100644 --- a/usr/src/uts/common/fs/vfs.c +++ b/usr/src/uts/common/fs/vfs.c @@ -936,29 +936,33 @@ vfs_mountroot(void) } #endif /* __sparc */ - /* - * Look up the root device via devfs so that a dv_node is - * created for it. The vnode is never VN_RELE()ed. - * We allocate more than MAXPATHLEN so that the - * buffer passed to i_ddi_prompath_to_devfspath() is - * exactly MAXPATHLEN (the function expects a buffer - * of that length). - */ - plen = strlen("/devices"); - path = kmem_alloc(plen + MAXPATHLEN, KM_SLEEP); - (void) strcpy(path, "/devices"); + if (strcmp(rootfs.bo_fstype, "zfs") != 0) { + /* + * Look up the root device via devfs so that a dv_node is + * created for it. The vnode is never VN_RELE()ed. + * We allocate more than MAXPATHLEN so that the + * buffer passed to i_ddi_prompath_to_devfspath() is + * exactly MAXPATHLEN (the function expects a buffer + * of that length). + */ + plen = strlen("/devices"); + path = kmem_alloc(plen + MAXPATHLEN, KM_SLEEP); + (void) strcpy(path, "/devices"); - if (i_ddi_prompath_to_devfspath(rootfs.bo_name, path + plen) - != DDI_SUCCESS || - lookupname(path, UIO_SYSSPACE, FOLLOW, NULLVPP, &rvp)) { + if (i_ddi_prompath_to_devfspath(rootfs.bo_name, path + plen) + != DDI_SUCCESS || + lookupname(path, UIO_SYSSPACE, FOLLOW, NULLVPP, &rvp)) { - /* NUL terminate in case "path" has garbage */ - path[plen + MAXPATHLEN - 1] = '\0'; + /* NUL terminate in case "path" has garbage */ + path[plen + MAXPATHLEN - 1] = '\0'; #ifdef DEBUG - cmn_err(CE_WARN, "!Cannot lookup root device: %s", path); + cmn_err(CE_WARN, "!Cannot lookup root device: %s", + path); #endif + } + kmem_free(path, plen + MAXPATHLEN); } - kmem_free(path, plen + MAXPATHLEN); + vfs_mnttabvp_setup(); } |