Chameleon Applications

Chameleon Applications Commit Details

Date:2010-02-14 16:52:00 (14 years 2 months ago)
Author:DieBuche
Commit:111
Parents: 110
Message:Cleaning shell process, hopefully didn't introduce any regressions. Adding blacklist fix.
Changes:
M/trunk/ChameleonPrefPane/Sources/AdvancedSetupController.mm
M/trunk/ChameleonPrefPane/Sources/ShellProcess.cpp

File differences

trunk/ChameleonPrefPane/Sources/ShellProcess.cpp
4343
4444
4545
46
46
4747
4848
4949
5050
5151
5252
53
53
5454
5555
5656
......
9191
9292
9393
94
9495
9596
9697
......
148149
149150
150151
151
152152
153153
154154
155
156
157
158
159
155
156
157
158
159
160160
161
162
163
164
165
166
167
168
169
170
171
172
161
173162
174163
175
176
164
177165
178166
179167
180
168
181169
182170
183
184
185
186
187
188
171
172
173
174
175
176
177
189178
190179
191180
192181
193182
194
183
195184
196185
197186
......
204193
205194
206195
196
207197
208198
209199
{
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
}
// 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<PartitionInfo>&
PartitionExtractor::extractPartitions(const char* szHide, const char* szRenamed)
*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();
* 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;
trunk/ChameleonPrefPane/Sources/AdvancedSetupController.mm
2828
2929
3030
31
31
3232
3333
3434
35
35
3636
3737
3838
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", "");

Archive Download the corresponding diff file

Revision: 111