diff options
| author | Benjamin Marzinski <bmarzins@fedoraproject.org> | 2008-05-20 04:37:41 +0000 |
|---|---|---|
| committer | Benjamin Marzinski <bmarzins@fedoraproject.org> | 2008-05-20 04:37:41 +0000 |
| commit | 685fcac1ef870c2b6543bd320a60721f4bc273c2 (patch) | |
| tree | 3bbd7768f08413e12194c0108b0fc7df0b07144f /uevent_fix.patch | |
| parent | ab958e7caf0c2e17dc87701c0c86125efdb9be0d (diff) | |
Updated to latest Upstream 0.4.8 code: multipath-tools-080519.tgz (gitdevice-mapper-multipath-0_4_8-1_fc10
commit id: 42704728855376d2f7da2de1967d7bc71bc54a2f)
Diffstat (limited to 'uevent_fix.patch')
| -rw-r--r-- | uevent_fix.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/uevent_fix.patch b/uevent_fix.patch new file mode 100644 index 0000000..39c424d --- /dev/null +++ b/uevent_fix.patch @@ -0,0 +1,28 @@ +Index: multipath-tools-080515/multipathd/main.c +=================================================================== +--- multipath-tools-080515.orig/multipathd/main.c ++++ multipath-tools-080515/multipathd/main.c +@@ -619,14 +619,20 @@ uxsock_trigger (char * str, char ** repl + 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; |
