summaryrefslogtreecommitdiffstats
path: root/loader2/loader.c
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-02-20 21:28:52 +0000
committerJeremy Katz <katzj@redhat.com>2003-02-20 21:28:52 +0000
commit79881f0172a677e4c5d69d98dcdf00c1596e64e5 (patch)
tree9ed99ef55bed4406024d705cb9693d86b6fee37f /loader2/loader.c
parent791c51c04293f2843c4167da117500b88a801527 (diff)
downloadanaconda-79881f0172a677e4c5d69d98dcdf00c1596e64e5.tar.gz
anaconda-79881f0172a677e4c5d69d98dcdf00c1596e64e5.tar.xz
anaconda-79881f0172a677e4c5d69d98dcdf00c1596e64e5.zip
if you only have one device, don't ask which of multiple ones you want to
use for a driver disk/update disk. noticed by mkj and mikem almost simultaneously.
Diffstat (limited to 'loader2/loader.c')
-rw-r--r--loader2/loader.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/loader2/loader.c b/loader2/loader.c
index 3f4a55eb1..c35597f83 100644
--- a/loader2/loader.c
+++ b/loader2/loader.c
@@ -288,20 +288,27 @@ void loadUpdates(struct knownDevices *kd, int flags) {
rc = getRemovableDevices(&devNames);
if (rc == 0)
return;
- startNewt(flags);
- rc = newtWinMenu(_("Update Disk Source"),
- _("You have multiple devices which could serve "
- "as sources for an update disk. Which would "
- "you like to use?"), 40, 10, 10,
- rc < 6 ? rc : 6, devNames,
- &num, _("OK"), _("Back"), NULL);
-
- if (rc == 2) {
+
+ /* we don't need to ask which to use if they only have one */
+ if (rc == 1) {
+ device = strdup(devNames[0]);
+ free(devNames);
+ } else {
+ startNewt(flags);
+ rc = newtWinMenu(_("Update Disk Source"),
+ _("You have multiple devices which could serve "
+ "as sources for an update disk. Which would "
+ "you like to use?"), 40, 10, 10,
+ rc < 6 ? rc : 6, devNames,
+ &num, _("OK"), _("Back"), NULL);
+
+ if (rc == 2) {
+ free(devNames);
+ return;
+ }
+ device = strdup(devNames[num]);
free(devNames);
- return;
}
- device = strdup(devNames[num]);
- free(devNames);
buf = sdupprintf(_("Insert your updates disk into /dev/%s and press "