Find the answer to your Linux question:
Results 1 to 4 of 4
can you tell me something about char devices in linux and how to write a program to access this devices in our program...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2011
    Posts
    4

    can you tell me something about char devices in linux


    can you tell me something about char devices in linux and how to write a program to access this devices in our program

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,195
    Quote Originally Posted by abhikohokade View Post
    can you tell me something about char devices in linux and how to write a program to access this devices in our program
    character devices are simply devices that the kernel reads from or writes to one character at a time (as distinct from block devices like disks that are read from or written to in blocks). Char devices include consoles, sound devices, ports, etc. Each is characterised by a unique pair of numbers called the major and minor device nodes.
    If you do a full listing (ls -l) of the dev directory, you will see that the first character of the listing for each device is 'c' for char or 'b' for block.
    You may find a char subdirectory in /dev. This lists all your char devices by their device nodes with links to the actual names.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    Just Joined!
    Join Date
    Sep 2011
    Posts
    4

    how to program this devices using c

    i want to write device driver for that char device
    do u have any idea about this.

    e.g
    I want to access usb file system in my c program using kernel module.

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    That would be a block device (e.g. /dev/sdb1), not a char device.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •