1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-03 09:00:21 +00:00

Use g_conf_printf_escaped() to escape illegal symbols in file name.

PR:		202289
MFC after:	1 week
This commit is contained in:
Andrey V. Elsukov 2015-08-13 13:20:29 +00:00
parent 0aedf4e812
commit ec170744a7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286720

View File

@ -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 char *indent, struct g_geom *gp,
"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");
}
}
}
}