edd...@gmail.com
unread,Aug 30, 2012, 6:41:07 PM8/30/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi all, I've googled for hours for this problem and still can't find a solution, maybe someone knows how to do it.
Actually I'm writing a driver to transform a tape device(that is a character device) in a block device. I know it's totally unuseful but i like to play with it, and it can be educational.
So I need to write a module that create a block device and access the tape's character device and send command like "seek" and to read and write data.
I've already found how to get access to another block device within a module (i found some examples that uses functions like blkdev_get_by_path()) but not how to get a character device.
I already found someone suggesting to use flip_open() and vfs_read()/write, I've tried but it crash writing, ad I'm quite sure there is a better way without passing trough user-space files and filesystem.
Do you have any clue?