On Sun, Apr 24, 2016 at 07:28:35PM -0500, Zev Weiss wrote: > On Mon, Apr 25, 2016 at 03:17:09AM +0300, Dmitry V. Levin wrote: > >On Sun, Apr 24, 2016 at 06:52:44PM -0500, Zev Weiss wrote: > >>Hello, > >> > >>I noticed recently that strace puts quotes around the f_type member of > >>struct statfs: > >> > >> statfs(".", {f_type="EXT2_SUPER_MAGIC", ...}) = 0 > >> > >>The double-quotes seem to predate git history; ChangeLog-CVS indicates > >>they were added intentionally in a commit from Rick Sladkey in 1995 > >>("Enclose string result in double quotes"), though I don't see any > >>reasoning as to why this was done. Given that strace's output format > >>generally seems to aim for an approximate resemblance to C source code, > >>it seems like f_type's value would be better off without quotes (since > >>it's just a macro, not a string). Unless there's some more subtle > >>reason for the current formatting that I'm not seeing, could the > >>attached patch be applied to remove them? > > > >I agree, macro name shouldn't be quoted. > > > >>@@ -45,7 +45,7 @@ sprintfstype(const unsigned int magic) > >> > >> s = xlat_search(fsmagic, ARRAY_SIZE(fsmagic), magic); > >> if (s) { > >>- sprintf(buf, "\"%s\"", s); > >>+ sprintf(buf, "%s", s); > > > >I think this sprintf is not needed, sprintfstype can just return s. > > Ah, good point -- it *does* become pretty superfluous then. Amended > patch attached.
Applied, thanks. -- ldv
pgpJGxkLLDMqd.pgp
Description: PGP signature
------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel