> In addtion to updating the above webrevs, I have the incremental > webrev available internally at > > http://zhadum.east.sun.com/export/ws/sowmini/brussels/parsegoop2cv.next/web.delta/ > > As you pointed out, I no longer needed the prototype definitions in > ipmpstat.c. I also fixed the nits.
Looks like IPMPSTAT_NCOL can also go. > I added a new flags argument that takes OFMT_PARSABLE and OFMT_DYNWIDTH. > But I think that allowing both the OFMT_DYNWIDTH and a fields arg > is allowing too many confusing degrees of freedom esp if you also > throw in a non-null fields_str that strictly specifies what fields to output. > > I think the following model is simpler and more useful > - if fields_str is non-null, output columns selected; it's the caller's > job to make sure the output fits within the window. > - if fields_str is NULL, and OFMT_DYNWIDTH is *not* specified, output > all columns. Again, its the caller's job to stretch the window if needed. > - if fields_str is NULL, and OFMT_DYNWIDTH is specified, adjust to > window size. > > This allows both the ipmpstat behavior (where it fits to window size) > and the dladm/flowadm behavior (where it expects the user to stretch > the window as needed) The new ipmpstat behavior doesn't quite sound like the old one. Specifically, if I specify "ipmpstat -g" with no "-o", then the output is always the same, regardless of how wide my terminal window is (it may lead to line wraps if e.g. the terminal window is only 50 characters). This is intentional, as otherwise there's a subtle environmental condition that impacts what data the user can see. (That is, the IPMPSTAT_NCOL check in ipmpstat.c is just a subtle way of determining what fields should be displayed by "all" and the ones that should be displayed by default. Its results are always the same, regardless of screen width.) -- meem
