Alan Maguire wrote:
> Anurag S. Maskey wrote:
>> code review requested for
>>
>> 11385 Got error while setting 'activation-mode'.
>> 10453 nwamcfg destroy -a silently fails to destroy the User
>> ncp if it was previously active
>>
>> The webrev is at
>>
>> http://zhadum.east/export/ws/am223141/checkout-area/nwam1-fixes/against-review-with-bugs-only/
>>
>>
>>
>> which is against changes made to nwamcfg for its code review
>> comments. These changes will be pushed in the same changeset as the
>> code review comments.
>>
> looks good. One thing I was wondering - as I
> understand it, if a user tries to explicitly "set"
> a property, and show_prop_test() fails, we
> refuse to set the property. One concern I
> have here is that will impose a specific
> order on changes made to object properties.
> For example, I need to change activation-mode
> before I set priority-group, since I can't set
> priority-group while activation-mode is manual.
> Would it be better to emit a warning that
> "setting property %s has no effect" or something
> similar, and allow the setting of the property value
> to go ahead? Thanks!
makes sense now that properties are not being deleted. We can have
configuration that isn't used, so we should allow setting of properties
that don't get used. diff below.
void
set_func(cmd_t *cmd)
{
/* ... */
if (!show_prop_test(object_type, prop, prop_table)) {
- nerr("Set error: '%s' cannot be set", prop);
- return;
+ if (interactive_mode) {
+ (void) printf(gettext("setting property '%s' "
+ "has no effect\n"), prop);
+ }
}
/* ... */
}
>
> Alan