Michael Hunter wrote:
>> http://zhadum.east/export/ws/am223141/temp/nwam1-work/webrev/
>>
>> 10341 nwamadm should use the ofmt API to print the output of "list"
>> http://defect.opensolaris.org/bz/show_bug.cgi?id=10341
>>
>> comments appreciated.
>>     
>
> nwamadm.c:661,666,673 Thats heavy machinery for copying a string
>   
I am sorry, I do not quite understand.  The string to print must be 
placed in buf.  The profile_entry_t struct stores the actual values 
rather than strings.  I could change the profile_entry_t struct to store 
the actual string, but that is just moving the nwam_*_to_string() calls 
somewhere else.

> I didn't delve into how ofmt works.  Looks like a powerful pretty
> printing API.
>   
Indeed.  Adding parseable output and selecting output fields becomes 
easy by just passing flags during ofmt_open().  So, if we every decided 
to allow "nwamadm list -o <field>,..." for selected fields or "nwamadm 
list -p" for parseable output, the work required is very minimal.

Anurag

Reply via email to