Blame SOURCES/0001-merge-Github-PR-40-and-41.patch

66f3ee
From 028f6b229a138211d17bb32b8668dc73e6724464 Mon Sep 17 00:00:00 2001
66f3ee
From: Lyonel Vincent <lyonel@ezix.org>
66f3ee
Date: Thu, 14 Jun 2018 19:17:26 +0200
66f3ee
Subject: [PATCH 1/8] merge Github PR #40 and #41
66f3ee
66f3ee
Properly handle scsi device type 0x14 (== 20) to add ZBC and ZAC host
66f3ee
managed zoned block devices to the "disk" class. While at it, also add
66f3ee
in scsi_type() the missing type name string for the device
66f3ee
type 0xe (== 14).
66f3ee
66f3ee
---
66f3ee
 lshw.spec.in     | 2 +-
66f3ee
 src/core/scsi.cc | 8 +++++++-
66f3ee
 2 files changed, 8 insertions(+), 2 deletions(-)
66f3ee
66f3ee
diff --git a/lshw.spec.in b/lshw.spec.in
66f3ee
index c597379c3bc8..f7f88b323ce9 100644
66f3ee
--- a/lshw.spec.in
66f3ee
+++ b/lshw.spec.in
66f3ee
@@ -12,7 +12,7 @@ Group: Applications/System
66f3ee
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
66f3ee
 
66f3ee
 %description
66f3ee
-lshw (Hardware Lister) is a small tool to provide detailed informaton on
66f3ee
+lshw (Hardware Lister) is a small tool to provide detailed information on
66f3ee
 the hardware configuration of the machine. It can report exact memory
66f3ee
 configuration, firmware version, mainboard configuration, CPU version
66f3ee
 and speed, cache configuration, bus speed, etc. on DMI-capable x86s
66f3ee
diff --git a/src/core/scsi.cc b/src/core/scsi.cc
66f3ee
index 75061c0fb195..4992c889dd12 100644
66f3ee
--- a/src/core/scsi.cc
66f3ee
+++ b/src/core/scsi.cc
66f3ee
@@ -260,6 +260,10 @@ static const char *scsi_type(int type)
66f3ee
       return "Medium Changer";
66f3ee
     case 0xd:
66f3ee
       return "Enclosure";
66f3ee
+    case 0xe:
66f3ee
+      return "Simplified direct-access device";
66f3ee
+    case 0x14:
66f3ee
+      return "Host managed zoned block device";
66f3ee
     default:
66f3ee
       return "";
66f3ee
   }
66f3ee
@@ -706,6 +710,7 @@ static void scan_sg(hwNode & n)
66f3ee
   {
66f3ee
     case 0:
66f3ee
     case 14:
66f3ee
+    case 20:
66f3ee
       device = hwNode("disk", hw::disk);
66f3ee
       break;
66f3ee
     case 1:
66f3ee
@@ -752,7 +757,8 @@ static void scan_sg(hwNode & n)
66f3ee
   }
66f3ee
   if ((m_id.scsi_type == 4) || (m_id.scsi_type == 5))
66f3ee
     scan_cdrom(device);
66f3ee
-  if ((m_id.scsi_type == 0) || (m_id.scsi_type == 7) || (m_id.scsi_type == 14))
66f3ee
+  if ((m_id.scsi_type == 0) || (m_id.scsi_type == 7) ||
66f3ee
+      (m_id.scsi_type == 14) || (m_id.scsi_type == 20))
66f3ee
     scan_disk(device);
66f3ee
 
66f3ee
   if (!adapter_businfo.empty())
66f3ee
-- 
66f3ee
2.17.1
66f3ee