Don't limit partitions to 4GB.
This commit is contained in:
parent
365e867a88
commit
3b614085c6
@ -63,9 +63,6 @@ int min_region_mb = 500;
|
|||||||
|
|
||||||
#define MIN_REGION_SECTORS (1024*1024*min_region_mb/SECTOR_SIZE)
|
#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 arraysize(a) (sizeof(a) / sizeof((a)[0]))
|
||||||
#define arraylimit(a) ((a) + arraysize(a))
|
#define arraylimit(a) ((a) + arraysize(a))
|
||||||
|
|
||||||
@ -339,7 +336,7 @@ void newdevice(char *name, int scanning, int disk_only)
|
|||||||
if (curdev->rdev != DEV_C0D0) curdev= firstdev;
|
if (curdev->rdev != DEV_C0D0) curdev= firstdev;
|
||||||
}
|
}
|
||||||
|
|
||||||
void getdevices()
|
void getdevices(void)
|
||||||
/* Get all block devices from /dev that look interesting. */
|
/* Get all block devices from /dev that look interesting. */
|
||||||
{
|
{
|
||||||
DIR *d;
|
DIR *d;
|
||||||
@ -2154,18 +2151,8 @@ scribble_region(region_t *reg, struct part_entry **pe, int *made_new)
|
|||||||
{
|
{
|
||||||
int ex, changed = 0, i;
|
int ex, changed = 0, i;
|
||||||
struct part_entry *newpart;
|
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) {
|
if(!reg->is_used_part) {
|
||||||
ex = reg->free_sec_last - reg->free_sec_start + 1;
|
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;
|
if(made_new) *made_new = 1;
|
||||||
} else if(made_new) *made_new = 0;
|
} else if(made_new) *made_new = 0;
|
||||||
if(!reg->is_used_part) {
|
if(!reg->is_used_part) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user