Index: branches/ErmaC/Enoch/i386/libsaio/xml.c =================================================================== --- branches/ErmaC/Enoch/i386/libsaio/xml.c (revision 2705) +++ branches/ErmaC/Enoch/i386/libsaio/xml.c (revision 2706) @@ -276,10 +276,10 @@ #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 */ @@ -396,8 +396,8 @@ 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))) @@ -822,7 +822,7 @@ { val += 2; while(*val) - { + { if ((*val >= '0' && *val <= '9')) // 0 - 9 { integer = (integer * 16) + (*val++ - '0'); Index: branches/ErmaC/Enoch/i386/libsaio/sys.c =================================================================== --- branches/ErmaC/Enoch/i386/libsaio/sys.c (revision 2705) +++ branches/ErmaC/Enoch/i386/libsaio/sys.c (revision 2706) @@ -82,8 +82,8 @@ #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; @@ -970,7 +970,7 @@ 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; @@ -995,7 +995,7 @@ 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 @@ -1029,7 +1029,7 @@ 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 @@ -1039,7 +1039,7 @@ 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) @@ -1141,7 +1141,7 @@ } 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 Index: branches/ErmaC/Enoch/i386/libsaio/disk.c =================================================================== --- branches/ErmaC/Enoch/i386/libsaio/disk.c (revision 2705) +++ branches/ErmaC/Enoch/i386/libsaio/disk.c (revision 2706) @@ -569,6 +569,7 @@ const void *probeBuffer = malloc(PROBEFS_SIZE); if (probeBuffer == NULL) { + verbose("\t[probeFileSystem] Error: can't alloc memory for probe buffer.\n"); goto exit; } @@ -577,6 +578,7 @@ if (error) { + verbose("\t[probeFileSystem] Error: can't read from device=%02Xh.\n", biosdev); goto exit; } @@ -955,6 +957,8 @@ struct driveInfo di; boot_drive_info_t *dp; + verbose("\tAttempting to scan FDISK boot volumes [biosdev=%02Xh]:\n", biosdev); + /* Initialize disk info */ if (getDriveInfo(biosdev, &di) != 0) @@ -1255,6 +1259,9 @@ struct Block0 *block0_p; unsigned int blksize; unsigned int factor; + + verbose("\tAttempting to scan APM boot volumes [biosdev=%02Xh]:\n", biosdev); + void *buffer = malloc(BPS); if (!buffer) @@ -1382,6 +1389,8 @@ 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); @@ -1412,6 +1421,7 @@ // 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; } @@ -1471,7 +1481,7 @@ UInt32 gptCheck = 0; UInt32 gptCount = 0; UInt32 gptID = 0; - gpt_ent *gptMap = 0; + gpt_ent *gptMap = NULL; UInt32 gptSize = 0; gptBlock = OSSwapLittleToHostInt64(headerMap->hdr_lba_table); @@ -1795,7 +1805,7 @@ // if ( YOSEMITE ){} -// if ( GALA ){} +// if ( ELCAPITAN ){} } Index: branches/ErmaC/Enoch/i386/libsaio/biosfn.c =================================================================== --- branches/ErmaC/Enoch/i386/libsaio/biosfn.c (revision 2705) +++ branches/ErmaC/Enoch/i386/libsaio/biosfn.c (revision 2706) @@ -44,7 +44,7 @@ #include "libsaio.h" -#ifndef DEBUG_MEMRANGE +#ifndef MEMRANGE #define MEMRANGE 1 #endif Index: branches/ErmaC/Enoch/i386/libsaio/fake_efi.c =================================================================== --- branches/ErmaC/Enoch/i386/libsaio/fake_efi.c (revision 2705) +++ branches/ErmaC/Enoch/i386/libsaio/fake_efi.c (revision 2706) @@ -730,7 +730,7 @@ { Node *chosenNode; chosenNode = DT__FindNode("/chosen", false); - if (chosenNode == 0) + if (chosenNode == NULL) { stop("setupChosenNode: Couldn't get '/chosen' node"); } @@ -754,7 +754,7 @@ 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 @@ -768,7 +768,7 @@ #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;