svn commit: r287251 - stable/10/sys/dev/md
Andrey V. Elsukov
ae at FreeBSD.org
Fri Aug 28 11:56:22 UTC 2015
Author: ae
Date: Fri Aug 28 11:56:20 2015
New Revision: 287251
URL: https://svnweb.freebsd.org/changeset/base/287251
Log:
MFC r286720:
Use g_conf_printf_escaped() to escape illegal symbols in file name.
PR: 202289
Modified:
stable/10/sys/dev/md/md.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/md/md.c
==============================================================================
--- stable/10/sys/dev/md/md.c Fri Aug 28 10:34:37 2015 (r287250)
+++ stable/10/sys/dev/md/md.c Fri Aug 28 11:56:20 2015 (r287251)
@@ -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>
@@ -1621,9 +1622,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-stable
mailing list