Index: branches/ErmaC/Enoch/i386/libsaio/smbios.c =================================================================== --- branches/ErmaC/Enoch/i386/libsaio/smbios.c (revision 2693) +++ branches/ErmaC/Enoch/i386/libsaio/smbios.c (revision 2694) @@ -1276,10 +1276,11 @@ { uint8_t *ptr = (uint8_t *)neweps->dmi.tableAddress; SMBStructHeader *structHeader = (SMBStructHeader *)ptr; + uint8_t *ret = NULL; int i, isZero, isOnes; uint8_t fixedUUID[UUID_LEN] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF}; const char *sysId = getStringForKey(kSMBSystemInformationUUIDKey, SMBPlist); // try to get user's uuid from smbios.plist - uint8_t *ret = (uint8_t *)getUUIDFromString(sysId); // convert user's uuid from string + ret = (uint8_t *)getUUIDFromString(sysId); // convert user's uuid from string for (;(structHeader->type != kSMBTypeSystemInformation);) // find System Information Table (Type 1) in patched SMBIOS { Index: branches/ErmaC/Enoch/i386/libsaio/convert.c =================================================================== --- branches/ErmaC/Enoch/i386/libsaio/convert.c (revision 2693) +++ branches/ErmaC/Enoch/i386/libsaio/convert.c (revision 2694) @@ -11,7 +11,7 @@ /* ======================================================= */ /** Transform a 16 bytes hexadecimal value UUID to a string */ -const char *getStringFromUUID(const EFI_CHAR8 *eUUID) +const char *getStringFromUUID(const uint8_t *eUUID) { static char msg[UUID_LEN*2 + 8] = ""; if (!eUUID) return ""; @@ -197,26 +197,3 @@ } /* ======================================================= */ - -// FIXME: can't use my original code here, -// Ironically, trying to reuse convertHexStr2Binary() would RESET the system! -/* -static EFI_CHAR8 *getUUIDFromString2(const char * szInUUID) -{ - char szUUID[UUID_LEN+1], *p=szUUID; - int size=0; - void* ret; - - if (!szInUUID || strlen(szInUUID) to valid UUID.\n", szUUID); - return (EFI_CHAR8*) 0; - } - return (EFI_CHAR8 *) ret; // new allocated buffer containing the converted string to bin -} -*/ Index: branches/ErmaC/Enoch/i386/libsaio/saio_types.h =================================================================== --- branches/ErmaC/Enoch/i386/libsaio/saio_types.h (revision 2693) +++ branches/ErmaC/Enoch/i386/libsaio/saio_types.h (revision 2694) @@ -103,7 +103,7 @@ unsigned char dev_path[16]; unsigned char reserved3; unsigned char checksum; - } params; + } params __attribute__((packed)); struct drive_dpte { @@ -122,7 +122,7 @@ unsigned short reserved; unsigned char revision; unsigned char checksum; - } dpte; + } dpte __attribute__((packed)); } __attribute__((packed)); typedef struct boot_drive_info boot_drive_info_t; Index: branches/ErmaC/Enoch/i386/libsaio/convert.h =================================================================== --- branches/ErmaC/Enoch/i386/libsaio/convert.h (revision 2693) +++ branches/ErmaC/Enoch/i386/libsaio/convert.h (revision 2694) @@ -11,7 +11,7 @@ #define UUID_LEN 16 -const char *getStringFromUUID(const EFI_CHAR8* uuid); +const char *getStringFromUUID(const uint8_t *uuid); EFI_CHAR8 *getUUIDFromString(const char *source); void *convertHexStr2Binary(const char *hexStr, int *outLength); uint32_t ascii_hex_to_int(char *buff);