Commit graph

92 commits

Author SHA1 Message Date
Andrea Mazzoleni
8cef686d26 Adds a new smartignore option to ignore specific SMART attributes
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
2025-09-15 16:57:22 +02:00
Allan Clark
5886923bb1 Add bandwidth limit feature --bw-limit 2025-03-29 19:29:55 +01:00
Nasado
3c87474aa2 Use volume UUIDs on macOS 2025-02-13 11:21:26 +01:00
Andrea Mazzoleni
3ab8b43907 Fix build errors with new mingw compiler 2022-07-21 15:24:21 +02:00
Andrea Gelmini
2dacb15516 Fix typos
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2022-07-21 14:48:48 +02:00
Andrea Mazzoleni
2fe1f46752 Support file time before 1970 2022-02-18 07:11:46 +01:00
Andrea Mazzoleni
53801b407a Remove the need of the MingW pthread layer on the Windows port
Now everything is implemented usign Windows native calls.
2021-05-26 00:21:52 +02:00
Andrea Gelmini
986e9b4131 Fix typos 2020-05-26 12:50:15 +02:00
Andrea Mazzoleni
67f1f25259 Recognize the Windows ERROR_CRC(23) error 2018-02-25 10:21:07 +01:00
Andrea Mazzoleni
6a082b5d05 Recognize the Windows ERROR_IO_DEVICE
Convert it to EIO, without reporting te "Unexpected error" message.
2017-11-26 08:36:22 +01:00
Andrea Mazzoleni
f778fb691f Apply new hardlink behaviour also to NTFS in nix platforms
This is a specific NTFS behaviour, not limited to Windows.
2017-10-29 18:43:53 +01:00
Andrea Mazzoleni
74d689b149 Fix symlink time set in Windows
The link as to be opened with write permission for attributes.
2017-05-13 13:37:38 +02:00
Andrea Mazzoleni
e7d93f7f42 Better backward compatibility in symlink creation
The new flag may result in ERROR_INVALID_PARAMETER in old Windows.
2017-05-13 13:23:41 +02:00
Andrea Mazzoleni
0ca3496891 Sanitize the high performance counter in Windows
This avoids to report bad stats.
2017-05-01 16:07:07 +02:00
Andrea Mazzoleni
17bec43be2 Set time of pool links
This avoid index refresh from various applications.
2017-05-01 16:07:04 +02:00
Andrea Mazzoleni
faa3ca9bf8 In Windows 10 allow creation of symlinks by unpriviliged user
It's a new feature of Windows 10 build 14972
2016-12-06 08:36:19 +01:00
Andrea Mazzoleni
6f16cddd5b Rename string functions to avoid variable shadow 2016-11-06 16:06:26 +01:00
Andrea Mazzoleni
a90f8db3c0 Ingnore the SMART Command Timeout for Seagate SMR disks 2016-10-13 18:57:14 +02:00
Andrea Mazzoleni
97c01d35f4 Add basic support for ReFS
It works until the inode are 64 bit. Then it fails.
2016-10-05 08:38:22 +02:00
Andrea Mazzoleni
21241c5078 Preliminary advise support 2016-05-15 14:50:59 +02:00
Andrea Mazzoleni
2bebc5d953 Add fallocate in Windows and comment about its use 2016-05-15 14:27:35 +02:00
Andrea Mazzoleni
e760df8877 Reset all fields of the Windows overlapped struct
To be 100% compliant with MSDN.
2016-04-10 23:01:42 +02:00
Andrea Mazzoleni
36a4d24333 Source code beautification
Done with uncrustify.
2016-04-10 22:46:09 +02:00
Andrea Mazzoleni
8e2cb48ea7 Add alternatives for RtlGenRandom 2016-04-01 22:12:47 +02: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
86eaf8190f Use the native Windows thread support instead of pthread 2016-02-13 16:05:16 +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
0849bfc261 Use a thread-safe pread/pwrite implementation for Windows
This may be useful in future for concurrent calls to the same file.
2016-01-09 10:25:56 +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
4d52890c32 Avoid the Windows abort dialog 2015-12-19 08:20:51 +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
193519d8fc Fix a data race in Windows for the customized strerror()
To proper support multithread we have to use the thread local
storage for keeping the latest error.
2015-11-20 18:58:59 +01:00
Andrea Mazzoleni
13ebe5824f Fix a possible data race in Windows for UTF-8 conversion
We had less conversion buffers than possible threads,
possibly resulting in a buffer used more than one time.
Now converted to use local stack buffers to avoid
the need of any kind of syncronization between threads.
2015-11-19 19:38:39 +01: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
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
0477ed36c6 Add lock protection at the output in all platforms 2015-04-09 21:22:14 +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
9a10c94946 Retry smartctl command in Windows with -d sat if no info 2015-04-07 21:59:09 +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
5812ec8bd8 Use standard smartctl.exe 2015-02-27 23:33:16 +01:00