Closed DidierMalenfant closed 6 months ago
Not quite.
Read carefully how the driver is gotten: "...ByDevName
" means "get driver according to the device name" (not the driver name). It basically tries to match the device driver with device name (with a fallback/default to the dump file driver).
Actually, while changing the devices code recently, I was not sure if this is needed. It could be left totally to client code to match device driver with the device. I decided to leave it this way to simplify most cases and to keep compatibility with earlier code.
Note also that now the drivers can be enabled/disabled - so, for instance, there can be only one enabled and every adfDevOpen
will use that one. In fact, matching is used only for "native" devices - and the native dev. driver is disabled by default.
There is a new function (adfDevOpenWithDriver
) where the driver can be explicitly specified (by its name), so it is up to you which way you prefer in your code.
In fact, it is me who apparently haven't read carefully your question ;-) Sorry about that.
Yes - you are reading it right. This is a string representing:
isDevice(name)
function for matching device strings/namesHowever, how it will be used depends on which drivers are enabled:
isDevice(name)
) then that driver will be used(Sorry, one more time, I just responded to quickly...)
The following code in.
add_dev.c
:seems to use
name
as both name for the device name and the adf name.Am I reading this correctly?