Chameleon

Chameleon Commit Details

Date:2015-06-09 20:07:16 (5 years 5 months ago)
Author:ErmaC
Commit:2706
Parents: 2705
Message:Typo
Changes:
M/branches/ErmaC/Enoch/i386/libsaio/sys.c
M/branches/ErmaC/Enoch/i386/libsaio/biosfn.c
M/branches/ErmaC/Enoch/i386/libsaio/xml.c
M/branches/ErmaC/Enoch/i386/libsaio/fake_efi.c
M/branches/ErmaC/Enoch/i386/libsaio/disk.c

File differences

branches/ErmaC/Enoch/i386/libsaio/xml.c
276276
277277
278278
279
280
281
282
279
280
281
282
283283
284284
285285
......
396396
397397
398398
399
400
399
400
401401
402402
403403
......
822822
823823
824824
825
825
826826
827827
828828
#define _e(str,c) {str,sizeof(str)-1,c}
const XMLEntity ents[] = {
_e("quot;",'"'), // double quotation mark
_e("apos;",'\''), // ampersand
_e("lt;", '<'), // apostrophe (apostrophe-quote)
_e("gt;", '>'), // less-than sign
_e("amp;", '&') // greater-than sign
_e("apos;",'\''), // apostrophe (apostrophe-quote)
_e("lt;", '<'), // less-than sign
_e("gt;", '>'), // greater-than sign
_e("amp;", '&') // ampersand
};
/* Function for basic XML character entities parsing */
if (!strncmp(tagName, kXMLTagPList, 6))
{
length = 0;
// just a header; nothing to parse
// return-via-reference tag should be left alone
// just a header; nothing to parse
// return-via-reference tag should be left alone
}
/***** dict ****/
else if (!strncmp(tagName, kXMLTagDict, sizeof(kXMLTagDict)))
{
val += 2;
while(*val)
{
{
if ((*val >= '0' && *val <= '9'))// 0 - 9
{
integer = (integer * 16) + (*val++ - '0');
branches/ErmaC/Enoch/i386/libsaio/sys.c
8282
8383
8484
85
86
85
86
8787
8888
8989
......
970970
971971
972972
973
973
974974
975975
976976
......
995995
996996
997997
998
998
999999
10001000
10011001
......
10291029
10301030
10311031
1032
1032
10331033
10341034
10351035
......
10391039
10401040
10411041
1042
1042
10431043
10441044
10451045
......
11411141
11421142
11431143
1144
1144
11451145
11461146
11471147
#define DBG(x...)msglog(x)
#endif
#ifndef DEBUG_FEATURE_LAST_BOOT
#define DEBUG_FEATURE_LAST_BOOT 0 // AllocateKernelMemory error with feature from 2562
#ifndef FEATURE_LAST_BOOT
#define FEATURE_LAST_BOOT 0 // AllocateKernelMemory error with feature from 2562
#endif
extern int multiboot_partition;
BVRef bvr1= NULL;
BVRef bvr2= NULL;
#if DEBUG_FEATURE_LAST_BOOT
#if FEATURE_LAST_BOOT
char dirSpec[]= "hd(%d,%d)/";
char fileSpec[]= "Volumes";
char *label;
if ( (bvr->part_no == multiboot_partition) && (bvr->biosdev == gBIOSDev) )
{
#if DEBUG_FEATURE_LAST_BOOT
#if FEATURE_LAST_BOOT
label = bvr->label[0] ? bvr->label : (bvr->altlabel[0] ? bvr->altlabel : (bvr->name[0] ? bvr->name : "Untitled"));
DBG("Multiboot partition set: hd(%d,%d) '%s'\n", BIOS_DEV_UNIT(bvr), bvr->part_no, label);
#endif
if (matchVolumeToString(bvr, val, false))
{
free(val);
#if DEBUG_FEATURE_LAST_BOOT
#if FEATURE_LAST_BOOT
label = bvr->label[0] ? bvr->label : (bvr->altlabel[0] ? bvr->altlabel : (bvr->name[0] ? bvr->name : "Untitled"));
DBG("User default partition set: hd(%d,%d) '%s'\n", BIOS_DEV_UNIT(bvr), bvr->part_no, label);
#endif
free(val);
}
#if DEBUG_FEATURE_LAST_BOOT // the above code cause "AllocateKernelMemory error"
#if FEATURE_LAST_BOOT // the above code cause "AllocateKernelMemory error"
// Bungo: select last booted partition as the boot volume
// TODO: support other OSes (foreign boot)
for (bvr = chain; bvr; bvr = bvr->next)
}
bvr = bvr2 ? bvr2 : (bvr1 ? bvr1 : chain);
#if DEBUG_FEATURE_LAST_BOOT
#if FEATURE_LAST_BOOT
label = bvr->label[0] ? bvr->label : (bvr->altlabel[0] ? bvr->altlabel : (bvr->name[0] ? bvr->name : "Untitled"));
DBG("Default partition set: hd(%d,%d) '%s'\n", BIOS_DEV_UNIT(bvr), bvr->part_no, label);
#endif
branches/ErmaC/Enoch/i386/libsaio/disk.c
569569
570570
571571
572
572573
573574
574575
......
577578
578579
579580
581
580582
581583
582584
......
955957
956958
957959
960
961
958962
959963
960964
......
12551259
12561260
12571261
1262
1263
1264
12581265
12591266
12601267
......
13821389
13831390
13841391
1392
1393
13851394
13861395
13871396
......
14121421
14131422
14141423
1424
14151425
14161426
14171427
......
14711481
14721482
14731483
1474
1484
14751485
14761486
14771487
......
17951805
17961806
17971807
1798
1808
17991809
18001810
18011811
const void *probeBuffer = malloc(PROBEFS_SIZE);
if (probeBuffer == NULL)
{
verbose("\t[probeFileSystem] Error: can't alloc memory for probe buffer.\n");
goto exit;
}
if (error)
{
verbose("\t[probeFileSystem] Error: can't read from device=%02Xh.\n", biosdev);
goto exit;
}
struct driveInfodi;
boot_drive_info_t*dp;
verbose("\tAttempting to scan FDISK boot volumes [biosdev=%02Xh]:\n", biosdev);
/* Initialize disk info */
if (getDriveInfo(biosdev, &di) != 0)
struct Block0*block0_p;
unsigned intblksize;
unsigned intfactor;
verbose("\tAttempting to scan APM boot volumes [biosdev=%02Xh]:\n", biosdev);
void*buffer = malloc(BPS);
if (!buffer)
static BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr)
{
verbose("\tAttempting to scan GPT boot volumes [biosdev=%02Xh]:\n", biosdev);
struct DiskBVMap *map = NULL;
void *buffer = malloc(BPS);
// means the FDISK code will wind up parsing it.
if ( fdiskID )
{
verbose("\t[diskScanGPTBootVolumes] Error! Two GPT protective MBR (fdisk=0xEE) partitions found on same device, skipping.\n");
goto scanErr;
}
UInt32gptCheck= 0;
UInt32gptCount= 0;
UInt32gptID= 0;
gpt_ent*gptMap= 0;
gpt_ent*gptMap= NULL;
UInt32gptSize= 0;
gptBlock = OSSwapLittleToHostInt64(headerMap->hdr_lba_table);
//if ( YOSEMITE ){}
//if ( GALA ){}
//if ( ELCAPITAN ){}
}
branches/ErmaC/Enoch/i386/libsaio/biosfn.c
4444
4545
4646
47
47
4848
4949
5050
#include "libsaio.h"
#ifndef DEBUG_MEMRANGE
#ifndef MEMRANGE
#define MEMRANGE 1
#endif
branches/ErmaC/Enoch/i386/libsaio/fake_efi.c
730730
731731
732732
733
733
734734
735735
736736
......
754754
755755
756756
757
757
758758
759759
760760
......
768768
769769
770770
771
771
772772
773773
774774
{
Node *chosenNode;
chosenNode = DT__FindNode("/chosen", false);
if (chosenNode == 0)
if (chosenNode == NULL)
{
stop("setupChosenNode: Couldn't get '/chosen' node");
}
DT__AddProperty(chosenNode, MACHINE_SIG_PROP, sizeof(Platform.HWSignature), (EFI_UINT32 *)&Platform.HWSignature);
if (MacOSVerCurrent >= MacOSVer2Int("10.10"))
if ( YOSEMITE || ELCAPITAN )
{
//
// Pike R. Alpha - 12 October 2014
#else
EFI_UINT32 randomValue, tempValue, cpuTick;
EFI_UINT32 ecx, esi, edi = 0;
EFI_UINT32 rcx, rdx, rsi, rdi;
EFI_UINT64 rcx, rdx, rsi, rdi;
randomValue = tempValue = ecx = esi = edi = 0;// xor%ecx,%ecx
cpuTick = rcx = rdx = rsi = rdi = 0;

Archive Download the corresponding diff file

Revision: 2706