clean up path/file handling
authorNathan Lynch <ntl@pobox.com>
Tue, 21 Oct 2008 12:14:15 +0000 (07:14 -0500)
committerNathan Lynch <ntl@pobox.com>
Tue, 21 Oct 2008 12:14:15 +0000 (07:14 -0500)
commit69911d608101c7a35d5f929013f84bdb754021e8
tree7ca15fbd37e3bd0de70667e2da6316d406963597
parent228b28a380c75defbe890340609dce7fe5c880b6
clean up path/file handling

Stop constructing sysfs paths "by hand" in various functions,
introducing some utility functions (sysfs_opendir, sysfs_file_getline,
etc) that internally use the context's sysfs root path to access the
appropriate filesystem object.  Cache a fd for the sysfs root
directory in the context during initialization so we can openat() the
paths provided by callers.
lib/topology.c