Index: trunk/ChameleonPrefPane/Sources/ShellProcess.cpp =================================================================== --- trunk/ChameleonPrefPane/Sources/ShellProcess.cpp (revision 110) +++ trunk/ChameleonPrefPane/Sources/ShellProcess.cpp (revision 111) @@ -43,14 +43,14 @@ { if (_fsType.find("Apple")!=std::string::npos || _fsType.find("HFS")!=std::string::npos) - return 0; // Windows + return 0; // Mac else if (_fsType.find("Windows")!=std::string::npos || _fsType.find("Microsoft")!=std::string::npos || _fsType.find("NTFS")!=std::string::npos || _fsType.find("FAT")!=std::string::npos) return 1; // Windows else if (_fsType.find("Linux")!=std::string::npos) - return 2; // Unknown + return 2; // Linux return 10; //Unknown } @@ -91,6 +91,7 @@ // for the debug to be accurate you need to alias (ln -s ...) the user to debug with your real disks #define DEBUG_DISKUTIL 0 + //---------------------------------------------------------------- const std::vector& PartitionExtractor::extractPartitions(const char* szHide, const char* szRenamed) @@ -148,50 +149,38 @@ *q='\0'; part = line[skipwhite]-'0'; - partInfo.fsType(fsType); partInfo.disk(disk); partInfo.partition(part); partInfo.label(checkForRename(label, partInfo.toHdStr().c_str())); - size_t len = partInfo.label().length(); - if(len==0){ - strncpy(label, "Untitled", sizeof(label)); - partInfo.label(label); - } + + std::replace(fsType, fsType+strlen(fsType), '_', ' ' ); + partInfo.fsType(fsType); + + std::string diskLabel(trim(label)); - // filter useless partitions: - if (partInfo.clabel()[len-1] !='*' && - partInfo.label()!="EFI" && - partInfo.fsType()!="EFI" && - partInfo.fsType()!="Apple_partition_scheme" && - partInfo.fsType()!="Apple_partition_map" && - partInfo.fsType()!="Apple_Free" - ) - { - if (partInfo.fsType()=="Apple_HFS") partInfo.fsType("Apple HFS"); - std::string diskLabel(trim(label)); - bool found=false; + bool found=false; // early bail out if we found what we need: DON't make any assumption // that Windows is the name of WIN32 bootable disk dir ... - if ( - fileExists("/Volumes/" + diskLabel + "/boot") || + if ( fileExists("/Volumes/" + diskLabel + "/System/Library/Extensions") || fileExists("/Volumes/" + diskLabel + "/ntldr") || fileExists("/Volumes/" + diskLabel + "/bootmgr") || - fileExists("/Volumes/" + diskLabel + "/Boot") || + fileExists("/Volumes/" + diskLabel + "/boot/bcd") || fileExists("/Volumes/" + diskLabel + "/pagefile.sys") || fileExists("/Volumes/" + diskLabel + "/hiberfil.sys") - ) - found=true; - else if ((strstr(fsType,"Linux") ) && !strstr(fsType, "Linux_Swap")) - found=true; // Added Linux case - if (found) - { //check if one of them exists + ) + found=true; + else if ((strstr(fsType,"Linux") ) && !strstr(fsType, "Linux Swap")) + found=true; // Added Linux case + + if (found) //check if one of them exists + { if (partInfo.label().size()==0) partInfo.label("Untitled"); if(_hiddenParts.length()==0 || _hiddenParts.find(partInfo.toHdStr()) == std::string::npos) _partList.push_back(partInfo); } - } + } } close(); @@ -204,6 +193,7 @@ * Get the index in the internal partlist of the hd(n,m) partition specified by the input string * return -1 if no match, >=0 if a match happens */ + int PartitionExtractor::getIndexFromHdStringSpec(const char* inHDStr) { PartitionInfo info; Index: trunk/ChameleonPrefPane/Sources/AdvancedSetupController.mm =================================================================== --- trunk/ChameleonPrefPane/Sources/AdvancedSetupController.mm (revision 110) +++ trunk/ChameleonPrefPane/Sources/AdvancedSetupController.mm (revision 111) @@ -28,11 +28,11 @@ BootProp::instance().addOptionDesc(mBusRatio, mBusRatioText, OptionKernel, "busratio", ""); BootProp::instance().addOptionDesc(mDebug, mDebugText, OptionString, "debug", ""); BootProp::instance().addOptionDesc(mIO, mIOText, OptionString, "io", ""); - BootProp::instance().addOptionDesc(mDisableKextsBlacklisting, nil, OptionYesNo, "blacklist", ""); + BootProp::instance().addOptionDesc(mDisableKextsBlacklisting, nil, OptionUnix, "blacklist=0", ""); BootProp::instance().addOptionDesc(mDSDTFile, mDSDTFileText, OptionFileString, "DSDT", ""); BootProp::instance().addOptionDesc(mDSDTDrop, nil, OptionYesNo, "DropSSDT", "No"); BootProp::instance().addOptionDesc(mSMBIOSFile,mSMBIOSFileText, OptionFileString, "SMBIOS", ""); - BootProp::instance().addOptionDesc(mSMBIOSDefaults, nil, OptionYesNo, "SMBIOSdefaults", "No"); + BootProp::instance().addOptionDesc(mSMBIOSDefaults, nil, OptionYesNo, "SMBIOSdefaults", "Yes"); BootProp::instance().addOptionDesc(mWake, nil, OptionYesNo, "Wake", "No"); BootProp::instance().addOptionDesc(mForceWake, nil, OptionYesNo, "ForceWake", "No"); BootProp::instance().addOptionDesc(mWakeImage, mWakeImageText, OptionFileString, "WakeImage", "");