/* vpd_find_packet() - Locates and returns the specified VPD packet or NULL on error.  */
static vpd_packet_t* vpd_find_packet(vpd_t *vpd, unsigned char ident)
/* vpd_find_packet() - Locates and returns the specified VPD packet or NULL on error.  */
static vpd_packet_t* vpd_find_packet(vpd_t *vpd, unsigned char ident)
{
    vpd_packet_t *packet = (vpd_packet_t *)&vpd->packets;
    if (ident == VPD_PID_GI)
	return NULL;
    while ((packet->identifier != ident) &&
	   (packet->identifier != VPD_PID_TERM))
	packet = vpd_get_packet(packet);
    if ((packet->identifier) && (packet->identifier != ident))
	return NULL;
    return packet;
}