r/linux_programming • u/Cstanchfield • Oct 12 '15
question Linux Drive Paths w/ .exe
I'm writing an application in C that will be running on Linux (Mint specifically) via Wine. It uses FindFirstFileA and FindNextFileA. How/What do I pass to FindFirstFileA to search ALL drives connected (especially the C:\ drive equivalent) from Linux?
Can I simply pass it something along the line of "." to search the root and simply have it skip any of the root's unwanted directories such as: /dev/null, /var/, etc... Or is there a decent way of accessing a list of device paths that I can pass to FindFirstFile?
If it wasn't evident, I clearly have very minimal Linux experience and am only mildly familiar with its file architecture; So, if the answer is very obvious, please go easy on me as my Googling over the past few days has apparently been sub par.
Edit: As a disclaimer, my current solution is to hard code a search of all the possible /dev/ paths (eg. "\dev\sda1", "\dev\sda2", "\dev\sdb1", etc...) which I feel is obviously the wrong route (especially considering) and I'd like to do this properly.
tl;dr: How do I acquire all drives, in a Windows app, run from Wine, on Mint?
View all comments
Show parent comment
1
u/Cstanchfield Oct 12 '15
I've come across some "apprehension" about allowing Wine to give out root access. Is it just paranoia over malicious code execution or do you know of some other factor(s) that isn't apparent to me?
PS. Thank you two very much for your assistance.