rem: child->type = strdup(primary->IsExtended() ? kExtendedPartitionPrettyName : kPrimaryPartitionPrettyName);
add: char type[B_FILE_NAME_LENGTH]; primary->GetTypeString(type); child->type = strdup(type);
context: pm_scan_partition(int fd, partition_data *partition, void *cookie){	AutoDeleter<PartitionMap> deleter((PartitionMap*)cookie);	// check parameters	if (fd < 0 || !partition || !cookie)		return B_ERROR;	TRACE(("intel: pm_scan_partition(%d, %ld: %lld, %lld, %ld)\n", fd,		   partition->id, partition->offset, partition->size,		   partition->block_size));	PartitionMap *map = (PartitionMap*)cookie;	// fill in the partition_data structure	// (no content_name and content_parameters)	partition->content_type = strdup(kPartitionMapPrettyName);	if (!partition->content_type)		return B_NO_MEMORY;	partition->content_cookie = map;	// children	status_t error = B_OK;	int32 index = 0;	for (int32 i = 0; i < 4; i++) {		PrimaryPartition *primary = map->PrimaryPartitionAt(i);		if (!primary->IsEmpty()) {			partition_data *child = create_child_partition(partition->id,														   index, -1);			index++;			if (!child) {TRACE(("Creating child at index %ld failed\n", index - 1));				// something went wrong				error = B_ERROR;				break;			}			child->offset = partition->offset + primary->Offset();			child->size = primary->Size();			child->block_size = partition->block_size;			// (no name)			child->type = strdup(primary->IsExtended()				? kExtendedPartitionPrettyName : kPrimaryPartitionPrettyName);			// parameters			char buffer[128];			sprintf(buffer, "type = %u ; active = %d\n", primary->Type(),					primary->Active());			child->parameters = strdup(buffer);			child->cookie = primary;			// check for allocation problems			if (!child->type || !child->parameters) {				error = B_NO_MEMORY;				break;			}		}	}	// keep map on success or cleanup on error	if (error == B_OK) {		deleter.SetObject(NULL);	} else {		partition->content_cookie = NULL;		for (int32 i = 0; i < partition->child_count; i++) {			if (partition_data *child = get_child_partition(partition->id, i))				child->cookie = NULL;		}	}	return error;}