Chameleon

Chameleon Commit Details

Date:2014-11-01 22:31:04 (4 years 7 months ago)
Author:ErmaC
Commit:2460
Parents: 2459
Message:Merged proposed patch by N3 (Boot from vanilla Recovery HD, Installation DMG)
Changes:
M/branches/ErmaC/Enoch/CHANGES
M/branches/ErmaC/Enoch/i386/libsaio/stringTable.c
M/branches/ErmaC/Enoch/i386/boot2/boot.c
M/branches/ErmaC/Enoch/i386/libsaio/disk.c

File differences

branches/ErmaC/Enoch/i386/libsaio/disk.c
15761576
15771577
15781578
1579
1579
15801580
15811581
15821582
1583
15831584
15841585
1585
1586
1587
15861588
1587
1589
15881590
15891591
15901592
1591
1593
15921594
15931595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
15941616
15951617
15961618
......
16341656
16351657
16361658
1637
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
16381672
16391673
16401674
config_file_t systemVersion;
char dirSpec[512];
sprintf(dirSpec, "hd(%d,%d)/System/Library/CoreServices/SystemVersion.plist", BIOS_DEV_UNIT(bvr), bvr->part_no);
sprintf(dirSpec, "hd(%d,%d)/com.apple.recovery.boot/SystemVersion.plist", BIOS_DEV_UNIT(bvr), bvr->part_no);
if (!loadConfigFile(dirSpec, &systemVersion))
{
bvr->OSisInstaller = true;
valid = true;
}
else
if (!valid)
{
sprintf(dirSpec, "hd(%d,%d)/System/Library/CoreServices/ServerVersion.plist", BIOS_DEV_UNIT(bvr), bvr->part_no);
sprintf(dirSpec, "hd(%d,%d)/System/Library/CoreServices/SystemVersion.plist", BIOS_DEV_UNIT(bvr), bvr->part_no);
if (!loadConfigFile(dirSpec, &systemVersion))
{
bvr->OSisServer = true;
bvr->OSisInstaller = true;
valid = true;
}
else
{
sprintf(dirSpec, "hd(%d,%d)/System/Library/CoreServices/ServerVersion.plist", BIOS_DEV_UNIT(bvr), bvr->part_no);
if (!loadConfigFile(dirSpec, &systemVersion))
{
bvr->OSisServer = true;
valid = true;
}
/*else
{
sprintf(dirSpec, "hd(%d,%d)/.IAProductInfo", BIOS_DEV_UNIT(bvr), bvr->part_no);
if (!loadConfigFile(dirSpec, &systemVersion))
{
}
}
*/
}
}
if (valid)
}
else
{
close(fh);
sprintf(dirSpec, "hd(%d,%d)/.IAPhysicalMedia", BIOS_DEV_UNIT(bvr), bvr->part_no);
fh = open(dirSpec, 0);
if (fh >= 0)
{
valid = true;
bvr->OSisInstaller = true;
strcpy(bvr->OSVersion, "10.9"); // 10.9 +
}
else
{
close(fh);
}
}
}
return valid;
branches/ErmaC/Enoch/i386/libsaio/stringTable.c
614614
615615
616616
617
617618
619
618620
621
619622
620623
621624
int loadSystemConfig(config_file_t *config)
{
char *dirspec[] = {
"/Mac OS X Install Data/com.apple.Boot.plist",
"/OS X Install Data/com.apple.Boot.plist",
"/.IABootFiles/com.apple.Boot.plist", // OS X Installer
"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist",
"/com.apple.recovery.boot/com.apple.Boot.plist" // OS X Recovery
};
int i, fd, count, ret=-1;
branches/ErmaC/Enoch/i386/boot2/boot.c
310310
311311
312312
313
313
314314
315315
316316
317317
318
318
319319
320320
321321
322322
323
323
324324
325325
326
326
327327
328
328
329
330
331
332
333
334
329335
330336
331337
// If boot from a boot helper partition check the kernel cache file on it
if (gBootVolume->flags & kBVFlagBooter)
{
snprintf(kernelCachePath, sizeof(kernelCachePath), "com.apple.boot.P%s", kernelCacheFile);
snprintf(kernelCachePath, sizeof(kernelCachePath), "/com.apple.boot.P/%s", kernelCacheFile);
ret = GetFileInfo(NULL, kernelCachePath, &flags, &cachetime);
if ((ret == -1) || ((flags & kFileTypeMask) != kFileTypeFlat))
{
snprintf(kernelCachePath, sizeof(kernelCachePath), "com.apple.boot.R%s", kernelCacheFile);
snprintf(kernelCachePath, sizeof(kernelCachePath), "/com.apple.boot.R/%s", kernelCacheFile);
ret = GetFileInfo(NULL, kernelCachePath, &flags, &cachetime);
if ((ret == -1) || ((flags & kFileTypeMask) != kFileTypeFlat))
{
snprintf(kernelCachePath, sizeof(kernelCachePath), "com.apple.boot.S%s", kernelCacheFile);
snprintf(kernelCachePath, sizeof(kernelCachePath), "/com.apple.boot.S/%s", kernelCacheFile);
ret = GetFileInfo(NULL, kernelCachePath, &flags, &cachetime);
if ((flags & kFileTypeMask) != kFileTypeFlat)
if ((ret == -1) || ((flags & kFileTypeMask) != kFileTypeFlat))
{
ret = -1;
snprintf(kernelCachePath, sizeof(kernelCachePath), "/com.apple.recovery.boot/kernelcache", kernelCacheFile);
ret = GetFileInfo(NULL, kernelCachePath, &flags, &cachetime);
if ((flags & kFileTypeMask) != kFileTypeFlat)
{
ret = -1;
}
}
}
}
branches/ErmaC/Enoch/CHANGES
1
12
23
34
- ErmaC : Merged proposed patch by N3 (Boot from vanilla Recovery HD, Installation DMG)
- bitshoveler : Make 'buffer' arg to aml_add_buffer 'const char *', was just 'char *' (aml_generator)
- bitshoveler : Fix "sed: RE error: illegal byte sequence", which turns out to be from feeding sed a TIFF file (buildpkg.sh)
- bitshoveler : Remove "-x" option from "ld" command which breaks build under newer Xcode versions (MakeInc.dir)

Archive Download the corresponding diff file

Revision: 2460