Index: trunk/i386/libsaio/ext2fs.c =================================================================== --- trunk/i386/libsaio/ext2fs.c (revision 1951) +++ trunk/i386/libsaio/ext2fs.c (revision 1952) @@ -40,3 +40,32 @@ strncpy (str, buf+0x478, MIN(strMaxLen, 16)); free (buf); } + +long EX2GetUUID(CICell ih, char *uuidStr) +{ + uint8_t *b, *buf=malloc (EX2ProbeSize); + if (!buf) + return -1; + Seek(ih, 0); + Read(ih, (long)buf, EX2ProbeSize); + if (!EX2Probe (buf)) + { + free (buf); + return -1; + } + if (OSReadLittleInt32 (buf+0x44c,0)<1) + { + free (buf); + return -1; + } + b=buf+0x468; + sprintf(uuidStr, + "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X", + b[0], b[1], b[2], b[3], + b[4], b[5], + b[6], b[7], + b[8], b[9], + b[10], b[11], b[12], b[13], b[14], b[15]); + free (buf); + return 0; +} Index: trunk/i386/libsaio/ext2fs.h =================================================================== --- trunk/i386/libsaio/ext2fs.h (revision 1951) +++ trunk/i386/libsaio/ext2fs.h (revision 1952) @@ -9,3 +9,4 @@ extern bool EX2Probe (const void *buf); extern void EX2GetDescription(CICell ih, char *str, long strMaxLen); +extern long EX2GetUUID(CICell ih, char *uuidStr); Index: trunk/i386/libsaio/disk.c =================================================================== --- trunk/i386/libsaio/disk.c (revision 1951) +++ trunk/i386/libsaio/disk.c (revision 1952) @@ -897,7 +897,8 @@ biosdev, partno, part->relsect, part, - 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + EX2GetUUID, EX2GetDescription, (BVFree)free, 0, kBIOSDevTypeHardDrive, 0);