summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMats O Jansson <maja@cvs.openbsd.org>2008-03-23 15:00:30 +0000
committerMats O Jansson <maja@cvs.openbsd.org>2008-03-23 15:00:30 +0000
commitb2e61571095e15787d56c879da7034b2235daf07 (patch)
treee839525ba085fc088454071be1d884c2d6e4def3 /usr.sbin
parentd0794972757ea5443cc958c37698461d47c29851 (diff)
Done mark a disable of a disabled device as an change (and same with enable).
Reported by jj@ a long time ago. -moj
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/config/ukcutil.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/usr.sbin/config/ukcutil.c b/usr.sbin/config/ukcutil.c
index ea2c856840b..ce38166c26a 100644
--- a/usr.sbin/config/ukcutil.c
+++ b/usr.sbin/config/ukcutil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ukcutil.c,v 1.15 2008/03/08 01:23:16 simon Exp $ */
+/* $OpenBSD: ukcutil.c,v 1.16 2008/03/23 15:00:29 maja Exp $ */
/*
* Copyright (c) 1999-2001 Mats O Jansson. All rights reserved.
@@ -25,7 +25,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: ukcutil.c,v 1.15 2008/03/08 01:23:16 simon Exp $";
+static char rcsid[] = "$OpenBSD: ukcutil.c,v 1.16 2008/03/23 15:00:29 maja Exp $";
#endif
#include <sys/types.h>
@@ -604,8 +604,6 @@ disable(int devno)
struct cfdata *cd;
int done = 0;
- ukc_mod_kernel = 1;
-
if (devno <= maxdev) {
cd = get_cfdata(devno);
@@ -628,8 +626,11 @@ disable(int devno)
printf("%3d ", devno);
pdevnam(devno);
- if (done)
+ if (done) {
printf(" already");
+ } else {
+ ukc_mod_kernel = 1;
+ }
printf(" disabled\n");
return;
@@ -657,8 +658,6 @@ enable(int devno)
struct cfdata *cd;
int done = 0;
- ukc_mod_kernel = 1;
-
if (devno <= maxdev) {
cd = get_cfdata(devno);
@@ -680,8 +679,11 @@ enable(int devno)
printf("%3d ", devno);
pdevnam(devno);
- if (done)
+ if (done) {
printf(" already");
+ } else {
+ ukc_mod_kernel = 1;
+ }
printf(" enabled\n");
return;