- if (current_free < 256) {
- errorbox(ctr[TR_DISK_TOO_SMALL]);
- goto EXIT;
- }
-
- system_partition = current_free;
-
- fprintf(flog, "boot = %ld, swap = %ld, mylog = %ld, root = %ld\n",
- boot_partition, swap_file, system_partition, root_partition);
-
+ fprintf(flog, ", boot = %ld, swap = %ld, mylog = %ld, root = %ld\n",
+ boot_partition, swap_file, system_partition, root_partition);
+ rc = 0;
+
+ if ( (!unattended) && (((disk - (root_partition + swap_file + boot_partition)) < 256 ) && ((disk - (root_partition + boot_partition )) > 256)) ) {
+ rc = newtWinChoice(title, ctr[TR_OK], ctr[TR_CANCEL], ctr[TR_CONTINUE_NO_SWAP]);
+ if (rc == 1){
+ swap_file = 0;
+ system_partition = disk - ( root_partition + swap_file + boot_partition );
+ fprintf(flog, "Changing Swap Size to 0 MB.\n");
+ }
+ else if (rc == 2){
+ fprintf(flog, "Disk is too small.\n");
+ errorbox(ctr[TR_DISK_TOO_SMALL]);goto EXIT;
+ }
+ }
+ else if (disk - (root_partition + swap_file + boot_partition) >= 256) {
+
+ }
+ else {
+ fprintf(flog, "Disk is too small.\n");
+ errorbox(ctr[TR_DISK_TOO_SMALL]);goto EXIT;
+ }
+