From mboxrd@z Thu Jan 1 00:00:00 1970 From: mindentropy@gmail.com (mindentropy) Date: Fri, 6 May 2011 00:06:10 +0530 Subject: Clarification regarding design of a device. In-Reply-To: References: <201105022253.27438.mindentropy@gmail.com> Message-ID: <201105060006.10751.mindentropy@gmail.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Monday 02 May 2011 10:58:45 PM Mulyadi Santosa wrote: > > I am not keen regarding char/block device management, but I think you > should separate those streams. > > How? Well, same thing like you open a same file twice, right? You're > given two different file descriptor. After all, the "open", "read" and > "write" handler of device IMHO always assume that we wanna achieve > such different stream, right? Sounds silly but how do I get access to the file descriptor? Also If I make the user create a session for an operation similar to this paper http://www.usenix.org/event/usenix03/tech/full_papers/keromytis/keromytis_html/node8.html#SECTION00042000000000000000, should I remove the read, write operations and do all operations using ioctl commands i.e. reading the user buffer etc?