Files
pmaports-rtwo/extra-repos/systemd/multipath-tools/fix-basename.patch
T
2025-01-10 13:02:34 +01:00

15 lines
414 B
Diff

diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index d809490..62154fd 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -43,6 +43,9 @@
#include "sysfs.h"
#include "io_err_stat.h"
+#define basename(dev) \
+ (strrchr((dev),'/') ? strrchr((dev),'/')+1 : (dev))
+
/* group paths in pg by host adapter
*/
int group_by_host_adapter(struct pathgroup *pgp, vector adapters)