Quoth Liane Praza on Tue, Oct 14, 2008 at 09:58:26PM -0700: > David Bustos wrote: > >Quoth Liane Praza on Thu, Oct 09, 2008 at 08:49:01PM -0700: > >>>>>> http://cr.opensolaris.org/~lianep/webrev-20080822/ > >>>>>lib/libscf/common/scf_tmpl.c ... > >>>>>4162,68,72: Is there a reason to return SCF_ERROR_CONSTRAINT_VIOLATED > >>>>> instead of SCF_ERROR_TEMPLATE_INVALID? ... > >Ah, yes, the developer could be calling a count function on an int > >property. If min > max, though, doesn't that necessarily mean the > >template is invalid? I.e., that the developer delivering the manifest > >made an error, rather than the developer calling the function? And for > >the int functions, if the value doesn't fit in an int64_t, doesn't that > >also mean that the developer delivering the manifest made an error, > >rather than the developer calling the function? > > But in the count representation, -1 > 1, which isn't true in the int > representation. Template isn't invalid.
I presume you mean the case where the string contains "-1,1". Won't strtoull() fail on the '-' before we reach the min > max comparison? And what about the int out-of-range cases? ... > >>>>>cmd/svc/milestone/restarter.xml > >>>>>80: Isn't restarter created by librestart? And aren't restarters > >>>>> required to use librestart? If so, it seems to me that it should be > >>>>> in global.xml. In any case, I think you should add a comment > >>>>> describing what creates restarter property groups and what readers > >>>>> these rules correspond to. > >>>>Not all restarters use only these properties, or are required to use all > >>>>of them. The restarter property group is strictly owned by the > >>>>restarter, even though it is required to set a very small set of the > >>>>properties. > >>>Are you saying that it's ok for restarters to bypass librestart? > >>I'm saying not all of the properties are managed by librestart. > > > >I don't understand how that means that these descriptions shouldn't be > >in global.xml. This way, if I write a new restarter that uses > >librestart, won't I have to duplicate all of this template information? > >Or is that necessary because there's no way for me to specify templates > >for properties in addition to those defined in global.xml? > > Yes. The latter. The design document which you saw early versions of > articulated the tradeoffs in overrides, and we chose to reduce > complexity at the risk of slightly less flexibility. Ok. Please add a comment. David