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
Andrea Mazzoleni
7e9a5e6a6d
Stores the free space in the content file.
...
This avoids the need to access data and parity disks in
the status command.
Also removed some data disk access, in list, dup and similar
commands that don't need to scan the disks.
2014-11-09 19:14:29 +01:00
Andrea Mazzoleni
55006d76f3
Merges lstat_sync() and filephy() in Windows reduce syscalls.
2014-10-14 22:47:21 +02:00
Andrea Mazzoleni
3e2d805d08
Extends the status command to show free space.
2014-10-13 23:47:25 +02:00
Andrea Mazzoleni
4a09094f60
Reports also numeric errno in Windows.
2014-10-12 10:50:33 +02:00
Andrea Mazzoleni
21a88175d5
Uses an external GetFilePhysicalOffset to make code clear.
2014-10-04 18:05:50 +02:00
Andrea Mazzoleni
ca5e635aa1
In Windows ensures to use synced information for new files.
...
Keeps track of the sync state of info with a new st_sync field
in the stat struct.
2014-10-04 10:27:23 +02:00
Andrea Mazzoleni
a0c6965959
Reads the physical offset only for new files.
2014-10-03 21:28:56 +02:00
Andrea Mazzoleni
0f05d40f25
Adds the --test-force-scan-winfind option to use the legacy dir listing.
2014-10-03 21:24:19 +02:00
Andrea Mazzoleni
f117074004
Uses Windows dir stream to make dir listing faster.
2014-09-30 21:54:49 +02:00
Andrea Mazzoleni
09aaccc9e9
Uses an extended error report for FlushFileBuffers().
...
This is at now safer than ignoring the INVALID_HANDLE error.
2014-09-29 19:14:57 +02:00
Andrea Mazzoleni
876bddcf4c
Beautifies the code.
2014-09-27 00:32:39 +02:00
Andrea Mazzoleni
eeea58b42a
Handles special errors from FlushFileBuffers() for Windows.
2014-09-26 22:59:07 +02:00
Andrea Mazzoleni
0433033c12
Uses an explicit fsync() in Windows.
...
This should allow a more precise error detection.
2014-09-24 22:25:35 +02:00