From 9dbe10b427c1357ee4a8ffd4f296cee394ff81c9 Mon Sep 17 00:00:00 2001 From: espie Date: Sun, 4 Jan 2015 14:54:12 +0000 Subject: [PATCH] same semantics as old program --- usr.sbin/pkg_add/OpenBSD/FwUpdate.pm | 8 ++++---- 1 file 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 # @@ -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); } -- 2.20.1