Andrea Mazzoleni
1ce7b61f29
Convert null devices as first operation
...
This ensure that all the usages are with the
real device number.
Also avoid to resolve device in spinup to suppor
filesystem that cannot be resolved, like ZFS.
2016-04-29 20:53:01 +02:00
Andrea Mazzoleni
a0307ca29d
Detect device also from the major:minor of the mount point
...
This is required for btrfs in new distributions, because
the major:minor reported in /proc/self/mountinfo doesn't
match the one of the mount point.
2016-04-28 22:27:57 +02:00
Andrea Mazzoleni
6053096862
Extend the split function to support multiple delimiters
2016-04-26 21:26:15 +02:00
Andrea Mazzoleni
4cc1109444
Add support for null device numbers
...
They are resolved using the mountinfo interface and
mapping them to the block device listed there.
2016-04-23 16:24:26 +02:00
Andrea Mazzoleni
cca81e7ff6
Fix some typos in comments
2016-04-20 22:12:16 +02:00
Andrea Mazzoleni
36a4d24333
Source code beautification
...
Done with uncrustify.
2016-04-10 22:46:09 +02:00
Andrea Mazzoleni
ecff017ffe
Log more information during UUID detection
2016-03-01 23:29:46 +01:00
Andrea Mazzoleni
0707b1f446
Error check all the thread operations
...
No error is expected, and this enforces that expectation.
2016-02-13 16:05:19 +01:00
Andrea Mazzoleni
104f8b065e
Be more explicit if smart/down is not supported
2016-02-06 10:24:29 +01:00
Andrea Mazzoleni
6da3469fe7
When clearing the screen move the cursor to the top
2016-01-30 09:17:10 +01:00
Andrea Mazzoleni
11a8e301f4
Clear the screen before printing stats
2016-01-27 22:24:59 +01:00
Andrea Mazzoleni
adbf4f25c2
Allow 'smart' without a configuration file
2016-01-18 22:36:06 +01:00
Andrea Mazzoleni
984ea5a329
Log info about the filesystem used
2016-01-09 17:19:43 +01:00
Andrea Mazzoleni
84f7a623ab
Be more verbose in log and messages about UUID
2016-01-05 23:35:55 +01:00
Andrea Mazzoleni
cc8ca88ecf
Add some more coverage exclusions
2016-01-05 12:23:05 +01:00
Andrea Mazzoleni
c879140663
Print the exit status of addr2line
2016-01-05 11:16:03 +01:00
Andrea Mazzoleni
fe20160958
Fix the precision field in the addr2line call
...
It must be a int type in x64.
2016-01-05 11:04:04 +01:00
Andrea Mazzoleni
5249f9cb04
Fix various typos in comments
2016-01-02 16:52:20 +01:00
Andrea Mazzoleni
b853b4c406
More explicative StackTrace message
2016-01-02 12:23:48 +01:00
Andrea Mazzoleni
7ad70c26f8
Remove the need of helgrind/drd suppression
...
Using a mutex for protectign the global memory counter
should not affect performance.
2016-01-01 17:57:04 +01:00
Andrea Mazzoleni
584c362ba4
Handle correctly files without offset
...
This avoid the warnings about duplicate offsets.
2015-12-20 17:19:57 +01:00
Andrea Mazzoleni
7313e3d9d0
In case of the "Path too long" message prints the stacktrace
2015-12-12 17:10:28 +01:00
Andrea Mazzoleni
f8214de959
Adjust UUID printing in the log
2015-12-11 18:59:24 +01:00
Andrea Mazzoleni
5541f8d5e6
Add UUID reading support using libblkid
...
This fixes the Btrfs case where the root UUIDs are not
present in the /dev/disk/by-uuid directory.
2015-12-10 22:51:19 +01:00
Andrea Mazzoleni
f71ddbb3fd
Add backtrace support for internal errors
2015-12-04 22:02:31 +01:00
Andrea Mazzoleni
fb759fec84
Rename some shadow variables
...
This removes some warnings in gcc 4.6 version.
2015-10-08 22:33:41 +02:00
Andrea Mazzoleni
452a595067
Adjust verbs in comments
2015-10-07 22:07:20 +02:00
Andrea Mazzoleni
5c5e80a239
Change the return code for 'diff' if a sync is required
2015-04-28 19:15:16 +02:00
Andrea Mazzoleni
e17190fce4
Fix build in generic Unix due missing dev_resolve()
2015-04-28 19:02:28 +02:00
Andrea Mazzoleni
de0c437bd2
Put a clear separation between log and msg functions
2015-04-20 22:07:42 +02:00
Andrea Mazzoleni
db3c417481
Log all the smartctl output
2015-04-11 07:43:12 +02:00
Andrea Mazzoleni
827eb2117e
Remove the 0x usage in log files
2015-04-10 18:30:06 +02:00
Andrea Mazzoleni
57b7d0be95
Drop hdparm use replaced by smartctl even for "down" command
2015-04-09 21:16:06 +02:00
Andrea Mazzoleni
214070dc4d
Add support for a new "smartctl" config option
...
This option allows to configure custom smartctl
commands for devices that cannot be autodetected.
2015-04-08 22:56:44 +02:00
Andrea Mazzoleni
21ce043725
Use manual line buffering for stdout/stderr.
...
This is needed for Windows where line buffering is not supported.
2015-03-23 22:57:36 +01:00
Andrea Mazzoleni
e56de653da
Introduce a new messaging system
2015-02-22 14:31:03 +01:00
Andrea Mazzoleni
14c8307ed4
Extend the "smart" and "down" command to Windows
...
Now we are able to detect what low level device is associated
to the high level volume.
2015-02-15 18:34:27 +01:00
Andrea Mazzoleni
2ac751b6d9
Put all the stdout output also in stdlog
2015-02-03 19:35:43 +01:00
Andrea Mazzoleni
798de7ca99
Change the flush logic for streams
...
Now stdout and stderr are always line buffered, and stdlog only
flushed on request.
2015-02-03 18:29:11 +01:00
Andrea Mazzoleni
b5ce575981
Change the log and output handling
...
Now the log file contains all the errors messages,
and all the tag lines.
2015-02-02 23:39:46 +01:00
Andrea Mazzoleni
65bfca5699
Fix some leak on error found by coverity scan
2015-01-30 23:00:27 +01:00
Andrea Mazzoleni
c110a00452
Make readdir calls in devuuid consistent with other functions
2015-01-30 22:59:53 +01:00
Andrea Mazzoleni
029df96268
Fix an output message
2015-01-30 22:39:32 +01:00
Andrea Mazzoleni
cd1186e434
Support the case of device not in smartctl database
2015-01-29 22:52:17 +01:00
Andrea Mazzoleni
f706da1cc6
Share smartctl support between different platforms
2015-01-24 19:43:01 +01:00
Andrea Mazzoleni
356c36cda0
Report the smartctl fail/prefail conditions
2015-01-24 17:55:59 +01:00
Andrea Mazzoleni
88aa107596
Use a more precise error detection when running external programs
2015-01-24 14:10:23 +01:00
Andrea Mazzoleni
f974a8378b
Add error control at the smart command
2015-01-23 22:59:29 +01:00
Andrea Mazzoleni
fca475f136
Remove device sorting to keep the original order
2015-01-16 19:14:07 +01:00
Andrea Mazzoleni
80982a8455
Scan for all devices in the SMART report
2015-01-16 18:52:31 +01:00