]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
installer: When there is only one disk, fix automatic selection
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 21 Aug 2014 18:30:42 +0000 (20:30 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 21 Aug 2014 18:30:42 +0000 (20:30 +0200)
src/installer/hw.c
src/installer/main.c

index ca3b430958f1080065d0c1735abcf95701561a19..a3e5e59ba6bda296aef757a723544788748170ed 100644 (file)
@@ -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++;
 
index 4a550105dbd4c9d37ea8b343d4f66d168dcc9477..445426a4692d2a2d337b5464c3af42f6329e9dcb 100644 (file)
@@ -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) {