/* Given type of sub-partition, identify BPDT entry for it. Sub-Partition could lie either within BPDT or S-BPDT.  */
static struct bpdt_entry* __find_entry_by_type(struct bpdt_entry *e, size_t count, int type)
/* Given type of sub-partition, identify BPDT entry for it. Sub-Partition could lie either within BPDT or S-BPDT.  */
static struct bpdt_entry* __find_entry_by_type(struct bpdt_entry *e, size_t count, int type)
{
	size_t i;
	for (i = 0; i < count; i++) {
		if (e[i].type == type)
			break;
	}
	if (i == count)
		return NULL;
	return &e[i];
}