Is there a way to get a struct file
pointer for a device file inside linux kernel? I am writing a kernel module. I want to access file *
for a scsi device (e.g. /dev/sg1). Can I access it from the kernel without having to open the device in user space?
Alternatively, if I open the said device in user space and pass the fd to my kernel module, is there a way to convert the fd to a file *
?