Module Name: src Committed By: pgoyette Date: Mon Jun 20 22:02:55 UTC 2011
Modified Files: src/sys/dev/ic: cac.c ciss.c mfi.c Log Message: Initialize current value for ENVSYS_DRIVE sensors To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/dev/ic/cac.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/ic/ciss.c cvs rdiff -u -r1.35 -r1.36 src/sys/dev/ic/mfi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/cac.c diff -u src/sys/dev/ic/cac.c:1.52 src/sys/dev/ic/cac.c:1.53 --- src/sys/dev/ic/cac.c:1.52 Mon Jun 20 17:48:45 2011 +++ src/sys/dev/ic/cac.c Mon Jun 20 22:02:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cac.c,v 1.52 2011/06/20 17:48:45 pgoyette Exp $ */ +/* $NetBSD: cac.c,v 1.53 2011/06/20 22:02:55 pgoyette Exp $ */ /*- * Copyright (c) 2000, 2006, 2007 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.52 2011/06/20 17:48:45 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.53 2011/06/20 22:02:55 pgoyette Exp $"); #include "bio.h" @@ -684,6 +684,7 @@ for (i = 0; i < nsensors; i++) { sc->sc_sensor[i].units = ENVSYS_DRIVE; sc->sc_sensor[i].state = ENVSYS_SINVALID; + sc->sc_sensor[i].value_cur = ENVSYS_DRIVE_EMPTY; /* Enable monitoring for drive state changes */ sc->sc_sensor[i].flags |= ENVSYS_FMONSTCHANGED; /* logical drives */ Index: src/sys/dev/ic/ciss.c diff -u src/sys/dev/ic/ciss.c:1.26 src/sys/dev/ic/ciss.c:1.27 --- src/sys/dev/ic/ciss.c:1.26 Mon Jun 20 17:48:45 2011 +++ src/sys/dev/ic/ciss.c Mon Jun 20 22:02:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ciss.c,v 1.26 2011/06/20 17:48:45 pgoyette Exp $ */ +/* $NetBSD: ciss.c,v 1.27 2011/06/20 22:02:55 pgoyette Exp $ */ /* $OpenBSD: ciss.c,v 1.14 2006/03/13 16:02:23 mickey Exp $ */ /* @@ -19,7 +19,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.26 2011/06/20 17:48:45 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.27 2011/06/20 22:02:55 pgoyette Exp $"); #include "bio.h" @@ -1422,6 +1422,7 @@ for (i = 0; i < nsensors; i++) { sc->sc_sensor[i].units = ENVSYS_DRIVE; sc->sc_sensor[i].state = ENVSYS_SINVALID; + sc->sc_sensor[i].value_cur = ENVSYS_DRIVE_EMPTY; /* Enable monitoring for drive state changes */ sc->sc_sensor[i].flags |= ENVSYS_FMONSTCHANGED; /* logical drives */ Index: src/sys/dev/ic/mfi.c diff -u src/sys/dev/ic/mfi.c:1.35 src/sys/dev/ic/mfi.c:1.36 --- src/sys/dev/ic/mfi.c:1.35 Mon Jun 20 17:48:46 2011 +++ src/sys/dev/ic/mfi.c Mon Jun 20 22:02:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mfi.c,v 1.35 2011/06/20 17:48:46 pgoyette Exp $ */ +/* $NetBSD: mfi.c,v 1.36 2011/06/20 22:02:55 pgoyette Exp $ */ /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <ma...@peereboom.us> @@ -17,7 +17,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.35 2011/06/20 17:48:46 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.36 2011/06/20 22:02:55 pgoyette Exp $"); #include "bio.h" @@ -2022,6 +2022,7 @@ for (i = 0; i < nsensors; i++) { sc->sc_sensor[i].units = ENVSYS_DRIVE; sc->sc_sensor[i].state = ENVSYS_SINVALID; + sc->sc_sensor[i].value_cur = ENVSYS_DRIVE_EMPTY; /* Enable monitoring for drive state changes */ sc->sc_sensor[i].flags |= ENVSYS_FMONSTCHANGED; /* logical drives */