I’m writing a Mac application which needs to check whether a given driver has been installed or not.
How can I go about checking this?
BR,
S.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The simplest way is to grep output of
kextstatfor its name, knowing thatgrepreturns nonzero exit code when nothing is found:If you need to do that directly, check
kextstatsource code, you’ll find it’s usingkmod_get_infoAPI, however I can’t find any documentation on it right now. I see no serious disadvantages in usingsystem()call, so I’d stick with it.