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

Answers to the Quiz

1.In the output of "ls -l /dev" a character driver is identified by
Ans. Letter c in the second column

2. The argument macro MAJOR is of type
Ans. dev_t

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

4. The structure file_operations is a
Ans. Collection of function pointers

5.The structure "file" is defined in the header file
Ans. linux/fs.h

6.cdev_alloc returns a pointer to
Ans. struct cdev

7.If the file_operation implementation of read returns 0 it signifies
Ans. End of file

8. The arguments passed to "open" method in a device driver are
Ans. inode pointer and file pointer

9. inode structure is used by the kernel internally to represent
Ans. All files

10. We can find out the major number of a driver by looking at the file
Ans. /porc/devices

Follow by Email