Home » Linux » Quiz » Quiz on chapter-3 of book Linux Device Drivers- 3rd Edition Hasan Basri 4:03 PM 0 comments Linux Quiz Quiz on chapter-3 of book Linux Device Drivers- 3rd Edition Quiz on chapter-3 of book ldd3 In the output of "ls -l /dev" a character driver is identified by Letter c in the second column Letters ch in the second column Letter c in the third column Letter p in the first column The argument macro MAJOR is of type intchardevdev_tWhich of the following function is used for static allocation of major number to character driverregister_charregister_chrdev_regionalloc_chrdev_regionalloc_region The structure file_operations is a Collection of structure pointersCollection of function pointers Collection of macro pointersCollection of string pointers The structure "file" is defined in the header file linux/file.hlinux/filesys.hlinux/fs.hlinux/sys.hcdev_alloc returns a pointer to struct cdevstruct chardevstruct devstruct device If the file_operation implementation of read returns 0 it signifies Empty fileEnd of fileNo data in file Error in reading file The arguments passed to "open" method in a device driver are inode pointer and file pointer inode pointer and file_operations pointerfile_operation pointer and file_pointeronly file pointerinode structure is used by the kernel internally to represent Only open filesOnly closed files All filesRunning Processes We can find out the major number of a driver by looking at the file /proc/major/proc/devices/proc/modules/proc/numbers Share: Facebook Twitter Google+ StumbleUpon Digg Delicious LinkedIn Reddit Technorati
0 comments:
Post a Comment