diff options
| author | Ian Lepore <ian@FreeBSD.org> | 2017-12-20 18:23:22 +0000 |
|---|---|---|
| committer | Ian Lepore <ian@FreeBSD.org> | 2017-12-20 18:23:22 +0000 |
| commit | 5cf10fb96a24a673f0ddbbcda322e0eb7af14dae (patch) | |
| tree | 700e589d2fc4c541405a56518913bc87c0d7e80d /sys/dev/md | |
| parent | c19c7afee3c8bb5e3046be27d083f4fa51ee5d73 (diff) | |
Notes
Diffstat (limited to 'sys/dev/md')
| -rw-r--r-- | sys/dev/md/md.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index ee76b4f54ba7..3c4075094a19 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -1791,10 +1791,16 @@ md_preloaded(u_char *image, size_t length, const char *name) sc->start = mdstart_preload; if (name != NULL) strlcpy(sc->file, name, sizeof(sc->file)); -#if defined(MD_ROOT) && !defined(ROOTDEVNAME) - if (sc->unit == 0) +#ifdef MD_ROOT + if (sc->unit == 0) { +#ifndef ROOTDEVNAME rootdevnames[0] = MD_ROOT_FSTYPE ":/dev/md0"; #endif +#ifdef MD_ROOT_READONLY + sc->flags |= MD_READONLY; +#endif + } +#endif mdinit(sc); if (name != NULL) { printf("%s%d: Preloaded image <%s> %zd bytes at %p\n", |
