> On Sun, Aug 27, 2006 at 01:55:33PM -0700, Alan Maguire wrote: > > quick question about multivalued properties that are order-dependent > > (in this case the property represents an option to a daemon that can > > appear multiple times on the commandline). > > > > given that smf does not guarantee order being preserved for property > > values, is the right thing to do to use a single astring value and a > > separator > > between each value in the string? > > Yes, that's exactly what you should do. > > Dave
In terms of the command-line options thing that may be the right thing to do but I think the more general case is entirely broken. We *should* support order-dependent properties, otherwise typed multi-valued properties are completely useless for a large category of problems. The only reason it doesn't work is a stupid bug in scf_entry_add_value() wherein the code (to make its own life easier) adds new things to the head of a linked list to avoid keeping a tail pointer. As a result, every multi-valued property ends up in the exact reverse order in which items were added. I was planning on fixing this and updating the docs. -Mike -- Mike Shapiro, Solaris Kernel Development. blogs.sun.com/mws/