kern/104389: [geom] [patch] sys/geom/geom_dump.c doesn't encode XML entities

Dennis Berger db at bsdsystems.de
Wed Mar 7 16:50:08 UTC 2007


The following reply was made to PR kern/104389; it has been noted by GNATS.

From: Dennis Berger <db at bsdsystems.de>
To: doug steinwand <dzs-pr at dzs.fx.org>
Cc: bug-followup at FreeBSD.org,  freebsd-geom at freebsd.org
Subject: Re: kern/104389: [geom] [patch] sys/geom/geom_dump.c doesn't encode
 XML entities
Date: Wed, 07 Mar 2007 17:29:36 +0100

 Yes I found this version much better than the one before.
 
 regards,
 -Dennis
 
 doug steinwand schrieb:
 > * Dennis Berger <db at nipsi.de> [2007-03-06 16:53:44 +0100]:
 >   
 >> This way we can escape all illegal characters.
 >> What do you suggest?
 >>     
 >
 > The gstat and other geom applications basically use expat to parse
 > the equivalent of "sysctl -b kern.geom.confxml". This output does
 > not have an encoding specified, so expat accepts only ASCII.  As
 > such, bytes greater than 0x7e must be encoded.
 >
 > http://skew.org/xml/tutorial/
 > http://www.w3.org/TR/1998/REC-xml-19980210
 >
 > Attached is a patch which attempts to output valid XML for all cases
 > (any value between 0x00 and 0xff). One issue is that many bytes
 > between 0x00 and 0x1f have no valid XML coding, so this patch
 > replaces them with '?' (such things should not appear in geom names,
 > though).
 >
 > Also, it seems that expat is attempting to convert bytes from
 > iso-8859-1 into utf8 characters, so gstat and glabel output may
 > look weird.
 >
 >  - doug
 >   
 > ------------------------------------------------------------------------
 >
 > _______________________________________________
 > freebsd-geom at freebsd.org mailing list
 > http://lists.freebsd.org/mailman/listinfo/freebsd-geom
 > To unsubscribe, send any mail to "freebsd-geom-unsubscribe at freebsd.org"
 
 
 -- 
 Dennis Berger
 BSDSystems
 Eduardstrasse 43b
 20257 Hamburg
 
 Phone: +49 (0)40 54 00 18 17
 Mobile: +49 (0) 179 123 15 09
 E-Mail: db at bsdsystems.de
 


More information about the freebsd-geom mailing list