summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2019-07-11 07:14:24 +0000
committerMarc Espie <espie@cvs.openbsd.org>2019-07-11 07:14:24 +0000
commitb156989e58922ae4b0f378b5ba621aaf48dbad13 (patch)
tree0c638e4f88461319afdf446c4b55e2eddc1b314e /usr.sbin
parenta814c9856abd6414c57d63b061cb118243e1fbb0 (diff)
move the display of cmd into fatal, and don't say it's a fatal error, it's
already obvious
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/AddDelete.pm4
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgCreate.pm4
-rw-r--r--usr.sbin/pkg_add/OpenBSD/State.pm4
3 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm
index c5247bebeae..e1a43e04809 100644
--- a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm
+++ b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: AddDelete.pm,v 1.86 2019/07/11 07:03:45 espie Exp $
+# $OpenBSD: AddDelete.pm,v 1.87 2019/07/11 07:14:23 espie Exp $
#
# Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org>
#
@@ -136,7 +136,7 @@ sub framework
try {
&$do;
} catch {
- $state->errsay("#1: #2", $state->{cmd}, $_);
+ $state->errsay("#1", $_);
OpenBSD::Handler->reset;
if ($_ =~ m/^Caught SIG(\w+)/o) {
kill $1, $$;
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
index ae1ea255084..4f94b9e4b31 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgCreate.pm,v 1.159 2019/07/11 07:03:45 espie Exp $
+# $OpenBSD: PkgCreate.pm,v 1.160 2019/07/11 07:14:23 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -1702,7 +1702,7 @@ sub parse_and_run
$self->finish_manpages($state, $plist);
}
} catch {
- $state->errsay("#1: #2", $state->{cmd}, $_);
+ $state->errsay("#1", $_);
$rc = 1;
};
return $rc;
diff --git a/usr.sbin/pkg_add/OpenBSD/State.pm b/usr.sbin/pkg_add/OpenBSD/State.pm
index c06b492ebea..6f4172add23 100644
--- a/usr.sbin/pkg_add/OpenBSD/State.pm
+++ b/usr.sbin/pkg_add/OpenBSD/State.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: State.pm,v 1.57 2019/07/09 11:24:09 espie Exp $
+# $OpenBSD: State.pm,v 1.58 2019/07/11 07:14:23 espie Exp $
#
# Copyright (c) 2007-2014 Marc Espie <espie@openbsd.org>
#
@@ -214,7 +214,7 @@ sub _fatal
# the way is to eval { croak @_}; and decide what to do with $@.
delete $SIG{__DIE__};
$self->sync_display;
- croak "Fatal error: ", @_, "\n";
+ croak $self->{cmd}, ": ", @_, "\n";
}
sub fatal