Date: Fri, 28 Aug 2015 11:56:21 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287251 - stable/10/sys/dev/md Message-ID: <201508281156.t7SBuLjn046582@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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"); + } } } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508281156.t7SBuLjn046582>