Date: Thu, 13 Aug 2015 13:20:30 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286720 - head/sys/dev/md Message-ID: <201508131320.t7DDKUT2035098@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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"); + } } } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508131320.t7DDKUT2035098>