From: Michael Tremer Date: Thu, 21 Aug 2014 18:30:42 +0000 (+0200) Subject: installer: When there is only one disk, fix automatic selection X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ee43f517e88cf0f152e9ac020da5d2a0130f194b;p=people%2Fms%2Fipfire-2.x.git installer: When there is only one disk, fix automatic selection --- diff --git a/src/installer/hw.c b/src/installer/hw.c index ca3b430958..a3e5e59ba6 100644 --- a/src/installer/hw.c +++ b/src/installer/hw.c @@ -307,7 +307,7 @@ struct hw_disk** hw_select_disks(struct hw_disk** disks, int* selection) { unsigned int num_disks = hw_count_disks(disks); for (unsigned int i = 0; i < num_disks; i++) { - if (selection && selection[i]) { + if (!selection || selection[i]) { struct hw_disk *selected_disk = disks[i]; selected_disk->ref++; diff --git a/src/installer/main.c b/src/installer/main.c index 4a550105db..445426a469 100644 --- a/src/installer/main.c +++ b/src/installer/main.c @@ -464,6 +464,7 @@ int main(int argc, char *argv[]) { // Currently not supported } else { errorbox(_("You disk configuration is currently not supported.")); + fprintf(flog, "Num disks selected: %d\n", num_selected_disks); } if (selected_disks) {