Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/envstat in -r mode, if given "-s sensor_list", only...
details: https://anonhg.NetBSD.org/src/rev/99ad8f667d87
branches: trunk
changeset: 559628:99ad8f667d87
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Mar 21 10:52:26 2004 +0000
description:
in -r mode, if given "-s sensor_list", only list the given sensors instead
of always listing them all
diffstat:
usr.sbin/envstat/envstat.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (37 lines):
diff -r 2086ef4e51cc -r 99ad8f667d87 usr.sbin/envstat/envstat.c
--- a/usr.sbin/envstat/envstat.c Sun Mar 21 10:51:16 2004 +0000
+++ b/usr.sbin/envstat/envstat.c Sun Mar 21 10:52:26 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: envstat.c,v 1.17 2004/02/02 10:36:19 soren Exp $ */
+/* $NetBSD: envstat.c,v 1.18 2004/03/21 10:52:26 mrg Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: envstat.c,v 1.17 2004/02/02 10:36:19 soren Exp $");
+__RCSID("$NetBSD: envstat.c,v 1.18 2004/03/21 10:52:26 mrg Exp $");
#endif
#include <fcntl.h>
@@ -89,7 +89,7 @@
while ((c = getopt(argc, argv, "cfi:ln:rs:w:r")) != -1) {
switch(c) {
case 'r':
- rflag= 1;
+ rflag = 1;
break;
case 'i': /* wait time between displays */
interval = atoi(optarg);
@@ -163,6 +163,9 @@
int i;
for (i = 0 ; i < ns ; i++) {
+ if (cetds[i] == 0)
+ continue;
+
if ((etds[i].validflags & ENVSYS_FCURVALID) == 0)
continue;
Home |
Main Index |
Thread Index |
Old Index