Author Topic: bug in revision r2334  (Read 1670 times)

0 Members and 1 Guest are viewing this topic.

parshin-karoslav

  • Entrant
  • Posts: 1
bug in revision r2334
« on: January 13, 2014, 05:10:28 PM »
Exquse my English, I learn French at school.
I have got starvation when launch Chameleon r2334 with connected HDD, having non-system HFS+ partition (TimeMachine backup area). Analyzing the source code walks into file i386/libsaio/disk.c, function getOSVersion(BVRef, char*). The end of that function in trunk svn thread is:
Code: [Select]
if(!valid) {
int fh = -1;
sprintf(dirSpec, "hd(%d,%d)/.PhysicalMediaInstall", BIOS_DEV_UNIT(bvr), bvr->part_no);
fh = open(dirSpec, 0);

if (fh >= 0) {
valid = true;
bvr->OSisInstaller = true;
strcpy(bvr->OSVersion, "10.7"); // 10.7 +
} else {
close(fh);
}
}
but must be:
Code: [Select]
if(!valid) {
int fh = -1;
sprintf(dirSpec, "hd(%d,%d)/.PhysicalMediaInstall", BIOS_DEV_UNIT(bvr), bvr->part_no);
fh = open(dirSpec, 0);

if (fh >= 0) {
valid = true;
bvr->OSisInstaller = true;
strcpy(bvr->OSVersion, "10.7"); // 10.7 +
close(fh);
} else {
;
}
}
Bootloder, compiled with these changes don't get starvation on non-system HFS+ partition.
« Last Edit: January 15, 2014, 02:50:48 AM by Gringo Vermelho »