Lines Matching refs:child

125 			TRACE(("efi_gpt: child partition exceeds existing space (ends at "
131 TRACE(("efi_gpt: child partition starts at 0 (recursive entry)\n"));
135 partition_data* child = create_child_partition(partition->id, index++,
138 if (child == NULL) {
139 TRACE(("efi_gpt: Creating child at index %" B_PRIu32 " failed\n",
146 child->name = strdup(name);
147 child->type = strdup(get_partition_type(entry.partition_type));
148 child->block_size = partition->block_size;
149 child->cookie = (void*)(addr_t)i;
150 child->content_cookie = header;
181 // add creating child support if both is valid
189 partition_data* child, uint32 mask)
224 // shrinking, only so that no child would be truncated
227 partition_data* child = get_child_partition(partition->id, i);
228 if (child == NULL)
231 if (child->offset + child->size > newEnd)
232 newEnd = child->offset + child->size;
242 efi_gpt_validate_resize_child(partition_data* partition, partition_data* child,
246 if (newSize == child->size)
250 if (newSize < child->size) {
258 // growing, but only so much that the child doesn't get bigger than
260 if (child->offset + newSize > partition->offset + partition->size)
261 newSize = partition->offset + partition->size - child->offset;
263 // make sure that the child doesn't overlap any sibling partitions
264 off_t newEnd = child->offset + newSize;
267 if (other == NULL || other->id == child->id
268 || other->offset < child->offset)
275 *size = block_align(partition, newEnd - child->offset, false);
289 efi_gpt_validate_move_child(partition_data* partition, partition_data* child,
296 if (newStart + child->size > partition->size)
297 newStart = partition->size - child->size;
300 if (newStart > child->offset) {
303 if (other == NULL || other->id == child->id
304 || other->offset < child->offset)
307 if (other->offset < newStart + child->size)
308 newStart = other->offset - child->size;
315 if (other == NULL || other->id == child->id
316 || other->offset > child->offset)
393 // ensure that child lies between first and last usable block
446 efi_gpt_shadow_changed(partition_data* partition, partition_data* child,
502 partition_data* child = get_partition(partitionID);
503 if (child == NULL)
514 uint32 entryIndex = (uint32)(addr_t)child->cookie;
519 if (!efi_gpt_validate_resize_child(partition, child, &validatedSize))
522 if (child->size == validatedSize)
532 entry.SetBlockCount(child->size / partition->block_size);
536 child->size = validatedSize;
567 partition_data* child = get_partition(childID);
568 if (child == NULL)
575 uint32 entryIndex = (uint32)(addr_t)child->cookie;
580 if (!efi_gpt_validate_move_child(partition, child, &validatedOffset))
583 if (child->offset == validatedOffset)
605 child->offset = validatedOffset;
624 partition_data* child = get_partition(partitionID);
625 if (child == NULL)
636 uint32 entryIndex = (uint32)(addr_t)child->cookie;
651 child->name = strdup(newName);
670 partition_data* child = get_partition(partitionID);
671 if (child == NULL)
682 uint32 entryIndex = (uint32)(addr_t)child->cookie;
699 child->type = strdup(type);
813 partition_data* child = create_child_partition(partition->id, entryIndex,
815 if (child == NULL)
831 delete_partition(child->id);
835 *childID = child->id;
836 child->block_size = partition->block_size;
837 child->name = strdup(name);
838 child->type = strdup(type);
839 child->parameters = strdup(parameters);
840 child->cookie = (void*)(addr_t)entryIndex;
842 if (child->type == NULL || child->parameters == NULL) {
843 delete_partition(child->id);
868 partition_data* child = get_partition(childID);
869 if (child == NULL)
876 uint32 entryIndex = (uint32)(addr_t)child->cookie;