Home | History | Annotate | Download | only in gptfdisk

Lines Matching refs:partNum

98          tempSpace->partNum = (int) i;
113 tempSpace->partNum = -1;
130 while ((current != NULL) /* && (current->partNum != -1) */ ) {
235 if (space->partNum == -1) { // space is empty
242 printw("%d", space->partNum + 1);
308 void GPTDataCurses::DeletePartition(int partNum) {
309 if (!GPTData::DeletePartition(partNum))
319 void GPTDataCurses::ShowInfo(int partNum) {
327 printw("Information for partition #%d\n\n", partNum + 1);
328 printw("Partition GUID code: %s (%s)\n", partitions[partNum].GetType().AsString().c_str(),
329 partitions[partNum].GetTypeName().c_str());
330 printw("Partition unique GUID: %s\n", partitions[partNum].GetUniqueGUID().AsString().c_str());
331 printw("First sector: %lld (at %s)\n", partitions[partNum].GetFirstLBA(),
332 BytesToIeee(partitions[partNum].GetFirstLBA(), blockSize).c_str());
333 printw("Last sector: %lld (at %s)\n", partitions[partNum].GetLastLBA(),
334 BytesToIeee(partitions[partNum].GetLastLBA(), blockSize).c_str());
335 size = partitions[partNum].GetLastLBA() - partitions[partNum].GetFirstLBA();
337 printw("Attribute flags: %016x\n", partitions[partNum].GetAttributes().GetAttributes());
339 partitions[partNum].GetDescription().extract(0, NAME_SIZE , temp, NAME_SIZE );
342 printw("Partition name: '%s'\n", partitions[partNum].GetDescription().c_str());
348 void GPTDataCurses::ChangeName(int partNum) {
351 if (ValidPartNum(partNum)) {
356 partitions[partNum].GetDescription().extract(0, NAME_SIZE , temp, NAME_SIZE );
359 printw("Current partition name is '%s'\n", partitions[partNum].GetDescription().c_str());
364 partitions[partNum].SetName((string) temp);
370 void GPTDataCurses::ChangeType(int partNum) {
379 printw("Current type is %04x (%s)\n", partitions[partNum].GetType().GetHexType(), partitions[partNum].GetTypeName().c_str());
380 printw("Hex code or GUID (L to show codes, Enter = %04x): ", partitions[partNum].GetType().GetHexType());
386 tempType = partitions[partNum].GetType().GetHexType();
388 partitions[partNum].SetType(tempType);
390 } while ((temp[0] == 'L') || (temp[0] == 'l') || (partitions[partNum].GetType() == (GUIDData) "0x0000"));
428 int partNum;
456 partNum = FindFirstFreePart();
457 if (CreatePartition(partNum, newFirstLBA, newLastLBA)) { // created OK; set type code & name....
458 ChangeType(partNum);
459 ChangeName(partNum);
601 if (currentSpace->partNum == -1) { // empty space is selected
691 if (ValidPartNum(currentSpace->partNum))
692 DeletePartition(currentSpace->partNum);
698 if (ValidPartNum(currentSpace->partNum))
699 ShowInfo(currentSpace->partNum);
705 if (ValidPartNum(currentSpace->partNum))
706 ChangeName(currentSpace->partNum);
709 if (currentSpace->partNum < 0) {
718 if (ValidPartNum(currentSpace->partNum))
719 ChangeType(currentSpace->partNum);