bugzilla-daemon at defect.opensolaris.org wrote: > http://defect.opensolaris.org/bz/show_bug.cgi?id=6711 > > Summary: battery kstat info messed the powertop GUI up > Classification: Development > Product: power-mgmt > Version: unspecified > Platform: Other > OS/Version: Windows > Status: NEW > Severity: minor > Priority: P4 > Component: powertop > AssignedTo: rafael.vanoni at sun.com > ReportedBy: aubrey.li at intel.com > CC: tesla-dev at opensolaris.org > > > When battery is not available, the error info > pt_error("%s : battery kstat not found %d\n", __FILE__, err); > print out on the screen which caused GUI broken. > > Here is a patch against it. > > diff -r 91af0d9c0790 usr/src/cmd/powertop/util.c > --- a/usr/src/cmd/powertop/util.c Tue Feb 17 17:43:42 2009 -0800 > +++ b/usr/src/cmd/powertop/util.c Tue Feb 17 19:02:46 2009 -0800 > @@ -66,6 +66,9 @@ > { > int err = errno; > va_list alist; > + > + if (!dump) > + return; > > if (progname != NULL) > (void) fprintf(stderr, PROG_FMT, progname); >
Looks good, please push it. Thanks, Rafael
