From edcd336477880368915245a4b7ddd1bca5940b30 Mon Sep 17 00:00:00 2001 From: "dsteklof@us.ibm.com" Date: Tue, 2 Dec 2003 00:48:01 -0800 Subject: [PATCH] another patch for path problem The quick patch I sent you yesterday fixes it in one location, but there are other points in the library that calls sysfs_get_mnt_path. We need to address all the areas in the library where paths are used. The following patch is a band-aid until we can get a proper path management in the library. --- libsysfs/sysfs_driver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libsysfs/sysfs_driver.c') diff --git a/libsysfs/sysfs_driver.c b/libsysfs/sysfs_driver.c index 0011177e99..1877dbce0b 100644 --- a/libsysfs/sysfs_driver.c +++ b/libsysfs/sysfs_driver.c @@ -182,7 +182,9 @@ static int get_driver_path(const unsigned char *bus, const unsigned char *drv, dprintf("Error getting sysfs mount path\n"); return -1; } - strcat(path, SYSFS_BUS_DIR); + if (sysfs_trailing_slash(path) == 0) + strcat(path, "/"); + strcat(path, SYSFS_BUS_NAME); strcat(path, "/"); strcat(path, bus); strcat(path, SYSFS_DRIVERS_DIR); -- cgit v1.2.3-54-g00ecf