From 785472e9bbe429ddce13e1a2e2fab1b48a2f4aba Mon Sep 17 00:00:00 2001 From: Markeryang <747675909@qq.com> Date: Thu, 16 Jul 2020 20:07:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=200000-os?= =?UTF-8?q?=5Flinux.cpp-os=5Fnetbsd.cpp-fix-crash-on-scan-if-WITH.patch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...netbsd.cpp-fix-crash-on-scan-if-WITH.patch | 42 ------------------- 1 file changed, 42 deletions(-) delete mode 100644 0000-os_linux.cpp-os_netbsd.cpp-fix-crash-on-scan-if-WITH.patch diff --git a/0000-os_linux.cpp-os_netbsd.cpp-fix-crash-on-scan-if-WITH.patch b/0000-os_linux.cpp-os_netbsd.cpp-fix-crash-on-scan-if-WITH.patch deleted file mode 100644 index c84ecf1..0000000 --- a/0000-os_linux.cpp-os_netbsd.cpp-fix-crash-on-scan-if-WITH.patch +++ /dev/null @@ -1,42 +0,0 @@ -From d936fd78afb9d1fa68237367f33ebaa4f0ac1de4 Mon Sep 17 00:00:00 2001 -From: samm-git -Date: Mon, 6 Nov 2017 22:06:52 +0000 -Subject: [PATCH 004/291] os_linux.cpp/os_netbsd.cpp: fix crash on --scan if - WITH_NVME_DEVICESCAN is not set and '-d ' is not specified - -git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4599 4ea69e1a-61f1-4043-bf83-b5c94c648137 ---- - smartmontools/ChangeLog | 5 +++++ - smartmontools/os_linux.cpp | 2 +- - smartmontools/os_netbsd.cpp | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/smartmontools/os_linux.cpp b/smartmontools/os_linux.cpp -index 407f3cd2..46958ae0 100644 ---- a/smartmontools/os_linux.cpp -+++ b/smartmontools/os_linux.cpp -@@ -3010,7 +3010,7 @@ bool linux_smart_interface::scan_smart_devices(smart_device_list & devlist, - #ifdef WITH_NVME_DEVICESCAN // TODO: Remove when NVMe support is no longer EXPERIMENTAL - bool scan_nvme = (!*type || !strcmp(type, "nvme")); - #else -- bool scan_nvme = ( !strcmp(type, "nvme")); -+ bool scan_nvme = (type && !strcmp(type, "nvme")); - #endif - - if (!(scan_ata || scan_scsi || scan_nvme)) { -diff --git a/smartmontools/os_netbsd.cpp b/smartmontools/os_netbsd.cpp -index 4320cc47..4f8b2cbf 100644 ---- a/smartmontools/os_netbsd.cpp -+++ b/smartmontools/os_netbsd.cpp -@@ -754,7 +754,7 @@ bool netbsd_smart_interface::scan_smart_devices(smart_device_list & devlist, - #ifdef WITH_NVME_DEVICESCAN // TODO: Remove when NVMe support is no longer EXPERIMENTAL - bool scan_nvme = !*type || !strcmp(type, "nvme"); - #else -- bool scan_nvme = !strcmp(type, "nvme"); -+ bool scan_nvme = type && !strcmp(type, "nvme"); - #endif - - // Make namelists --- -2.19.1 -