Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/tadpolectl Make sure that the control device can be...
details: https://anonhg.NetBSD.org/src/rev/ab5e336a5e14
branches: trunk
changeset: 482848:ab5e336a5e14
user: jdc <jdc%NetBSD.org@localhost>
date: Wed Feb 23 11:33:58 2000 +0000
description:
Make sure that the control device can be opened.
diffstat:
usr.sbin/tadpolectl/tadpolectl.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r b24f7b1af3c5 -r ab5e336a5e14 usr.sbin/tadpolectl/tadpolectl.c
--- a/usr.sbin/tadpolectl/tadpolectl.c Wed Feb 23 08:31:25 2000 +0000
+++ b/usr.sbin/tadpolectl/tadpolectl.c Wed Feb 23 11:33:58 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tadpolectl.c,v 1.2 1999/12/20 09:51:53 jdc Exp $ */
+/* $NetBSD: tadpolectl.c,v 1.3 2000/02/23 11:33:58 jdc Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -49,6 +49,8 @@
#include <machine/apmvar.h>
#include <machine/tctrl.h>
+#define TCTRL_DEV "/dev/tctrl0"
+
int aflag, nflag, wflag, dev;
#define PROTO(x) int x __P((int, int, int));
@@ -747,7 +749,8 @@
argc -= optind;
argv += optind;
- dev = open("/dev/tctrl0", O_RDONLY, NULL);
+ if ((dev = open(TCTRL_DEV, O_RDONLY, NULL)) == -1)
+ err(1, "%s", TCTRL_DEV);
if (aflag) {
for (j=0; j < NUM_MIBS; j++) {
Home |
Main Index |
Thread Index |
Old Index