I want to be able to inspect my Linux machine hardware in C. How do I get the information that appear in dmesg in C ? For example, for keyboard the message is input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0 I want to get in my program the label, AT Translated Set 2, and the path, /devices/platform/i8042/serio0/input/input0. Any idea how to do so ?
amit