Compare commits
10 Commits
16c35c398c
...
04769a5f86
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04769a5f86 | ||
|
|
a45d921de2 | ||
|
|
66a2553814 | ||
|
|
9280800d17 | ||
|
|
93046f9eaf | ||
|
|
2397c95fb8 | ||
|
|
50499bc9e1 | ||
|
|
cc4f39e7b4 | ||
|
|
5320b665c6 | ||
|
|
7ddfebfe80 |
@ -1,37 +0,0 @@
|
|||||||
From 3ddb98cebda43e56ba023c5e12306a000a60a707 Mon Sep 17 00:00:00 2001
|
|
||||||
From: chrfranke <authors@smartmontools.org>
|
|
||||||
Date: Wed, 28 Mar 2018 19:37:45 +0000
|
|
||||||
Subject: [PATCH 124/291] os_linux.cpp: Fix device scan crash on missing
|
|
||||||
/proc/devices.
|
|
||||||
|
|
||||||
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4723 4ea69e1a-61f1-4043-bf83-b5c94c648137
|
|
||||||
---
|
|
||||||
smartmontools/ChangeLog | 2 ++
|
|
||||||
smartmontools/os_linux.cpp | 4 +++-
|
|
||||||
2 files changed, 5 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/smartmontools/os_linux.cpp b/smartmontools/os_linux.cpp
|
|
||||||
index 6df97e94..29203409 100644
|
|
||||||
--- a/smartmontools/os_linux.cpp
|
|
||||||
+++ b/smartmontools/os_linux.cpp
|
|
||||||
@@ -5,7 +5,7 @@
|
|
||||||
*
|
|
||||||
* Copyright (C) 2003-11 Bruce Allen
|
|
||||||
* Copyright (C) 2003-11 Doug Gilbert <dgilbert@interlog.com>
|
|
||||||
- * Copyright (C) 2008-17 Christian Franke
|
|
||||||
+ * Copyright (C) 2008-18 Christian Franke
|
|
||||||
*
|
|
||||||
* Original AACRaid code:
|
|
||||||
* Copyright (C) 2014 Raghava Aditya <raghava.aditya@pmcs.com>
|
|
||||||
@@ -2961,6 +2961,8 @@ bool linux_smart_interface::get_dev_megasas(smart_device_list & devlist)
|
|
||||||
char line[128];
|
|
||||||
bool scan_megasas = false;
|
|
||||||
FILE * fp = fopen("/proc/devices", "r");
|
|
||||||
+ if (!fp)
|
|
||||||
+ return false;
|
|
||||||
while (fgets(line, sizeof(line), fp) != NULL) {
|
|
||||||
n1=0;
|
|
||||||
if (sscanf(line, "%d megaraid_sas_ioctl%n", &mjr, &n1) == 1 && n1 == 22) {
|
|
||||||
--
|
|
||||||
2.19.1
|
|
||||||
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
From 3e342f88588499b26dbef61a2fe78e9a4838567a Mon Sep 17 00:00:00 2001
|
|
||||||
From: chrfranke <authors@smartmontools.org>
|
|
||||||
Date: Wed, 26 Sep 2018 19:44:15 +0000
|
|
||||||
Subject: [PATCH 186/291] smartd.cpp: Always ignore failure of ATA SMART ENABLE
|
|
||||||
command if '-T permissive' is specified. Useful for testing on virtual
|
|
||||||
machines.
|
|
||||||
|
|
||||||
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4790 4ea69e1a-61f1-4043-bf83-b5c94c648137
|
|
||||||
---
|
|
||||||
smartmontools/ChangeLog | 6 ++++++
|
|
||||||
smartmontools/smartd.cpp | 12 +++++++++---
|
|
||||||
2 files changed, 15 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/smartmontools/smartd.cpp b/smartmontools/smartd.cpp
|
|
||||||
index 0692ca4d..fc54b233 100644
|
|
||||||
--- a/smartmontools/smartd.cpp
|
|
||||||
+++ b/smartmontools/smartd.cpp
|
|
||||||
@@ -2037,10 +2037,16 @@ static int ATADeviceScan(dev_config & cfg, dev_state & state, ata_device * atade
|
|
||||||
PrintOut(LOG_INFO,"Device: %s, could not enable SMART capability\n",name);
|
|
||||||
|
|
||||||
if (ataIsSmartEnabled(&drive) <= 0) {
|
|
||||||
- CloseDevice(atadev, name);
|
|
||||||
- return 2;
|
|
||||||
+ if (!cfg.permissive) {
|
|
||||||
+ PrintOut(LOG_INFO, "Device: %s, to proceed anyway, use '-T permissive' Directive.\n", name);
|
|
||||||
+ CloseDevice(atadev, name);
|
|
||||||
+ return 2;
|
|
||||||
+ }
|
|
||||||
+ PrintOut(LOG_INFO, "Device: %s, proceeding since '-T permissive' Directive given.\n", name);
|
|
||||||
+ }
|
|
||||||
+ else {
|
|
||||||
+ PrintOut(LOG_INFO, "Device: %s, proceeding since SMART is already enabled\n", name);
|
|
||||||
}
|
|
||||||
- PrintOut(LOG_INFO, "Device: %s, proceeding since SMART is already enabled\n", name);
|
|
||||||
}
|
|
||||||
|
|
||||||
// disable device attribute autosave...
|
|
||||||
--
|
|
||||||
2.19.1
|
|
||||||
|
|
||||||
@ -1,62 +0,0 @@
|
|||||||
From f201d3a068d2bbdc36b89d248b521ba2da3ad741 Mon Sep 17 00:00:00 2001
|
|
||||||
From: chrfranke <authors@smartmontools.org>
|
|
||||||
Date: Thu, 11 Oct 2018 18:51:35 +0000
|
|
||||||
Subject: [PATCH 204/291] os_linux.cpp: Fix '-d megaraid' open crash on missing
|
|
||||||
/proc/devices. There is no /proc/devices on ESXi (see #800) and WSL.
|
|
||||||
|
|
||||||
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4809 4ea69e1a-61f1-4043-bf83-b5c94c648137
|
|
||||||
---
|
|
||||||
smartmontools/ChangeLog | 5 +++++
|
|
||||||
smartmontools/os_linux.cpp | 34 ++++++++++++++++++----------------
|
|
||||||
2 files changed, 23 insertions(+), 16 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/smartmontools/os_linux.cpp b/smartmontools/os_linux.cpp
|
|
||||||
index 1a1b0858..9790818a 100644
|
|
||||||
--- a/smartmontools/os_linux.cpp
|
|
||||||
+++ b/smartmontools/os_linux.cpp
|
|
||||||
@@ -1299,24 +1299,26 @@ bool linux_megaraid_device::open()
|
|
||||||
}
|
|
||||||
/* Perform mknod of device ioctl node */
|
|
||||||
FILE * fp = fopen("/proc/devices", "r");
|
|
||||||
- while (fgets(line, sizeof(line), fp) != NULL) {
|
|
||||||
- int n1 = 0;
|
|
||||||
- if (sscanf(line, "%d megaraid_sas_ioctl%n", &mjr, &n1) == 1 && n1 == 22) {
|
|
||||||
- n1=mknod("/dev/megaraid_sas_ioctl_node", S_IFCHR, makedev(mjr, 0));
|
|
||||||
- if(report > 0)
|
|
||||||
- pout("Creating /dev/megaraid_sas_ioctl_node = %d\n", n1 >= 0 ? 0 : errno);
|
|
||||||
- if (n1 >= 0 || errno == EEXIST)
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
- else if (sscanf(line, "%d megadev%n", &mjr, &n1) == 1 && n1 == 11) {
|
|
||||||
- n1=mknod("/dev/megadev0", S_IFCHR, makedev(mjr, 0));
|
|
||||||
- if(report > 0)
|
|
||||||
- pout("Creating /dev/megadev0 = %d\n", n1 >= 0 ? 0 : errno);
|
|
||||||
- if (n1 >= 0 || errno == EEXIST)
|
|
||||||
- break;
|
|
||||||
+ if (fp) {
|
|
||||||
+ while (fgets(line, sizeof(line), fp) != NULL) {
|
|
||||||
+ int n1 = 0;
|
|
||||||
+ if (sscanf(line, "%d megaraid_sas_ioctl%n", &mjr, &n1) == 1 && n1 == 22) {
|
|
||||||
+ n1=mknod("/dev/megaraid_sas_ioctl_node", S_IFCHR, makedev(mjr, 0));
|
|
||||||
+ if(report > 0)
|
|
||||||
+ pout("Creating /dev/megaraid_sas_ioctl_node = %d\n", n1 >= 0 ? 0 : errno);
|
|
||||||
+ if (n1 >= 0 || errno == EEXIST)
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ else if (sscanf(line, "%d megadev%n", &mjr, &n1) == 1 && n1 == 11) {
|
|
||||||
+ n1=mknod("/dev/megadev0", S_IFCHR, makedev(mjr, 0));
|
|
||||||
+ if(report > 0)
|
|
||||||
+ pout("Creating /dev/megadev0 = %d\n", n1 >= 0 ? 0 : errno);
|
|
||||||
+ if (n1 >= 0 || errno == EEXIST)
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
+ fclose(fp);
|
|
||||||
}
|
|
||||||
- fclose(fp);
|
|
||||||
|
|
||||||
/* Open Device IOCTL node */
|
|
||||||
if ((m_fd = ::open("/dev/megaraid_sas_ioctl_node", O_RDWR)) >= 0) {
|
|
||||||
--
|
|
||||||
2.19.1
|
|
||||||
|
|
||||||
@ -1,51 +0,0 @@
|
|||||||
From 2520e4983eb084cf0b48dded77d358d9f085b9d2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: samm-git <samm@os2.kiev.ua>
|
|
||||||
Date: Fri, 9 Nov 2018 07:18:23 +0000
|
|
||||||
Subject: [PATCH 225/291] os_darwin.cpp, os_freebsd.cpp: fix return value in
|
|
||||||
error paths
|
|
||||||
|
|
||||||
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4831 4ea69e1a-61f1-4043-bf83-b5c94c648137
|
|
||||||
---
|
|
||||||
smartmontools/ChangeLog | 5 +++++
|
|
||||||
smartmontools/os_darwin.cpp | 4 ++--
|
|
||||||
smartmontools/os_freebsd.cpp | 2 +-
|
|
||||||
3 files changed, 8 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/smartmontools/os_darwin.cpp b/smartmontools/os_darwin.cpp
|
|
||||||
index 1620981b..25888047 100644
|
|
||||||
--- a/smartmontools/os_darwin.cpp
|
|
||||||
+++ b/smartmontools/os_darwin.cpp
|
|
||||||
@@ -403,7 +403,7 @@ bool darwin_ata_device::ata_pass_through(const ata_cmd_in & in, ata_cmd_out & ou
|
|
||||||
int rc = 0;
|
|
||||||
|
|
||||||
if (! ifp)
|
|
||||||
- return -1;
|
|
||||||
+ return false;
|
|
||||||
smartIf = *ifp;
|
|
||||||
clear_err(); errno = 0;
|
|
||||||
do {
|
|
||||||
@@ -558,7 +558,7 @@ bool darwin_nvme_device::nvme_pass_through(const nvme_cmd_in & in, nvme_cmd_out
|
|
||||||
unsigned int page = in.cdw10 & 0xff;
|
|
||||||
|
|
||||||
if (! ifp)
|
|
||||||
- return -1;
|
|
||||||
+ return false;
|
|
||||||
smartIfNVMe = *ifp;
|
|
||||||
// currently only GetIdentifyData and SMARTReadData are supported
|
|
||||||
switch (in.opcode) {
|
|
||||||
diff --git a/smartmontools/os_freebsd.cpp b/smartmontools/os_freebsd.cpp
|
|
||||||
index 49f82c58..ffe3b151 100644
|
|
||||||
--- a/smartmontools/os_freebsd.cpp
|
|
||||||
+++ b/smartmontools/os_freebsd.cpp
|
|
||||||
@@ -613,7 +613,7 @@ bool freebsd_escalade_device::ata_pass_through(const ata_cmd_in & in, ata_cmd_ou
|
|
||||||
|
|
||||||
if (m_disknum < 0) {
|
|
||||||
printwarning(NO_DISK_3WARE,NULL);
|
|
||||||
- return -1;
|
|
||||||
+ return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(ioctl_buffer, 0, TW_IOCTL_BUFFER_SIZE);
|
|
||||||
--
|
|
||||||
2.19.1
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
smartmontools-7.3.tar.gz
Normal file
BIN
smartmontools-7.3.tar.gz
Normal file
Binary file not shown.
@ -1,16 +1,16 @@
|
|||||||
Name: smartmontools
|
Name: smartmontools
|
||||||
Version: 7.1
|
Version: 7.3
|
||||||
Release: 1
|
Release: 1
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: S.M.A.R.T. utility toolset
|
Summary: S.M.A.R.T. utility toolset
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://smartmontools.sourceforge.net/
|
URL: http://smartmontools.sourceforge.net/
|
||||||
|
|
||||||
Source0: https://sourceforge.net/projects/smartmontools/files/smartmontools/7.1/smartmontools-7.1.tar.gz/download
|
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
||||||
Source1: smartmontools.sysconf
|
Source1: smartmontools.sysconf
|
||||||
|
|
||||||
BuildRequires: groff gcc-c++ automake
|
BuildRequires: groff gcc-c++ automake
|
||||||
BuildRequires: libselinux-devel libcap-ng-devel systemd-units
|
BuildRequires: libselinux-devel libcap-ng-devel systemd systemd-units systemd-devel
|
||||||
|
|
||||||
Requires(preun): systemd-units
|
Requires(preun): systemd-units
|
||||||
Requires(post): systemd-units
|
Requires(post): systemd-units
|
||||||
@ -41,7 +41,7 @@ This contains man files for the using of smartmontools.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -i
|
autoreconf -i
|
||||||
%configure --with-selinux --with-libcap-ng=yes --with-systemdsystemunitdir=%{_unitdir} --sysconfdir=%{_sysconfdir}/%{name}/
|
%configure --with-selinux --with-libcap-ng=yes --with-libsystemd --with-systemdsystemunitdir=%{_unitdir} --sysconfdir=%{_sysconfdir}/%{name}/ --with-systemdenvfile=%{_sysconfdir}/sysconfig/%{name}
|
||||||
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS -fpie" LDFLAGS="-pie -Wl,-z,relro,-z,now"
|
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS -fpie" LDFLAGS="-pie -Wl,-z,relro,-z,now"
|
||||||
|
|
||||||
sed -i 's|/etc/smartmontools/sysconfig|/etc/sysconfig|g' smartd.service
|
sed -i 's|/etc/smartmontools/sysconfig|/etc/sysconfig|g' smartd.service
|
||||||
@ -80,6 +80,12 @@ mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 08 2022 hkgy <kaguyahatu@outlook.com> - 1:7.3-1
|
||||||
|
- update package to 7.3
|
||||||
|
|
||||||
|
* Thu Jan 14 2021 yanglongkang <yanglongkang@huawei.com> - 7.2-1
|
||||||
|
- update package to 7.2
|
||||||
|
|
||||||
* Thu Jul 16 2020 yanglongkang <yanglongkang@huawei.com> - 7.1-1
|
* Thu Jul 16 2020 yanglongkang <yanglongkang@huawei.com> - 7.1-1
|
||||||
- update package to 7.1
|
- update package to 7.1
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user