summaryrefslogtreecommitdiffstats
path: root/src/hardware/smartctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hardware/smartctl.c')
-rw-r--r--src/hardware/smartctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hardware/smartctl.c b/src/hardware/smartctl.c
index 349f198..874475a 100644
--- a/src/hardware/smartctl.c
+++ b/src/hardware/smartctl.c
@@ -112,6 +112,7 @@ short scan_smctlhdd_devices(SmartctlHdd **hdds, unsigned *hdds_nb)
unsigned i, curr_hdd = 0, buffer_size = 0, sec_buffer_size = 0;
char **buffer = NULL, **sec_buffer = NULL;
struct stat sb;
+ char errbuf[STRERROR_BUF_LEN];
smartctl_free_hdds(hdds, hdds_nb);
@@ -147,7 +148,7 @@ short scan_smctlhdd_devices(SmartctlHdd **hdds, unsigned *hdds_nb)
if (stat(sec_buffer[0], &sb) != 0) {
warn("Stat() call on file \"%s\" failed: %s",
- sec_buffer[0], strerror(errno));
+ sec_buffer[0], strerror_r(errno, errbuf, sizeof(errbuf)));
free_2d_buffer(&sec_buffer, &sec_buffer_size);
continue;
}