Chameleon

Chameleon Commit Details

Date:2011-07-05 02:07:13 (8 years 4 months ago)
Author:Evan Lojewski
Commit:1111
Parents: 1110
Message:Removed function added accidentaly.
Changes:
M/trunk/i386/boot2/drivers.c

File differences

trunk/i386/boot2/drivers.c
355355
356356
357357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415358
416
417359
418360
419361
return result;
}
long
FileLoadDriver( char * dirSpec, long plugin )
{
long ret, length, flags, time, bundleType;
long long index;
long result = -1;
const char * name;
if ( !plugin )
{
// First try 10.6's path for loading Extensions.mkext.
if (FileLoadMKext(dirSpec, "Caches/com.apple.kext.caches/Startup/") == 0)
return 0;
// Next try the legacy path.
else if (FileLoadMKext(dirSpec, "") == 0)
return 0;
strcat(dirSpec, "Extensions");
}
index = 0;
while (1) {
ret = GetDirEntry(dirSpec, &index, &name, &flags, &time);
if (ret == -1) break;
// Make sure this is a directory.
if ((flags & kFileTypeMask) != kFileTypeDirectory) continue;
// Make sure this is a kext.
length = strlen(name);
if (strcmp(name + length - 5, ".kext")) continue;
// Save the file name.
strcpy(gFileName, name);
// Determine the bundle type.
sprintf(gTempSpec, "%s/%s", dirSpec, gFileName);
ret = GetFileInfo(gTempSpec, "Contents", &flags, &time);
if (ret == 0) bundleType = kCFBundleType2;
else bundleType = kCFBundleType3;
if (!plugin)
sprintf(gDriverSpec, "%s/%s/%sPlugIns", dirSpec, gFileName,
(bundleType == kCFBundleType2) ? "Contents/" : "");
ret = LoadDriverPList(dirSpec, gFileName, bundleType);
if (result != 0)
result = ret;
if (!plugin)
FileLoadDrivers(gDriverSpec, 1);
}
return result;
}
//==========================================================================
//

Archive Download the corresponding diff file

Revision: 1111