Chameleon

Chameleon Commit Details

Date:2010-02-20 12:13:38 (9 years 5 months ago)
Author:JrCs
Commit:96
Parents: 95
Message:Show useful informations in case of errors
Changes:
M/branches/JrCs/i386/boot2/boot.c
M/branches/JrCs/i386/libsaio/fake_efi.c

File differences

branches/JrCs/i386/libsaio/fake_efi.c
334334
335335
336336
337
338337
339338
340339
......
346345
347346
348347
349
350348
351349
352350
......
361359
362360
363361
364
362
365363
366364
367365
368366
369
370
371367
372368
373369
*/
static uuid_t* getSystemID()
{
bool pause = FALSE;
int len;
const char* StrSystemId = NULL;
uuid_t* SystemId = NULL;
SystemId = newUUIDFromString(StrSystemId);
if (SystemId == NULL) {
error("Error: invalid SystemID '%s'\n", StrSystemId);
pause = TRUE;
}
}
// if(!ret) // no bios dmi UUID available, set a fixed value for system-id
SystemId = (uuid_t*) &SYSTEM_ID;
getStringFromUUID(*SystemId, UUIDstr);
error("Using a fixed SystemID: '%s'\n", UUIDstr);
warning("Using a fixed SystemID: '%s'\n", UUIDstr);
//
// verbose("Customizing SystemID with : %s\n", getStringFromUUID(ret)); // apply a nice formatting to the displayed output
}
if (pause) getc();
return SystemId;
}
branches/JrCs/i386/boot2/boot.c
138138
139139
140140
141
142
141
142
143
143144
144145
145146
......
151152
152153
153154
155
156
154157
155158
156159
......
162165
163166
164167
168
169
165170
166
167
168
171
172
173
174
175
169176
170177
171
178
172179
173
174
175180
176181
177182
......
182187
183188
184189
185
186
187
190
188191
189192
190193
static int ExecKernel(void *binary)
{
entry_t kernelEntry;
int ret;
entry_t kernelEntry;
int ret;
bool waitBeforeBoot = FALSE;
bootArgs->kaddr = bootArgs->ksize = 0;
if ( ret != 0 )
return ret;
getBoolForKey(kWaitForKeypressKey, &waitBeforeBoot, &bootInfo->bootConfig);
// Reserve space for boot args
reserveKernBootStruct();
clearActivityIndicator();
setupFakeEfi();
if (gErrors) {
printf("Errors encountered while starting up the computer.\n");
printf("Pausing %d seconds...\n", kBootErrorTimeout);
sleep(kBootErrorTimeout);
warning("Errors encountered while starting up the computer.\n");
if (!waitBeforeBoot) {
printf("Pausing %d seconds...\n", kBootErrorTimeout);
sleep(kBootErrorTimeout);
}
}
setupFakeEfi();
verbose("Starting Darwin %s arch:%s\n", gMacOSVersion, ( archCpuType == CPU_TYPE_I386 ) ? "x86" : "x86_64");
verbose("Starting Darwin %s\n",( archCpuType == CPU_TYPE_I386 ) ? "x86" : "x86_64");
// Cleanup the PXE base code.
if ( (gBootFileType == kNetworkDeviceType) && gUnloadPXEOnExit ) {
}
}
bool dummyVal;
if (getBoolForKey(kWaitForKeypressKey, &dummyVal, &bootInfo->bootConfig) && dummyVal)
if (waitBeforeBoot)
{
printf("Press any key to continue...");
getc();

Archive Download the corresponding diff file

Revision: 96