Linux Sysfs Questions & Answers – 5

«
»
This set of Linux / Unix questions and answers focuses on sysfs. This is set 5.

1. Which one of the following is not true?
a) kobjects are included in a hierarchic organisation
b) kobjects can have a parent
c) kobjects can be included in a kset
d) none of the mentioned
View Answer

Answer: d
Explanation: None.

2. In sysfs.h which one of the following structure represents the directory entries?
a) struct sysfs_dirent
b) struct sysfs_dir
c) struct sysfs
d) none of the mentioned
View Answer

Answer: a
Explanation: None.
advertisement

3. The name pointer of the attribute data structure represents the _____ in sysfs.
a) directory
b) file
c) symbolic link
d) none of the mentioned
View Answer

Answer: b
Explanation: None.

4. To read/write attribute, which one of the following method is required?
a) show
b) store
c) both show and store
d) none of the mentioned
View Answer

Answer: c
Explanation: None.

5. Which one of the following is not contained in the kobject data structure?
a) pointer to the kobject type descriptor
b) pointer to the containing kset
c) pointer to the parent kobject
d) none of the mentioned
View Answer

Answer: d
Explanation: None.
advertisement

6. The kobjects can be organized in a hierarchical tree by means of
a) ksets
b) kref
c) ktype
d) none of the mentioned
View Answer

Answer: a
Explanation: None.

7. Which one of the following is a element of a kset data structure?
a) pointer to the subsystem descriptor
b) pointer to the kobject type descriptor of the kset
c) pointer to the subsystem descriptor & kobject type descriptor of the kset
d) none of the mentioned
View Answer

Answer: c
Explanation: None.

8. Which one of the following function is used to add the kobject to sysfs?
a) kobject_add()
b) kobject_register()
c) kobject_init()
d) all of the mentioned
View Answer

Answer: d
Explanation: None.
advertisement

9. Which one of the following function is used to create a new attribute?
a) sysfs_create_file()
b) sysfs_attribute
c) both sysfs_create_file() and sysfs_attribute
d) none of the mentioned
View Answer

Answer: a
Explanation: None.

10. Sysfs attribute should export ____ value per file.
a) one
b) two
c) three
d) four
View Answer

Answer: a
Explanation: None.

Sanfoundry Global Education & Learning Series – Linux Administration & Programming.
Here’s the list of Best Reference Books in Linux Commands & Shell Programming.
Here’s the list of Best Reference Books in Linux Kernel, Device-Drivers & System Programming.

To practice all questions on Linux Administration & Programming, here is complete set of 1000+ Multiple Choice Questions and Answers on Linux.

advertisement
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn