parport_find_device

Name

parport_find_device --  find a specific device

Synopsis

int parport_find_device (const char * mfg, const char * mdl, int from);

Arguments

mfg

required manufacturer string

mdl

required model string

from

previous device number found in search, or NULL for new search

Description

This walks through the list of parallel port devices looking for a device whose 'MFG' string matches mfg and whose 'MDL' string matches mdl in their IEEE 1284 Device ID.

When a device is found matching those requirements, its device number is returned; if there is no matching device, a negative value is returned.

A new search it initiated by passing NULL as the from argument. If from is not NULL, the search continues from that device.