chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] fix up some duplicated function compiler warnings in libsysfs
[elogind.git]
/
libsysfs
/
sysfs_driver.c
diff --git
a/libsysfs/sysfs_driver.c
b/libsysfs/sysfs_driver.c
index 0011177e9959b6de8218e42070e9519045ba37f4..1877dbce0b1f40480ef4052a0dde578960d6dea0 100644
(file)
--- 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;
}
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);
strcat(path, "/");
strcat(path, bus);
strcat(path, SYSFS_DRIVERS_DIR);