summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Peichaer <rpe@cvs.openbsd.org>2015-05-20 19:14:36 +0000
committerRobert Peichaer <rpe@cvs.openbsd.org>2015-05-20 19:14:36 +0000
commit22e67ac05eef93802a7afce6f4bc47794d7a3665 (patch)
tree66b37194a4fa23f28541978c081cbf3b9fb999e4
parent7beeb44defa5c09f2368a8942591c8da4a0a0881 (diff)
Merge the get_drive() function with install_disk(), which is the
only remaining consumer. OK krw@
-rw-r--r--distrib/miniroot/install.sub18
1 files changed, 6 insertions, 12 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index b21e0a746e5..e4c7c26b885 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.840 2015/05/19 20:12:29 rpe Exp $
+# $OpenBSD: install.sub,v 1.841 2015/05/20 19:14:35 rpe Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -254,14 +254,6 @@ get_ifdevs() {
done
}
-# Ask for the device that contains the install/upgrade media.
-get_drive() {
- ask_which "$1" "contains the $MODE media" "$2" "$3"
- [[ $resp == done ]] && return 1
- makedev $resp || return 1
- return 0
-}
-
# Return the device name of the device $1, which may be a disklabel UID.
getdevname() {
local _dev=$1
@@ -1354,9 +1346,11 @@ install_cdrom() {
# installation.
install_disk() {
if ! ask_yn "Is the disk partition already mounted?"; then
- get_drive "disk" '$(bsort $(get_dkdevs))' \
- '$(bsort $(rmel $ROOTDISK $(get_dkdevs)))' || return
- mount_mnt2 $resp || return
+ ask_which "disk" "contains the $MODE media" \
+ '$(bsort $(get_dkdevs))' \
+ '$(bsort $(rmel $ROOTDISK $(get_dkdevs)))'
+ [[ $resp == done ]] && return 1
+ makedev $resp && mount_mnt2 $resp || return
fi
install_mounted_fs