Chameleon

Chameleon Commit Details

Date:2012-04-03 20:07:56 (12 years 3 months ago)
Author:armel cadet-petit
Commit:1916
Parents: 1915
Message:workaround for selectBootVolume, this time it should really work fine with clang, llvm or gcc, or at least i hope so...
Changes:
M/branches/cparm/i386/libsaio/sys.c
M/branches/cparm/i386/libsaio/disk.c
M/branches/cparm/CHANGES

File differences

branches/cparm/CHANGES
1
2
13
24
35
- Added a dirty workaround to selectBootVolume (still need more investigations to find out what happening exactly during the bvchain construction, and how the h... the loop can stop with gcc)
- Improved Xcode4.3+ support
- Sync'd LoginToLion with the last Enzo's update (want more about LoginToLion ? please follow or participate to this thread : http://forum.voodooprojects.org/index.php/topic,2125.0.html)
branches/cparm/i386/libsaio/sys.c
855855
856856
857857
858
858
859
860
861
859862
860863
864
861865
862866
863867
......
866870
867871
868872
869
873
874
875
876
877
870878
871879
872880
......
882890
883891
884892
885
886
887
893
894
895
896
897
898
888899
889900
890
901
891902
892903
893904
......
898909
899910
900911
901
902
903
912
904913
914
905915
906916
907917
908918
909919
910920
911
912
913
921
914922
915
916
923
917924
918925
919926
......
921928
922929
923930
924
925
931
932
933
934
935
926936
927937
928938
#if UNUSED
if (multiboot_partition_set)
for ( bvr = chain; bvr; bvr = bvr->next )
for (bvr = chain; bvr < (BVRef)ULONG_MAX; bvr = bvr->next) {
if (!bvr) {
break;
}
if ( bvr->part_no == multiboot_partition && bvr->biosdev == gBIOSDev )
return bvr;
}
#endif
/*
* Checking "Default Partition" key in system configuration - use format: hd(x,y), the volume UUID or label -
*/
char *val = XMLDecode(getStringForKey(kDefaultPartition, DEFAULT_BOOT_CONFIG));
if (val) {
for ( bvr = chain; bvr; bvr = bvr->next ) {
for (bvr = chain; bvr < (BVRef)ULONG_MAX; bvr = bvr->next)
{
if (!bvr) {
break;
}
if (matchVolumeToString(bvr, val, false)) {
free(val);
return bvr;
* select this volume as the boot volume.
*/
{
bvr = chain;
do {
{
for (bvr = chain; bvr < (BVRef)ULONG_MAX; bvr = bvr->next)
{
if (!bvr) {
break;
}
#if UNUSED
if (multiboot_skip_partition_set) {
if (bvr->part_no == multiboot_skip_partition) {bvr = bvr->next; continue;}
if (bvr->part_no == multiboot_skip_partition) continue;
}
#endif
if ( (bvr->flags & kBVFlagPrimary) && (bvr->biosdev == gBIOSDev) ) foundPrimary = true;
&& (!filteredChain || (filteredChain && bvr->visible))
&& (bvr->biosdev == gBIOSDev) )
{
bvr2 = bvr;
bvr = bvr->next;
continue;
bvr2 = bvr;
}
// zhell -- if gBIOSBootVolume is NOT set, we use the "if" statement
// from r491,
if ( bvr->flags & kBVFlagBootable
&& ! gBIOSBootVolume
&& bvr->biosdev == gBIOSDev )
{
bvr2 = bvr;
bvr = bvr->next;
continue;
bvr2 = bvr;
}
} while (bvr != NULL);
}
}
/*
*/
if (foundPrimary)
{
for ( bvr = chain; bvr; bvr = bvr->next )
{
for (bvr = chain; bvr < (BVRef)ULONG_MAX; bvr = bvr->next)
{
if (!bvr) {
break;
}
if ( bvr->flags & kBVFlagNativeBoot && bvr->biosdev == gBIOSDev ) bvr1 = bvr;
if ( bvr->flags & kBVFlagPrimary && bvr->biosdev == gBIOSDev ) bvr2 = bvr;
}
branches/cparm/i386/libsaio/disk.c
16951695
16961696
16971697
1698
1699
1698
1699
1700
1701
17001702
17011703
17021704
......
19331935
19341936
19351937
1936
1937
1938
1939
1940
1941
19381942
19391943
19401944
......
19511955
19521956
19531957
1954
1955
1956
1958
1959
1960
19571961
1962
1963
1964
19581965
19591966
19601967
char label[BVSTRLEN];
int fh, fileSize, error;
#endif
for (bvr = chain; bvr; bvr = bvr->next)
{
for (bvr = chain; bvr < (BVRef)ULONG_MAX; bvr = bvr->next) {
if (!bvr) {
break;
}
#ifdef BOOT_HELPER_SUPPORT
error = 0;
}
#if DEBUG
for (bvr = chain; bvr; bvr = bvr->next)
{
for (bvr = chain; bvr < (BVRef)ULONG_MAX; bvr = bvr->next) {
if (!bvr) {
break;
}
printf(" bvr: %d, dev: %d, part: %d, flags: %d, vis: %d\n", bvr, bvr->biosdev, bvr->part_no, bvr->flags, bvr->visible);
}
printf("count: %d\n", bvCount);
{
int ret = 1;
BVRef bvr = chain;
BVRef nextBVR = NULL;
while (bvr)
BVRef nextBVR = NULL;
while (bvr < (BVRef)ULONG_MAX)
{
if (!bvr) {
break;
}
nextBVR = bvr->next;
if (bvr->filtered)

Archive Download the corresponding diff file

Revision: 1916