Just like "show paths format ...", it gives users more control
over the report format of multipaths information.
Example:
$ sudo multipathd -k'show maps format "%n %s %S %d %t %r %Q %N"'
name vend/prod/rev size sysfs dm-st write_prot queueing paths
353333330000007d0 Linux,scsi_debug 8.0M dm-1 active rw - 2
353333330000007d1 Linux,scsi_debug 8.0M dm-2 active rw - 2
35333333000000bb8 Linux,scsi_debug 8.0M dm-3 active rw - 2
35333333000000bb9 Linux,scsi_debug 8.0M dm-4 active rw - 2
add_handler(LIST+MAPS, NULL);
add_handler(LIST+MAPS+STATUS, NULL);
add_handler(LIST+MAPS+STATS, NULL);
+ add_handler(LIST+MAPS+FMT, NULL);
add_handler(LIST+MAPS+TOPOLOGY, NULL);
add_handler(LIST+TOPOLOGY, NULL);
add_handler(LIST+MAP+TOPOLOGY, NULL);
}
int
+cli_list_maps_fmt (void * v, char ** reply, int * len, void * data)
+{
+ struct vectors * vecs = (struct vectors *)data;
+ char * fmt = get_keyparam(v, FMT);
+
+ condlog(3, "list maps (operator)");
+
+ return show_maps(reply, len, vecs, fmt);
+}
+
+int
cli_list_maps (void * v, char ** reply, int * len, void * data)
{
struct vectors * vecs = (struct vectors *)data;
int cli_list_paths_fmt (void * v, char ** reply, int * len, void * data);
int cli_list_status (void * v, char ** reply, int * len, void * data);
int cli_list_maps (void * v, char ** reply, int * len, void * data);
+int cli_list_maps_fmt (void * v, char ** reply, int * len, void * data);
int cli_list_maps_status (void * v, char ** reply, int * len, void * data);
int cli_list_maps_stats (void * v, char ** reply, int * len, void * data);
int cli_list_map_topology (void * v, char ** reply, int * len, void * data);
set_handler_callback(LIST+STATUS, cli_list_status);
set_handler_callback(LIST+MAPS+STATUS, cli_list_maps_status);
set_handler_callback(LIST+MAPS+STATS, cli_list_maps_stats);
+ set_handler_callback(LIST+MAPS+FMT, cli_list_maps_fmt);
set_handler_callback(LIST+MAPS+TOPOLOGY, cli_list_maps_topology);
set_handler_callback(LIST+TOPOLOGY, cli_list_maps_topology);
set_handler_callback(LIST+MAP+TOPOLOGY, cli_list_map_topology);