Chameleon

Chameleon Commit Details

Date:2011-07-09 17:50:36 (8 years 10 months ago)
Author:Evan Lojewski
Commit:1137
Parents: 1136
Message:Applies patch in issue #62 to trunk - Adds skip_partno support for multiboot bootloaders.
Changes:
M/trunk/i386/boot2/mboot.c
M/trunk/i386/libsaio/sys.c

File differences

trunk/i386/libsaio/sys.c
7878
7979
8080
81
82
8183
8284
8385
......
842844
843845
844846
847
848
849
845850
846851
847852
extern int multiboot_partition;
extern int multiboot_partition_set;
extern int multiboot_skip_partition;
extern int multiboot_skip_partition_set;
struct devsw {
const char * name;
*/
for ( bvr = chain; bvr; bvr = bvr->next )
{
if (multiboot_skip_partition_set) {
if (bvr->part_no == multiboot_skip_partition) continue;
}
if ( bvr->flags & kBVFlagPrimary && bvr->biosdev == gBIOSDev ) foundPrimary = true;
// zhell -- Undo a regression that was introduced from r491 to 492.
// if gBIOSBootVolume is set already, no change is required
trunk/i386/boot2/mboot.c
1212
1313
1414
15
16
1517
1618
1719
......
414416
415417
416418
417
419
418420
419421
420422
423
424
425
426
427
428
429
430
431
432
433
421434
422435
423436
int multiboot_timeout_set=0;
int multiboot_partition=0;
int multiboot_partition_set=0;
int multiboot_skip_partition=0;
int multiboot_skip_partition_set=0;
// Global multiboot info, if using multiboot.
struct multiboot_info *gMI;
int intVal = strtol(val, &endptr, 0);
if(*val != '\0' && (*endptr == '\0' || *endptr == ' ' || *endptr == '\t'))
{
printf("Default partition overridden to %d with timeout=%s\n", intVal, val);
printf("Default partition overridden to %d with partno=%s\n", intVal, val);
multiboot_partition = intVal;
multiboot_partition_set = 1;
}
}
if(getValueForBootKey(mi->mi_cmdline, "skip_partno", &val, &size))
{
char *endptr;
int intVal = strtol(val, &endptr, 0);
if(*val != '\0' && (*endptr == '\0' || *endptr == ' ' || *endptr == '\t'))
{
printf("Skipping partition %d with skip_partno=%s\n", intVal, val);
multiboot_skip_partition = intVal;
multiboot_skip_partition_set = 1;
}
}
}
if(doSelectDevice)

Archive Download the corresponding diff file

Revision: 1137