Garrett D'Amore wrote:
On Fri, 2010-07-30 at 10:59 +0200, Joerg Schilling wrote:
"Garrett D'Amore" <garr...@damore.org> wrote:

     name of the packages delivering the file. For example, system/kernel
     would deliver etc/sock2path.d/system%2Fkernel.
Its not really architectural, but encoding %2F for "/" seems kind of
ugly.  That said, its probably the best option that doesn't create a
possibility of naming collisions.  (I'd have encoded ":" for "/" or
somesuch.)
How do you encode ':' in such a case?

You can't do it uniquely. (I think I alluded to "doesn't create the
possibility of a naming collision".)  IMO the risk of such a collision
is both small and quite manageable, since the number of new entries to
this file should be minuscule.

I also don't like the %2f encoding, not so much for this particular case, but because it sets a bad precedent, and the standard unix text filtering commands don't have any support for that sort of escaping (i.e. it's not really what you'd expect on unix).

Other options:

1) Swap the "/" for a "-". This is already done in various SMF filenames when converting from an FMRI (look in /var/svc/log/).

2) Use the directory separator, so the file is /etc/sock2path.d/system/kernel and sock2path.d(4) is documented to be a multi-level directory.

--
Andrew Gabriel
_______________________________________________
opensolaris-arc mailing list
opensolaris-arc@opensolaris.org

Reply via email to