Die Updates fein gemacht...

Min. Swapsize := 0.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@841 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
ms
2007-08-26 22:17:50 +00:00
parent a5997a4c5f
commit 9cd0c7fd0e
5 changed files with 45 additions and 35 deletions

View File

@@ -374,15 +374,16 @@ int main(int argc, char *argv[])
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 + 32 )) > 256)) ) {
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 != 0){
swap_file = 32;
if (rc == 1){
swap_file = 0;
system_partition = disk - ( root_partition + swap_file + boot_partition );
fprintf(flog, "Changing Swap Size to 32 MB.\n");
fprintf(flog, "Changing Swap Size to 0 MB.\n");
}
else {
else if (rc == 2){
fprintf(flog, "Disk is too small.\n");
errorbox(ctr[TR_DISK_TOO_SMALL]);goto EXIT;
}
@@ -398,13 +399,13 @@ int main(int argc, char *argv[])
handle = fopen("/tmp/partitiontable", "w");
/* Make swapfile */
if (swap_file) {
fprintf(handle, ",%ld,L,*\n,%ld,S,\n,%ld,L,\n,,L,\n",
boot_partition, swap_file, root_partition);
} else {
fprintf(handle, ",%ld,L,*\n,0,0,\n,%ld,L,\n,,L,\n",
boot_partition, root_partition);
}
if (swap_file) {
fprintf(handle, ",%ld,L,*\n,%ld,S,\n,%ld,L,\n,,L,\n",
boot_partition, swap_file, root_partition);
} else {
fprintf(handle, ",%ld,L,*\n,0,0,\n,%ld,L,\n,,L,\n",
boot_partition, root_partition);
}
fclose(handle);