if (memory < 128) {
return 256;
}
- if (memory > 1024) {
+ else if (memory > 1024) {
return 512;
}
- return memory;
+ else {
+ return memory;
+ }
}
long calc_rootsize(long free, long max) {
if (root < 256) {
return 0;
}
- if (root > 2048) {
- root = 2048;
+ else if (root > 2048) {
+ return 2048;
+ }
+ else {
+ return 400;
}
- return root;
}
int main(int argc, char *argv[])
boot_partition = 20; /* in MB */
current_free = maximum_free - boot_partition - swap_file;
- if (current_free < 700) {
- errorbox(ctr[TR_DISK_TOO_SMALL]);
- goto EXIT;
- }
-
root_partition = calc_rootsize(current_free, maximum_free);
if (root_partition == 0) {