summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/AddDelete.pm
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/AddDelete.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/AddDelete.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm
index 48d3e1c8d66..046f5b7de1c 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.3 2009/11/16 14:42:18 espie Exp $
+# $OpenBSD: AddDelete.pm,v 1.4 2009/11/17 10:17:21 espie Exp $
#
# Copyright (c) 2007-2009 Marc Espie <espie@openbsd.org>
#
@@ -330,6 +330,15 @@ sub choose_location
}
}
+sub confirm
+{
+ my ($state, $prompt, $default) = @_;
+
+ return 0 if !$state->{interactive};
+ require OpenBSD::Interactive;
+ return OpenBSD::Interactive::confirm($prompt, $default);
+}
+
# stub class when no actual progressmeter that still prints out.
package OpenBSD::StubProgress;
sub clear {}