@@ -64,4 +64,7 @@ char * prio_name (struct prio *);
char * prio_args (struct prio *);
int prio_set_args (struct prio *, char *);
+/* The only function exported by prioritizer dynamic libraries (.so) */
+int getprio(struct path *, char *, unsigned int);
+
#endif /* _PRIO_H */
@@ -2,7 +2,7 @@
#include "prio.h"
-int getprio (struct path * pp, char * args)
+int getprio(struct path * pp, char * args, unsigned int timeout)
{
return 1;
}
@@ -106,7 +106,7 @@ int datacore_prio (const char *dev, int sg_fd, char * args)
return 0;
}
-int getprio (struct path * pp, char * args)
+int getprio(struct path * pp, char * args, unsigned int timeout)
{
return datacore_prio(pp->dev, pp->fd, args);
}
@@ -138,7 +138,7 @@ int iet_prio(const char *dev, char * args)
return 10;
}
-int getprio(struct path * pp, char * args)
+int getprio(struct path * pp, char * args, unsigned int timeout)
{
return iet_prio(pp->dev, args);
}
@@ -5,7 +5,7 @@
#include "prio.h"
-int getprio (struct path * pp, char * args)
+int getprio(struct path * pp, char * args, unsigned int timeout)
{
struct timeval tv;
@@ -151,7 +151,7 @@ int prio_path_weight(struct path *pp, char *prio_args)
return priority;
}
-int getprio(struct path *pp, char *args)
+int getprio(struct path *pp, char *args, unsigned int timeout)
{
return prio_path_weight(pp, args);
}
Additionally, ensure that the compiler checks the getprio() prototype. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> --- libmultipath/prio.h | 3 +++ libmultipath/prioritizers/const.c | 2 +- libmultipath/prioritizers/datacore.c | 2 +- libmultipath/prioritizers/iet.c | 2 +- libmultipath/prioritizers/random.c | 2 +- libmultipath/prioritizers/weightedpath.c | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-)