|
|
a609fc |
---
|
|
|
a609fc |
multipathd/cli.c | 8 +++-
|
|
|
a609fc |
multipathd/main.c | 90 +++++++++++++++++++++++++++---------------------------
|
|
|
a609fc |
2 files changed, 50 insertions(+), 48 deletions(-)
|
|
|
a609fc |
|
|
|
a609fc |
Index: multipath-tools-130222/multipathd/cli.c
|
|
|
a609fc |
===================================================================
|
|
|
a609fc |
--- multipath-tools-130222.orig/multipathd/cli.c
|
|
|
a609fc |
+++ multipath-tools-130222/multipathd/cli.c
|
|
|
a609fc |
@@ -308,9 +308,11 @@ fingerprint(vector vec)
|
|
|
a609fc |
if (!vec)
|
|
|
a609fc |
return 0;
|
|
|
a609fc |
|
|
|
a609fc |
- vector_foreach_slot(vec, kw, i)
|
|
|
a609fc |
- fp += kw->code;
|
|
|
a609fc |
-
|
|
|
a609fc |
+ vector_foreach_slot(vec, kw, i) {
|
|
|
a609fc |
+ if (fp & kw->code)
|
|
|
a609fc |
+ return (uint64_t)-1;
|
|
|
a609fc |
+ fp |= kw->code;
|
|
|
a609fc |
+ }
|
|
|
a609fc |
return fp;
|
|
|
a609fc |
}
|
|
|
a609fc |
|
|
|
a609fc |
Index: multipath-tools-130222/multipathd/main.c
|
|
|
a609fc |
===================================================================
|
|
|
a609fc |
--- multipath-tools-130222.orig/multipathd/main.c
|
|
|
a609fc |
+++ multipath-tools-130222/multipathd/main.c
|
|
|
a609fc |
@@ -1076,54 +1076,54 @@ uxlsnrloop (void * ap)
|
|
|
a609fc |
if (cli_init())
|
|
|
a609fc |
return NULL;
|
|
|
a609fc |
|
|
|
a609fc |
- set_handler_callback(LIST+PATHS, cli_list_paths);
|
|
|
a609fc |
- set_handler_callback(LIST+PATHS+FMT, cli_list_paths_fmt);
|
|
|
a609fc |
- set_handler_callback(LIST+PATHS+RAW+FMT, cli_list_paths_raw);
|
|
|
a609fc |
- set_handler_callback(LIST+MAPS, cli_list_maps);
|
|
|
a609fc |
- set_handler_callback(LIST+STATUS, cli_list_status);
|
|
|
a609fc |
- set_handler_callback(LIST+DAEMON, cli_list_daemon);
|
|
|
a609fc |
- set_handler_callback(LIST+MAPS+STATUS, cli_list_maps_status);
|
|
|
a609fc |
- set_handler_callback(LIST+MAPS+STATS, cli_list_maps_stats);
|
|
|
a609fc |
- set_handler_callback(LIST+MAPS+FMT, cli_list_maps_fmt);
|
|
|
a609fc |
- set_handler_callback(LIST+MAPS+RAW+FMT, cli_list_maps_raw);
|
|
|
a609fc |
- set_handler_callback(LIST+MAPS+TOPOLOGY, cli_list_maps_topology);
|
|
|
a609fc |
- set_handler_callback(LIST+TOPOLOGY, cli_list_maps_topology);
|
|
|
a609fc |
- set_handler_callback(LIST+MAPS+JSON, cli_list_maps_json);
|
|
|
a609fc |
- set_handler_callback(LIST+MAP+TOPOLOGY, cli_list_map_topology);
|
|
|
a609fc |
- set_handler_callback(LIST+MAP+JSON, cli_list_map_json);
|
|
|
a609fc |
- set_handler_callback(LIST+CONFIG, cli_list_config);
|
|
|
a609fc |
- set_handler_callback(LIST+BLACKLIST, cli_list_blacklist);
|
|
|
a609fc |
- set_handler_callback(LIST+DEVICES, cli_list_devices);
|
|
|
a609fc |
- set_handler_callback(LIST+WILDCARDS, cli_list_wildcards);
|
|
|
a609fc |
- set_handler_callback(RESET+MAPS+STATS, cli_reset_maps_stats);
|
|
|
a609fc |
- set_handler_callback(RESET+MAP+STATS, cli_reset_map_stats);
|
|
|
a609fc |
- set_handler_callback(ADD+PATH, cli_add_path);
|
|
|
a609fc |
- set_handler_callback(DEL+PATH, cli_del_path);
|
|
|
a609fc |
- set_handler_callback(ADD+MAP, cli_add_map);
|
|
|
a609fc |
- set_handler_callback(DEL+MAP, cli_del_map);
|
|
|
a609fc |
- set_handler_callback(SWITCH+MAP+GROUP, cli_switch_group);
|
|
|
a609fc |
+ set_handler_callback(LIST|PATHS, cli_list_paths);
|
|
|
a609fc |
+ set_handler_callback(LIST|PATHS|FMT, cli_list_paths_fmt);
|
|
|
a609fc |
+ set_handler_callback(LIST|PATHS|RAW|FMT, cli_list_paths_raw);
|
|
|
a609fc |
+ set_handler_callback(LIST|MAPS, cli_list_maps);
|
|
|
a609fc |
+ set_handler_callback(LIST|STATUS, cli_list_status);
|
|
|
a609fc |
+ set_handler_callback(LIST|DAEMON, cli_list_daemon);
|
|
|
a609fc |
+ set_handler_callback(LIST|MAPS|STATUS, cli_list_maps_status);
|
|
|
a609fc |
+ set_handler_callback(LIST|MAPS|STATS, cli_list_maps_stats);
|
|
|
a609fc |
+ set_handler_callback(LIST|MAPS|FMT, cli_list_maps_fmt);
|
|
|
a609fc |
+ set_handler_callback(LIST|MAPS|RAW|FMT, cli_list_maps_raw);
|
|
|
a609fc |
+ set_handler_callback(LIST|MAPS|TOPOLOGY, cli_list_maps_topology);
|
|
|
a609fc |
+ set_handler_callback(LIST|TOPOLOGY, cli_list_maps_topology);
|
|
|
a609fc |
+ set_handler_callback(LIST|MAPS|JSON, cli_list_maps_json);
|
|
|
a609fc |
+ set_handler_callback(LIST|MAP|TOPOLOGY, cli_list_map_topology);
|
|
|
a609fc |
+ set_handler_callback(LIST|MAP|JSON, cli_list_map_json);
|
|
|
a609fc |
+ set_handler_callback(LIST|CONFIG, cli_list_config);
|
|
|
a609fc |
+ set_handler_callback(LIST|BLACKLIST, cli_list_blacklist);
|
|
|
a609fc |
+ set_handler_callback(LIST|DEVICES, cli_list_devices);
|
|
|
a609fc |
+ set_handler_callback(LIST|WILDCARDS, cli_list_wildcards);
|
|
|
a609fc |
+ set_handler_callback(RESET|MAPS|STATS, cli_reset_maps_stats);
|
|
|
a609fc |
+ set_handler_callback(RESET|MAP|STATS, cli_reset_map_stats);
|
|
|
a609fc |
+ set_handler_callback(ADD|PATH, cli_add_path);
|
|
|
a609fc |
+ set_handler_callback(DEL|PATH, cli_del_path);
|
|
|
a609fc |
+ set_handler_callback(ADD|MAP, cli_add_map);
|
|
|
a609fc |
+ set_handler_callback(DEL|MAP, cli_del_map);
|
|
|
a609fc |
+ set_handler_callback(SWITCH|MAP|GROUP, cli_switch_group);
|
|
|
a609fc |
set_handler_callback(RECONFIGURE, cli_reconfigure);
|
|
|
a609fc |
- set_handler_callback(SUSPEND+MAP, cli_suspend);
|
|
|
a609fc |
- set_handler_callback(RESUME+MAP, cli_resume);
|
|
|
a609fc |
- set_handler_callback(RESIZE+MAP, cli_resize);
|
|
|
a609fc |
- set_handler_callback(RELOAD+MAP, cli_reload);
|
|
|
a609fc |
- set_handler_callback(RESET+MAP, cli_reassign);
|
|
|
a609fc |
- set_handler_callback(REINSTATE+PATH, cli_reinstate);
|
|
|
a609fc |
- set_handler_callback(FAIL+PATH, cli_fail);
|
|
|
a609fc |
- set_handler_callback(DISABLEQ+MAP, cli_disable_queueing);
|
|
|
a609fc |
- set_handler_callback(RESTOREQ+MAP, cli_restore_queueing);
|
|
|
a609fc |
- set_handler_callback(DISABLEQ+MAPS, cli_disable_all_queueing);
|
|
|
a609fc |
- set_handler_callback(RESTOREQ+MAPS, cli_restore_all_queueing);
|
|
|
a609fc |
+ set_handler_callback(SUSPEND|MAP, cli_suspend);
|
|
|
a609fc |
+ set_handler_callback(RESUME|MAP, cli_resume);
|
|
|
a609fc |
+ set_handler_callback(RESIZE|MAP, cli_resize);
|
|
|
a609fc |
+ set_handler_callback(RELOAD|MAP, cli_reload);
|
|
|
a609fc |
+ set_handler_callback(RESET|MAP, cli_reassign);
|
|
|
a609fc |
+ set_handler_callback(REINSTATE|PATH, cli_reinstate);
|
|
|
a609fc |
+ set_handler_callback(FAIL|PATH, cli_fail);
|
|
|
a609fc |
+ set_handler_callback(DISABLEQ|MAP, cli_disable_queueing);
|
|
|
a609fc |
+ set_handler_callback(RESTOREQ|MAP, cli_restore_queueing);
|
|
|
a609fc |
+ set_handler_callback(DISABLEQ|MAPS, cli_disable_all_queueing);
|
|
|
a609fc |
+ set_handler_callback(RESTOREQ|MAPS, cli_restore_all_queueing);
|
|
|
a609fc |
set_handler_callback(QUIT, cli_quit);
|
|
|
a609fc |
set_handler_callback(SHUTDOWN, cli_shutdown);
|
|
|
a609fc |
- set_handler_callback(GETPRSTATUS+MAP, cli_getprstatus);
|
|
|
a609fc |
- set_handler_callback(SETPRSTATUS+MAP, cli_setprstatus);
|
|
|
a609fc |
- set_handler_callback(UNSETPRSTATUS+MAP, cli_unsetprstatus);
|
|
|
a609fc |
- set_handler_callback(GETPRKEY+MAP, cli_getprkey);
|
|
|
a609fc |
- set_handler_callback(SETPRKEY+MAP+KEY, cli_setprkey);
|
|
|
a609fc |
- set_handler_callback(UNSETPRKEY+MAP, cli_unsetprkey);
|
|
|
a609fc |
- set_handler_callback(FORCEQ+DAEMON, cli_force_no_daemon_q);
|
|
|
a609fc |
- set_handler_callback(RESTOREQ+DAEMON, cli_restore_no_daemon_q);
|
|
|
a609fc |
+ set_handler_callback(GETPRSTATUS|MAP, cli_getprstatus);
|
|
|
a609fc |
+ set_handler_callback(SETPRSTATUS|MAP, cli_setprstatus);
|
|
|
a609fc |
+ set_handler_callback(UNSETPRSTATUS|MAP, cli_unsetprstatus);
|
|
|
a609fc |
+ set_handler_callback(GETPRKEY|MAP, cli_getprkey);
|
|
|
a609fc |
+ set_handler_callback(SETPRKEY|MAP|KEY, cli_setprkey);
|
|
|
a609fc |
+ set_handler_callback(UNSETPRKEY|MAP, cli_unsetprkey);
|
|
|
a609fc |
+ set_handler_callback(FORCEQ|DAEMON, cli_force_no_daemon_q);
|
|
|
a609fc |
+ set_handler_callback(RESTOREQ|DAEMON, cli_restore_no_daemon_q);
|
|
|
a609fc |
|
|
|
a609fc |
umask(077);
|
|
|
a609fc |
uxsock_listen(&uxsock_trigger, ap);
|