Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/sysmon



On Tue, Nov 11, 2008 at 07:11:48PM +0100, Bernd Ernesti wrote:
> On Tue, Nov 11, 2008 at 04:55:01PM +0000, Paul Goyette wrote:
> > 
> > Module Name:        src
> > Committed By:       pgoyette
> > Date:               Tue Nov 11 16:55:01 UTC 2008
> > 
> > Modified Files:
> >     src/sys/dev/sysmon: sysmon_envsys_events.c
> > 
> > Log Message:
> > Initialize event's "previous sent state" based on the event monitor type,
> > regardless of sensor type.  Fixes spurious "device: normal state on
> > 'sensor-name' messages (reported by ad@) which interfere with sysinst.
> 
> This breaks the build:
> 
> /src/sys/dev/sysmon/sysmon_envsys_events.c: In function 'sme_event_register':
> /src/sys/dev/sysmon/sysmon_envsys_events.c:254: error: 'realcrittype' 
> undeclared (first use in this function)
> /src/sys/dev/sysmon/sysmon_envsys_events.c:254: error: (Each undeclared 
> identifier is reported only once
> /src/sys/dev/sysmon/sysmon_envsys_events.c:254: error: for each function it 
> appears in.)
> 
> > To generate a diff of this commit:
> > cvs rdiff -r1.60 -r1.61 src/sys/dev/sysmon/sysmon_envsys_events.c

And should the panic, which you added in your change, be protected with a ifdef 
DIAGNOSTIC?

+       case PENVSYS_EVENT_STATE_CHANGED:
+               if (edata->units == ENVSYS_BATTERY_CAPACITY)
+                       see->see_evsent = ENVSYS_BATTERY_CAPACITY_NORMAL;
+               else if (edata->units == ENVSYS_DRIVE)
+                       see->see_evsent = ENVSYS_DRIVE_EMPTY;
+               else
+                       panic("%s: bad units for "
+                             "PENVSYS_EVENT_STATE_CHANGED", __func__);
+               break;

Bernd



Home | Main Index | Thread Index | Old Index