Lines Matching refs:partition

94 	virtual bool Visit(BPartition *partition, int32 level)
100 status_t error = partition->GetPath(&path);
106 printf("%spartition %" B_PRId32 ": \"%s\"\n", prefix, partition->ID(),
109 printf("%s offset: %" B_PRId64 "\n", prefix, partition->Offset());
110 printf("%s size: %" B_PRId64 "\n", prefix, partition->Size());
111 printf("%s block size: %" B_PRIu32 "\n", prefix, partition->BlockSize());
112 printf("%s index: %" B_PRId32 "\n", prefix, partition->Index());
113 printf("%s status: %" B_PRIu32 "\n", prefix, partition->Status());
115 partition->ContainsFileSystem());
117 partition->ContainsPartitioningSystem());
118 printf("%s device: %d\n", prefix, partition->IsDevice());
119 printf("%s read only: %d\n", prefix, partition->IsReadOnly());
120 printf("%s mounted: %d\n", prefix, partition->IsMounted());
121 printf("%s flags: %" B_PRIx32 "\n", prefix, partition->Flags());
122 printf("%s name: \"%s\"\n", prefix, partition->Name());
124 partition->ContentName().String());
125 printf("%s type: \"%s\"\n", prefix, partition->Type());
127 partition->ContentType());
128 printf("%s params: \"%s\"\n", prefix, partition->Parameters());
130 partition->ContentParameters());
148 print_partition(BPartition* partition, int level, int index)
151 get_size_string(partition->Offset(), offset);
152 get_size_string(partition->Size(), size);
158 (partition->ContentType() ? partition->ContentType() : "-"),
159 partition->ContentName().String());
209 virtual bool Visit(BPartition* partition, int32 level)
211 print_partition(partition, level, fIndex++);
233 virtual bool Visit(BPartition *partition, int32 level)
300 " i - initialize a partition\n"
304 " l - create a new child partition\n"
331 // get the partition
333 BPartition* partition = NULL;
334 if (!_SelectPartition("partition index [-1 to abort]: ", partition,
339 printf("\nselected partition:\n\n");
341 print_partition(partition, 0, partitionIndex);
349 if (partition->CanInitialize(diskSystem.PrettyName()))
356 "partition.\n");
361 printf("\ndisk systems that can initialize the selected partition:\n");
381 if ((supportsName && !_ReadLine("partition name: ", name))
382 || !_ReadLine("partition parameters: ", parameters)) {
388 if (partition->ValidateInitialize(diskSystem->PrettyName(),
428 status_t error = partition->Initialize(diskSystem->PrettyName(),
444 // get the parent partition
445 BPartition* partition = NULL;
447 if (!_SelectPartition("parent partition index [-1 to abort]: ",
448 partition, partitionIndex)) {
452 printf("\nselected partition:\n\n");
454 print_partition(partition, 0, partitionIndex);
456 if (!partition->ContainsPartitioningSystem()) {
457 printf("The selected partition does not contain a partitioning "
466 while (partition->GetNextSupportedChildType(&cookie, &typeBuffer)
473 "child partition (no supported types).\n");
479 status_t error = partition->GetPartitioningInfo(&partitioningInfo);
481 printf("Failed to get partitioning info for partition: %s\n",
488 printf("There's no space on the partition where a child partition "
493 // let the user select the partition type, if there's more than one
498 printf("Possible partition types:\n");
511 printf("Unused regions where the new partition could be created:\n");
547 BString prompt("partition start [default: ");
555 printf("invalid partition start\n");
563 BString prompt("partition size [default: ");
571 printf("invalid partition size\n");
575 if (!_ReadLine("partition parameters: ", parameters))
582 if (partition->ValidateCreateChild(&start, &size, type, NULL,
596 printf("The disk system adjusted the partition start and "
627 error = partition->CreateChild(start, size, type, NULL,
630 printf("Creating the partition failed: %s\n", strerror(error));
659 bool _SelectPartition(const char* prompt, BPartition*& partition,
664 partition = fDevice;
672 partition = NULL;
679 partition = fDevice->VisitEachDescendant(&visitor);
680 if (partition) {
685 printf("invalid partition index\n");