␉PartitionInfo partInfo;␊ |
␊ |
␉char line[1024]="";␊ |
␉char label[32]="", fsType[32]="" ;␊ |
␉char label[32]="Untitled", fsType[32]="" ;␊ |
␉size_t len=0;␊ |
␉int disk =0, part=0;␊ |
␉int label_pos=0, size_pos=0;␊ |
|
␉␉␉␊ |
␉␉␉std::replace(fsType, fsType+strlen(fsType), '_', ' ' );␊ |
␉␉␉partInfo.fsType(fsType);␊ |
␉␉␉std::string diskLabel(trim(label)); ␊ |
␉␉␉␊ |
␉␉␉if (partInfo.label().size()==0) partInfo.label("Untitled");␊ |
␉␉␉std::string diskLabel(trim(label)); ␊ |
␉␉␉␉␊ |
␉␉␉if (diskLabel=="" && partInfo.fsType()!="EFI" && partInfo.fsType()!="Apple partition map") {␊ |
␉␉␉␉diskLabel="Untitled";␊ |
␉␉␉}␊ |
␉␉␉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 (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);␊ |