Chameleon

Chameleon Commit Details

Date:2012-05-08 21:16:35 (8 years 3 months ago)
Author:Cosmosis Jones
Commit:1952
Parents: 1951
Message:enable ext2fs UUID http://forge.voodooprojects.org/p/chameleon/issues/208/
Changes:
M/trunk/i386/libsaio/disk.c
M/trunk/i386/libsaio/ext2fs.c
M/trunk/i386/libsaio/ext2fs.h

File differences

trunk/i386/libsaio/ext2fs.c
4040
4141
4242
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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;
}
trunk/i386/libsaio/ext2fs.h
99
1010
1111
12
extern bool EX2Probe (const void *buf);
extern void EX2GetDescription(CICell ih, char *str, long strMaxLen);
extern long EX2GetUUID(CICell ih, char *uuidStr);
trunk/i386/libsaio/disk.c
897897
898898
899899
900
900
901
901902
902903
903904
biosdev, partno,
part->relsect,
part,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
EX2GetUUID,
EX2GetDescription,
(BVFree)free,
0, kBIOSDevTypeHardDrive, 0);

Archive Download the corresponding diff file

Revision: 1952