path: root/sbin/mdconfig
diff options
authorStephen J. Kiernan <stevek@FreeBSD.org>2017-02-13 17:44:07 +0000
committerStephen J. Kiernan <stevek@FreeBSD.org>2017-02-13 17:44:07 +0000
commitd2e6391342dc7681cb06c7047acabbef49574d13 (patch)
treec6f6b2530741ad86c216d74527c21f2cd70a7df9 /sbin/mdconfig
parent627c036f65f2978234273299e6794694ad897e7d (diff)
For MD_PRELOAD type md(4) devices, if there is a file name in the preloaded
meta-data, copy it into the softc structure. When returning md(4) device details to the caller, include the file name in any MD_PRELOAD type devices if it is set (first character is not NUL.) In mdconfig, for "preload" type md(4) devices, if there is file config available, print it in the file column of the output. Reviewed by: brooks Approved by: sjg (mentor) MFC after: 1 month Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D9529
Notes: svn path=/head/; revision=313701
Diffstat (limited to 'sbin/mdconfig')
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c
index 1b4e4ce2fa40..e86ffdc4e961 100644
--- a/sbin/mdconfig/mdconfig.c
+++ b/sbin/mdconfig/mdconfig.c
@@ -452,7 +452,8 @@ md_list(const char *units, int opt, const char *fflag)
gc = &pp->lg_config;
type = geom_config_get(gc, "type");
- if (strcmp(type, "vnode") == 0) {
+ if (strcmp(type, "vnode") == 0 ||
+ strcmp(type, "preload") == 0) {
file = geom_config_get(gc, "file");
if (fflag != NULL &&
strcmp(fflag, file) != 0)