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
Andrea Mazzoleni
74026ddca8
Add smartctl_scan into support module
2015-01-24 22:50:42 +01:00
Andrea Mazzoleni
f706da1cc6
Share smartctl support between different platforms
2015-01-24 19:43:01 +01:00
Andrea Mazzoleni
467bf0256b
Add preliminary Windows support for "smart" command
2015-01-24 19:17:34 +01:00
Andrea Mazzoleni
be22724a95
Add a comment about reserving space in Windows.
2015-01-15 22:45:07 +01:00
Andrea Mazzoleni
4a41adc807
Add preliminary SMART support with a new "smart" command.
2015-01-14 22:29:20 +01:00
Andrea Mazzoleni
16b872e30c
Refactors the new spin support with some rename and function splitting.
2015-01-11 17:43:31 +01:00
Andrea Mazzoleni
de2c68ddb5
Adds FILE_SHARE_DELETE in all open file operations in Windows.
...
Without this flag the open call may fail if the file
is already opened with delete access.
2015-01-07 22:58:49 +01:00
Andrea Mazzoleni
08c7a23774
Enables GNU printf functions in MINGW.
2015-01-02 21:38:16 +01:00
Andrea Mazzoleni
0af5358d69
Adds "up" support for Windows.
2015-01-02 21:05:29 +01:00
Andrea Mazzoleni
297d648675
Removes the unnecessary windows_randomize declaration.
2015-01-02 18:07:59 +01:00
Andrea Mazzoleni
b24807704e
Adds preliminary support for spinning up and down commands.
2015-01-02 15:53:15 +01:00
Andrea Mazzoleni
c0dc2e1c63
Drops support for Windows 2000.
2014-12-27 12:01:45 +01:00
Andrea Mazzoleni
8c98864395
Uses the OS random support instead of rand().
2014-12-27 11:56:55 +01:00
Andrea Mazzoleni
2e78e3c6c1
More comments about error 1450 in Windows.
2014-11-21 22:36:57 +01:00
Andrea Mazzoleni
d9908487ea
Beautifies cmdline program.
2014-11-12 20:47:07 +01:00
Andrea Mazzoleni
baef69c949
Takes extra precautions of flushing disk cache with autosave.
...
We must flush every time we save the content file, not only
the last time.
2014-11-10 22:46:19 +01:00