Hi Rafael, A nice work, especially the work for window resizing!
Rafael.Vanoni <> wrote: > Just posted a webrev at > http://cr.opensolaris.org/~rafaelv/ptop-display/ with suggested fixes > for the following bugs > > 11928 powertop(1) doesn't refresh data if system only supports C0 > 11952 PowerTOP's window resizing doesn't always refresh the screen > 11863 i18n and pt_error() (remove locale.h) > > Please see each bug report for a description of the changes and > individual patches, and let me know what you think. > > Thanks, > Rafael several comments below: 1) this changeset caused compiling warning on my side. Did you see it? "../common/powertop.c", line 115: warning: declaration can not follow a statement (E_DECLARATION_IN_CODE - - - - - - - - - - - - - - - - - - - - - - - - boolean_t root_user = B_FALSE; + struct pollfd pollset; + pollset.fd = STDIN_FILENO; + pollset.events = POLLIN; + static struct option opts[] = { { "dump", 1, NULL, 'd' }, { "time", 1, NULL, 't' }, - - - - - - - - - - - - - - - - - - - - - - - - of course we should put pollset initialization after struct option definition. 2) display.c line 117, why putchar('r') is necessary here? 3) powertop.c line240~249, is it better to put pollset initlization to here? line271~275, for what reason poll is used here, instead select? others look good to me. Thanks, -Aubrey
