chiark / gitweb /
[PATCH] patch for libsysfs sysfs directory handling
authordsteklof@us.ibm.com <dsteklof@us.ibm.com>
Wed, 12 Nov 2003 13:37:24 +0000 (05:37 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:06:23 +0000 (21:06 -0700)
commit8d8172514d8c29cd5b2c51a0825268b823eb8294
tree8b1ede69955e047462e41475e8b8803b922650d5
parente308ebb70f9d1e389577c2a8829cf2d210cd6a19
[PATCH] patch for libsysfs sysfs directory handling

Here's a quick patch to:

1) Add an environment variable "SYSFS_PATH" that libsysfs will check
for when getting mount point before searching system's sysfs mount
point.

2) A quick fix to sysfs_get_link where the bug was.

I have tested this out with libsysfs and with udev. I couldn't test
with klibc because I haven't got the tree to build with klibc without
my changes either. I made the link but get an error finding
linux/linits.h. I will figure that out.

Please have a look at the patch. If it's agreeable, please test it. I
really want to add some generic path manipulation functions for the
sysfs_get_link error, rather than my patch's hack. But, I haven't had
time yet to do that. You really sounded like you needed this for
testing, so I'm sending it out to you. I should probably add a
function to set the env variable(?).
libsysfs/libsysfs.h
libsysfs/sysfs_utils.c