svn commit: r286720 - head/sys/dev/md
Andrey V. Elsukov
ae at FreeBSD.org
Thu Aug 13 13:20:30 UTC 2015
Author: ae
Date: Thu Aug 13 13:20:29 2015
New Revision: 286720
URL: https://svnweb.freebsd.org/changeset/base/286720
Log:
Use g_conf_printf_escaped() to escape illegal symbols in file name.
PR: 202289
MFC after: 1 week
Modified:
head/sys/dev/md/md.c
Modified: head/sys/dev/md/md.c
==============================================================================
--- head/sys/dev/md/md.c Thu Aug 13 13:19:56 2015 (r286719)
+++ head/sys/dev/md/md.c Thu Aug 13 13:20:29 2015 (r286720)
@@ -89,6 +89,7 @@
#include <sys/vnode.h>
#include <geom/geom.h>
+#include <geom/geom_int.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
@@ -1660,9 +1661,11 @@ g_md_dumpconf(struct sbuf *sb, const cha
"read-only");
sbuf_printf(sb, "%s<type>%s</type>\n", indent,
type);
- if (mp->type == MD_VNODE && mp->vnode != NULL)
- sbuf_printf(sb, "%s<file>%s</file>\n",
- indent, mp->file);
+ if (mp->type == MD_VNODE && mp->vnode != NULL) {
+ sbuf_printf(sb, "%s<file>", indent);
+ g_conf_printf_escaped(sb, "%s", mp->file);
+ sbuf_printf(sb, "</file>\n");
+ }
}
}
}
More information about the svn-src-head
mailing list