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.

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.
advertisement
advertisement

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.

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.
Note: Join free Sanfoundry classes at Telegram or Youtube

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.
advertisement

Sanfoundry Global Education & Learning Series – Linux Administration & Programming.
Here’s the list of Best Books in Linux Commands & Shell Programming.
Here’s the list of Best 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.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.