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
Andrea Mazzoleni
e56de653da
Introduce a new messaging system
2015-02-22 14:31:03 +01:00
Andrea Mazzoleni
fed3e8be1f
Use shorter fake device names in Windows
2015-02-17 22:27:11 +01:00
Andrea Mazzoleni
d37e0703c3
Run tools from exe dir in Windows
2015-02-16 23:38:34 +01:00
Andrea Mazzoleni
fa430adbfc
Add a mutex for handling the UTF conversion.
2015-02-16 23:36:53 +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
162d049bb9
Clearify some comments for Windows filesystem
2015-02-13 18:50:52 +01:00
Andrea Mazzoleni
894cd5ee70
In Windows spinup use CreteFile instead than FindFirst
...
It's just not possible to open the root dir with
FindFirstFile("C:\") or FindFirstFile("C:").
2015-02-13 18:49:46 +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
cd1186e434
Support the case of device not in smartctl database
2015-01-29 22:52:17 +01:00