In writing a function to handle devctl() client calls, I used a function
mentioned in the driver guide to extract the command and other info from
a dcmd argument. It gave me a link error, and I think I see why.
The file /usr/include/devctl.h has a prototype for get_device_command()
before it #defines it as a mask operation. So a reference to an external
function gets placed in the ojbect, and of course there is really no
library that contains it (as far as I could see…) so a link error
occurs.
============================
John H. Zouck
The Johns Hopkins University
Applied Physics Laboratory
Oops. My mistake. I was not including devctl.h in my driver, so the error
was mine entirely. Sorry for the traffic. Plus, I exposed some ignorance in
reading C.
Sorry for the unnecessary message.
“John H. Zouck” wrote:
In writing a function to handle devctl() client calls, I used a function
mentioned in the driver guide to extract the command and other info from
a dcmd argument. It gave me a link error, and I think I see why.
The file /usr/include/devctl.h has a prototype for get_device_command()
before it #defines it as a mask operation. So a reference to an external
function gets placed in the ojbect, and of course there is really no
library that contains it (as far as I could see…) so a link error
occurs.
============================
John H. Zouck
The Johns Hopkins University
Applied Physics Laboratory
–
John H. Zouck
The Johns Hopkins University
Applied Physics Laboratory