David Bustos wrote: > Quoth John Forte on Mon, Aug 13, 2007 at 09:41:15PM -0700: > >> A list of identifiers, each being a variable length of characters with >> no restrictions on the char value. It sounds like I cannot use the >> identifier as the property name so I will likely need to use an >> abstraction. I didn't see any support for lists either. Did I miss an >> interface? >> > > Yes. All properties actually hold collections of values. Currently, > most of them are only set with one, but if you run > "svcprop -p identity/entities sysidtool:net", you should see two. > > To set a property with multiple values, just use scf_entry_add_value() > multiple times. However, be aware that they are *collections*, and the > order that you read the values is not guaranteed to match the order that > you add them in. > > > David > This sounds like a reset to the collection with each call to scf_transaction_property_change such that when adding a new value to the property I should be iterating through the existing list of values calling scf_entry_add_value for each?
I seem to be running into some difficulty when adding more than one. Trying to commit the transaction results in an invalid argument error on commit. By any chance, is there a restriction on using the same allocated scf_value_t in the multiple scf_entry_add_value calls, i.e. Does the scf_entry_add_value add the address of 'value' or a copy? It seems like if I change or destroy the value once it is set, prior to commit, the commit will fail with the invalid argument error. Must I call scf_entry_add_value with a different scf_value_t for each scf_entry_add_value within a single transaction? Additionally, is there any max list length that I need be aware of? How about max astring/ustring size? - John