#define MIN_REGION_SECTORS (1024*1024*min_region_mb/SECTOR_SIZE)
-#define MAX_REGION_MB 4095
-#define MAX_REGION_SECTORS (1024*(1024/SECTOR_SIZE)*MAX_REGION_MB)
-
#define arraysize(a) (sizeof(a) / sizeof((a)[0]))
#define arraylimit(a) ((a) + arraysize(a))
if (curdev->rdev != DEV_C0D0) curdev= firstdev;
}
-void getdevices()
+void getdevices(void)
/* Get all block devices from /dev that look interesting. */
{
DIR *d;
{
int ex, changed = 0, i;
struct part_entry *newpart;
- if(reg->is_used_part && reg->used_part.size > MAX_REGION_SECTORS) {
- reg->used_part.size = MAX_REGION_SECTORS;
- changed = 1;
- cylinderalign(reg);
- }
if(!reg->is_used_part) {
ex = reg->free_sec_last - reg->free_sec_start + 1;
- if(ex > MAX_REGION_SECTORS) {
- reg->free_sec_last -= ex - MAX_REGION_SECTORS;
- changed = 1;
- cylinderalign(reg);
- }
if(made_new) *made_new = 1;
} else if(made_new) *made_new = 0;
if(!reg->is_used_part) {