Subject: CVS commit: src/sys
To: None <source-changes@NetBSD.org>
From: Juan Romero Pardines <xtraeme@netbsd.org>
List: source-changes
Date: 07/22/2007 18:17:03
Module Name:	src
Committed By:	xtraeme
Date:		Sun Jul 22 18:17:03 UTC 2007

Modified Files:
	src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsysvar.h
	src/sys/sys: envsys.h

Log Message:
Fix the last point reported by yamt in PR kern/36673:

- There must be three mandatory objects in a sensor to be valid and be
  enabled on its dictionary: units, state and desc. If any of these
  objects fails for some reason, its dictionary won't created in the
  array and sensor will be marked with ENVSYS_FNOTVALID in edata->flags.

  That means there won't never be a partial dictionary.

- Mark all invalid sensors and sensors with duplicate description with
  ENVSYS_FNOTVALID and remove ENVSYS_FDUPDESC. The former is the generic
  way to say that a sensor does not obey the rules and must be not
  created.

- sysmon_envsys_createplist: if the array does not contain any object,
  release the array and return the error.

And with all that stuff I can go to holidays and be happy.


To generate a diff of this commit:
cvs rdiff -r1.40 -r1.41 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -r1.10 -r1.11 src/sys/dev/sysmon/sysmon_envsysvar.h
cvs rdiff -r1.13 -r1.14 src/sys/sys/envsys.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.