이중 연결 리스트 struct list_head를 사용해서 사용자가 전달한 데이터를 관리하고 제출하는 문자 기반 디바이스를 작성할려고 하는데 디바이스의 minor 번호에 따라 다음과 같이 되게하려고 합니다..
Minor no. 0 : 사용자 프로그램에서 write만 가능하며, read는 불가능함 Minor no. 1 : 사용자 프로그램에서 read만 가능하며, write는 불가능함
inode 에서 minor number 를 읽어서 read/write 에서 다르게 동작하도록 하던가, 아니면 open() 에서 minor number 에 따라 다른 file_operation 을 등록하면 되겠네요.
"Linux Device drivers" 책에 잘 나와 있네요.
from saibi
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
inode 에서 minor number 를 읽어서 read/write 에
inode 에서 minor number 를 읽어서 read/write 에서 다르게 동작하도록 하던가, 아니면 open() 에서 minor number 에 따라 다른 file_operation 을 등록하면 되겠네요.
"Linux Device drivers" 책에 잘 나와 있네요.
from saibi
댓글 달기