Search

Quiz on chapter-3 of book Linux Device Drivers- 3rd Edition

Quiz on chapter-3 of book <a href="http://lwn.net/Kernel/LDD3/">ldd3</a>

  1. In the output of "ls -l /dev" a character driver is identified by

  2. Letter c in the second column
    Letters ch in the second column
    Letter c in the third column
    Letter p in the first column

  3. The argument macro MAJOR is of type

  4. int
    char
    dev
    dev_t

  5. Which of the following function is used for static allocation of major number to character driver

  6. register_char
    register_chrdev_region
    alloc_chrdev_region
    alloc_region

  7. The structure file_operations is a

  8. Collection of structure pointers
    Collection of function pointers
    Collection of macro pointers
    Collection of string pointers

  9. The structure "file" is defined in the header file

  10. linux/file.h
    linux/filesys.h
    linux/fs.h
    linux/sys.h

  11. cdev_alloc returns a pointer to

  12. struct cdev
    struct chardev
    struct dev
    struct device

  13. If the file_operation implementation of read returns 0 it signifies

  14. Empty file
    End of file
    No data in file
    Error in reading file

  15. The arguments passed to "open" method in a device driver are

  16. inode pointer and file pointer
    inode pointer and file_operations pointer
    file_operation pointer and file_pointer
    only file pointer

  17. inode structure is used by the kernel internally to represent

  18. Only open files
    Only closed files
    All files
    Running Processes

  19. We can find out the major number of a driver by looking at the file

  20. /proc/major
    /proc/devices
    /proc/modules
    /proc/numbers



No comments:

Post a Comment