Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/vmstat Remove message when no tape drives found
details: https://anonhg.NetBSD.org/src/rev/58a9aec1e1e7
branches: trunk
changeset: 584154:58a9aec1e1e7
user: blymn <blymn%NetBSD.org@localhost>
date: Sat Sep 10 11:10:21 2005 +0000
description:
Remove message when no tape drives found
diffstat:
usr.bin/vmstat/tpstats.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diffs (31 lines):
diff -r 96b34278dab8 -r 58a9aec1e1e7 usr.bin/vmstat/tpstats.c
--- a/usr.bin/vmstat/tpstats.c Sat Sep 10 10:39:39 2005 +0000
+++ b/usr.bin/vmstat/tpstats.c Sat Sep 10 11:10:21 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tpstats.c,v 1.2 2005/08/08 11:31:48 blymn Exp $ */
+/* $NetBSD: tpstats.c,v 1.3 2005/09/10 11:10:21 blymn Exp $ */
/*
* Copyright 2005 Brett Lymn
@@ -210,9 +210,7 @@
tp_ndrive = size / sizeof(struct tape_sysctl);
- if (size == 0) {
- warnx("No tape drives attached.");
- } else {
+ if (size != 0) {
tapes = (struct tape_sysctl *)malloc(size);
if (tapes == NULL)
errx(1, "Memory allocation failure.");
@@ -232,9 +230,7 @@
if (tp_ndrive < 0)
errx(1, "invalid _tape_count %d.", tp_ndrive);
- else if (tp_ndrive == 0) {
- warnx("No drives attached.");
- } else {
+ else if (tp_ndrive != 0) {
/* Get a pointer to the first disk. */
deref_nl(X_TAPELIST, &tapelist_head,
sizeof(tapelist_head));
Home |
Main Index |
Thread Index |
Old Index