summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2015-01-04 14:54:13 +0000
committerMarc Espie <espie@cvs.openbsd.org>2015-01-04 14:54:13 +0000
commit6cf828178d6459516e6f30f9c02f0fa5d25d09fb (patch)
treed14bb7373b52365bf8c1353e1b8ee033004c8286 /usr.sbin/pkg_add/OpenBSD
parentf1bdf00291fb39d14b2282cc92c760010baf062d (diff)
same semantics as old program
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/FwUpdate.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/FwUpdate.pm b/usr.sbin/pkg_add/OpenBSD/FwUpdate.pm
index d644885c229..0ac99e28d75 100644
--- a/usr.sbin/pkg_add/OpenBSD/FwUpdate.pm
+++ b/usr.sbin/pkg_add/OpenBSD/FwUpdate.pm
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: FwUpdate.pm,v 1.4 2015/01/04 14:48:19 espie Exp $
+# $OpenBSD: FwUpdate.pm,v 1.5 2015/01/04 14:54:12 espie Exp $
#
# Copyright (c) 2014 Marc Espie <espie@openbsd.org>
#
@@ -227,12 +227,12 @@ sub process_parameters
if (@ARGV == 0) {
if ($state->opt('d')) {
for my $driver ($state->installed_drivers) {
- if (!$state->is_needed($driver)) {
+ if ($state->opt('a') ||
+ !$state->is_needed($driver)) {
$self->to_remove($state, $driver);
}
}
- }
- if ($state->opt('a') || !$state->opt('d')) {
+ } else {
for my $driver ($state->machine_drivers) {
$self->to_add_or_update($state, $driver);
}