This patch filters out JBOD HDDs from showing up as devices for selection in the device statistics menu. Without this patch, they are selectable, but return without displaying any data.
Signed-off-by: Brian King <brk...@linux.vnet.ibm.com> --- iprconfig.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff -puN iprconfig.c~iprutils_device_stats_menu_remove_jbod iprconfig.c --- iprutils.patched/iprconfig.c~iprutils_device_stats_menu_remove_jbod 2016-10-25 13:52:22.432108811 -0500 +++ iprutils.patched-bjking1/iprconfig.c 2016-10-25 13:52:22.440108778 -0500 @@ -2886,6 +2886,8 @@ int statistics_menu(i_container *i_con) char *buffer[2]; int toggle = 1; struct ipr_dev *vset; + struct ipr_sas_std_inq_data std_inq; + processing(); rc = RC_SUCCESS; @@ -2898,7 +2900,18 @@ int statistics_menu(i_container *i_con) if (!ioa->ioa.scsi_dev_data) continue; - num_lines += print_standalone_disks(ioa, &i_con, buffer, 2); + __for_each_standalone_disk(ioa, dev) { + if (ipr_is_gscsi(dev)) { + rc = ipr_inquiry(dev, IPR_STD_INQUIRY, &std_inq, sizeof(std_inq)); + if (rc || !std_inq.is_ssd) + continue; + } + + print_dev(k, dev, buffer, "%1", 2+k); + i_con = add_i_con(i_con, "\0", dev); + num_lines++; + } + num_lines += print_hotspare_disks(ioa, &i_con, buffer, 2); for_each_vset(ioa, vset) { _ ------------------------------------------------------------------------------ The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik _______________________________________________ Iprdd-devel mailing list Iprdd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iprdd-devel