Chameleon

Chameleon Commit Details

Date:2013-05-10 18:43:21 (10 years 10 months ago)
Author:ErmaC
Commit:2212
Parents: 2211
Message:Fix menuBVR initialization problem. Credits to Jief Luce
Changes:
M/trunk/i386/boot2/options.c

File differences

trunk/i386/boot2/options.c
189189
190190
191191
192
193
192
193
194194
195195
196196
......
265265
266266
267267
268
268
269269
270270
271271
272272
273273
274274
275
275
276276
277277
278278
......
859859
860860
861861
862
862
863863
864864
865865
......
869869
870870
871871
872
873
874
875
876
877
878
879
880
881
872882
873883
874884
......
10381048
10391049
10401050
1041
1051
10421052
10431053
10441054
......
10611071
10621072
10631073
1064
1074
10651075
10661076
10671077
if (bootArgs->Video.v_display != VGA_TEXT_MODE) {
clearGraphicBootPrompt();
}
execute_hook("ClearArgs", NULL, NULL, NULL, NULL);
execute_hook("ClearArgs", NULL, NULL, NULL, NULL);
}
void addBootArg(const char * argStr)
{
updateGraphicBootPrompt();
}
}
}
break;
default:
if ( key >= ' ' && gBootArgsPtr < gBootArgsEnd)
{
*gBootArgsPtr++ = key;
if( bootArgs->Video.v_display != VGA_TEXT_MODE ) updateGraphicBootPrompt();
else if ( key >= ' ' && key < 0x7f) putchar(key);
}
}
// Associate a menu item for each BVRef.
for (bvr=bvChain, i=gDeviceCount-1, selectIndex=0; bvr; bvr=bvr->next) {
for (bvr=bvChain, i=gDeviceCount-1, selectIndex=-1; bvr; bvr=bvr->next) {
if (bvr->visible) {
getBootVolumeDescription(bvr, menuItems[i].name, sizeof(menuItems[i].name) - 1, true);
menuItems[i].param = (void *) bvr;
i--;
}
}
// Jief : In case the default partition (returned by selectBootVolume) is not in the menu
if ( selectIndex == -1 )
{
selectIndex = 0;
if ( gDeviceCount > 0 )
{
menuBVR = (BVRef)(menuItems[selectIndex].param);
// what happen is bvChain is empty ?
}
}
}
if (bootArgs->Video.v_display != VGA_TEXT_MODE) {
gui.redraw = true;
setVideoMode(GRAPHICS_MODE, 0);
updateVRAM();
updateGraphicBootPrompt();
updateGraphicBootPrompt();
}
}
key = 0;
free(menuItems);
menuItems = NULL;
}
execute_hook("BootOptions", gBootArgs, gBootArgsPtr, NULL, NULL);
execute_hook("BootOptions", gBootArgs, gBootArgsPtr, NULL, NULL);
return 0;
}

Archive Download the corresponding diff file

Revision: 2212