Chameleon

Chameleon Commit Details

Date:2010-07-22 13:00:41 (8 years 11 months ago)
Author:Tamás Kosárszky
Commit:195
Parents: 194
Message:Fixed safe mode booting.
Changes:
M/trunk/i386/boot2/drivers.c

File differences

trunk/i386/boot2/drivers.c
258258
259259
260260
261
261
262262
263263
264
265
264
265
266
267
266268
267269
268270
269271
270272
271273
272
274
273275
274276
275277
......
290292
291293
292294
293
294
295295
296
297
296
298297
299298
300299
301
300
302301
303302
304303
// FileLoadMKext
static long
FileLoadMKext( const char * dirSpec )
FileLoadMKext( const char * dirSpec, const char * extDirSpec )
{
long ret, flags, time, time2;
ret = GetFileInfo(dirSpec, "Extensions.mkext", &flags, &time);
char altDirSpec[512];
sprintf (altDirSpec, "%s%s", dirSpec, extDirSpec);
ret = GetFileInfo(altDirSpec, "Extensions.mkext", &flags, &time);
if ((ret == 0) && ((flags & kFileTypeMask) == kFileTypeFlat))
{
ret = GetFileInfo(dirSpec, "Extensions", &flags, &time2);
if ((ret != 0) || ((flags & kFileTypeMask) != kFileTypeDirectory) ||
(((gBootMode & kBootModeSafe) == 0) && (time == (time2 + 1))))
{
sprintf(gDriverSpec, "%sExtensions.mkext", dirSpec);
sprintf(gDriverSpec, "%sExtensions.mkext", altDirSpec);
verbose("LoadDrivers: Loading from [%s]\n", gDriverSpec);
if (LoadDriverMKext(gDriverSpec) == 0) return 0;
}
if ( !plugin )
{
char altDirSpec[512];
// First try 10.6's path for loading Extensions.mkext.
sprintf(altDirSpec, "%sCaches/com.apple.kext.caches/Startup/", dirSpec);
if (FileLoadMKext(altDirSpec) == 0)
if (FileLoadMKext(dirSpec, "Caches/com.apple.kext.caches/Startup/") == 0)
return 0;
// Next try the legacy path.
else if (FileLoadMKext(dirSpec) == 0)
else if (FileLoadMKext(dirSpec, "") == 0)
return 0;
strcat(dirSpec, "Extensions");

Archive Download the corresponding diff file

Revision: 195