2008-09-26 23:28:36 +00:00
|
|
|
Index: multipath-tools/multipathd/main.c
|
2008-05-20 04:37:41 +00:00
|
|
|
===================================================================
|
2008-09-26 23:28:36 +00:00
|
|
|
--- multipath-tools.orig/multipathd/main.c
|
|
|
|
+++ multipath-tools/multipathd/main.c
|
|
|
|
@@ -602,14 +602,20 @@ uxsock_trigger (char * str, char ** repl
|
2008-05-20 04:37:41 +00:00
|
|
|
static int
|
|
|
|
uev_discard(char * devpath)
|
|
|
|
{
|
|
|
|
+ char *tmp;
|
|
|
|
char a[10], b[10];
|
|
|
|
|
|
|
|
/*
|
|
|
|
* keep only block devices, discard partitions
|
|
|
|
*/
|
|
|
|
- if (sscanf(devpath, "/block/%10s", a) != 1 ||
|
|
|
|
- sscanf(devpath, "/block/%10[^/]/%10s", a, b) == 2) {
|
|
|
|
- condlog(4, "discard event on %s", devpath);
|
|
|
|
+ tmp = strstr(devpath, "/block/");
|
|
|
|
+ if (tmp == NULL){
|
|
|
|
+ condlog(0, "no /block/ in '%s'", devpath);
|
|
|
|
+ return 1;
|
|
|
|
+ }
|
|
|
|
+ if (sscanf(tmp, "/block/%10s", a) != 1 ||
|
|
|
|
+ sscanf(tmp, "/block/%10[^/]/%10s", a, b) == 2) {
|
|
|
|
+ condlog(0, "discard event on %s", devpath);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|