summaryrefslogtreecommitdiffstats
path: root/sys/dev/md
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2012-11-03 21:20:55 +0000
committermarcel <marcel@FreeBSD.org>2012-11-03 21:20:55 +0000
commit85823a3b2e747b0343cd12c3f6750c0f809cff56 (patch)
tree3f93aba330b0fde018dd2a9aead1e9b2d0ccbf07 /sys/dev/md
parent1676a587bc436048f9056ceccca0a91e52d18207 (diff)
downloadFreeBSD-src-85823a3b2e747b0343cd12c3f6750c0f809cff56.zip
FreeBSD-src-85823a3b2e747b0343cd12c3f6750c0f809cff56.tar.gz
Add a MD_ROOT_FSTYPE kernel option. The option specifies the
file system part for the MD_ROOT mount string. Hardcoding the the file system type as "ufs" is too restrictive.
Diffstat (limited to 'sys/dev/md')
-rw-r--r--sys/dev/md/md.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 2384111..a86c26a 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -110,6 +110,10 @@ static int md_malloc_wait;
SYSCTL_INT(_vm, OID_AUTO, md_malloc_wait, CTLFLAG_RW, &md_malloc_wait, 0,
"Allow malloc to wait for memory allocations");
+#if defined(MD_ROOT) && !defined(MD_ROOT_FSTYPE)
+#define MD_ROOT_FSTYPE "ufs"
+#endif
+
#if defined(MD_ROOT) && defined(MD_ROOT_SIZE)
/*
* Preloaded image gets put here.
@@ -1328,7 +1332,7 @@ md_preloaded(u_char *image, size_t length)
sc->start = mdstart_preload;
#ifdef MD_ROOT
if (sc->unit == 0)
- rootdevnames[0] = "ufs:/dev/md0";
+ rootdevnames[0] = MD_ROOT_FSTYPE ":/dev/md0";
#endif
mdinit(sc);
}
OpenPOWER on IntegriCloud