Commit Graph

33 Commits

Author SHA1 Message Date
PartialVolume
fb6b47d12a Fix summary table - Control-C
If you used control-c during a wipe,
the summary table would report FAILED
rather than UABORTED, even though no
errors had occured and no errors were
reported in the error summary table.

The correct message on control-c abort
should be UABORTED if no errors on that
drive had so far been detected or FAILED
if errors had been detected.

nwipe reported correctly when letting
the wipe continue to it's natural completion.

This patch fixes that issue.
2021-11-17 09:59:20 +00:00
Dimitri Papadopoulos
b2c22d58cb Typos found by codespell 2021-11-02 08:13:48 +01:00
PartialVolume
a379329fca Add ones (0xFF) verification method. 2021-10-28 21:50:19 +01:00
PartialVolume
8336653926 Add ones 0xFF method. 2021-10-27 23:40:30 +01:00
PartialVolume
4b1c7007ff Various fixes to methods
1. Allows zero fill to be verified when blanking off.
Prior to this if you wanted to verify a zero pass,
blanking had to be on. This meant a zero pass, then a
blanking pass then a verify, effectively two zero passes
and a verify. This is now fixed so you can now do a zero
pass with verification without a blanking pass. This knocks
a third off the wipe time of a zero fill with verification.

This also means all other methods can have either all their
passes or just the last pass verified without blanking being
enabled.

2. OPS2 method requires the last pass to be random, the GUI
now disables the use of the blanking option for this message
and displays a warning message that a final blanking pass is
not allowed for OPS2. It never did a final blanking pass
anyway, even if it was selected, but this makes it clearer in
the GUI.

3. The caculate_round_size() function was improved by reducing
some duplicated code and bring the full calculation into this function.

4. On completion of each pass or verification the total number of
bytes written or read for each pass or verification is logged.
2021-06-04 10:20:23 +01:00
PartialVolume
18386f225e Fix blanking pass verification status message
Although the blanking pass verification is
completed correctly the GUI status message
did not show the status as 'Verifying', the
status message continued to say blanking.

This patch fixes the GUI message so if
verification and blanking pass are enabled,
then when blanking is complete and verification
starts the drive status message changes from
'blanking' to 'Verifying'.
2021-05-31 23:41:19 +01:00
PartialVolume
a6b60bfd15 Fixes contradictory log messages.
1. The log reported verification errors while also
showing an entry in the log that said "[SUCCESS] Blanked /dev/...".
The blanked device message now shows [FAILURE] /dev/... may not be blanked"
if any verification errors are detected for a specific drive.

2. If a verification error occurred, the error would be correctly
shown in the GUI and in the logs but the summary table drive status
would show 'ERASED' not 'FAILED'. Now corrected so that the tables
drive status field shows 'FAILED' if any verification error is detected.
Prior to this it was marking the status as 'FAILED' only if the O.S
detected write errors. In practise most drive errors are detected
by the write I/O process on syncing but this will now detect errors not
recognised by the O.S. and found by the verification process. Despite
this the textual log and GUI correcty reported verification errors.

3. The final log message "Nwipe exited successfully" was checking for
fatal errors but ignoring non fatal errors despite being reported in
the log.

The final message now reads
either "Nwipe Exited Succesfully" if no fatal and non fatal errors were
detected. Alternatively it displays ...
"Nwipe exited with errors, check the log & summary table for individual drive status."
if any fatal OR non fatal errors are detected.
2021-05-27 08:07:20 +01:00
Andrew V. Jones
543a880064 Run 'make format'
Signed-off-by: Andrew V. Jones <andrewvaughanj@gmail.com>
2021-03-17 17:41:32 +00:00
PartialVolume
6c99166b75 Add a summary table to the log that shows each drives status
Add a summary table to the log that shows each drives status
i.e. erased or failed, throughput, duration of wipe, model,
serial no etc. In particular it benefits those that wipe many
drives simultaneously in rack servers. At a glance any failed
drives can be seen without having to browse back through the
log. Especially useful in --nogui mode, but also useful in GUI
mode.
2020-03-18 23:42:44 +00:00
PartialVolume
e955725fc5 Style formatting 2020-03-13 17:48:20 +00:00
PartialVolume
1c1b25e1ae Keep nwipe_log notices succinct
1. Keep nwipe_log notices succinct and below 80 chars in length including
timestamp. This is especially relevant for 80x30 terminal use such
as ALT-F2 etc or Shredos without losing any information.

2. Add [SUCCESS] to blanked & verified messages to make them stand out for quicker checking.
2020-03-13 17:24:08 +00:00
PartialVolume
0a53ec9c42 Fix percentage calculation for IS5 only 2020-01-12 10:20:17 +00:00
PartialVolume
0037c46860 Check & correct style
clang-format -i -style=file src/method.c
2020-01-05 23:12:41 +00:00
PartialVolume
7d416911d2 Fix zero fill so it works with rounds
Also so that verify and blanking are consistant with other methods.
Fixes percentage calculation for rounds greater than one for the zero fill method.
2020-01-05 23:08:36 +00:00
PartialVolume
d39427ae86 clang-format -i -style=file src/method.c
Check & correct style.
2020-01-05 21:21:05 +00:00
PartialVolume
0b6ce3182d Fix percentage calculation when rounds > 1
Update comment.
2020-01-05 21:10:50 +00:00
louib
bc8cfeb478 formatting method and version module. 2020-01-05 13:10:26 -05:00
PartialVolume
3bcc544610 Fix percentage complete calculation.
Also fixes OPSII method.
Place round_size calculation in the function calculate_round_size()
2020-01-05 03:28:28 +00:00
Denis Ovsienko
04fe9f217e add an initial implementation of HMG IS5 enhanced
I could not find the original specification of this standard, although
many proprietary implementations exist (or claim to exist). Also there
are many 3rd-party descriptions of the method, which often differ in one
or another detail, but after some reading I could conclude that the most
likely definition should be as follows:

1. Fill the device with zeroes, do not verify.
2. Fill the device with ones, do not verify.
3. Fill the device with a PRNG stream, do verify.

In other words, this is a simplified version of nwipe's "dodshort".
2019-12-28 22:41:32 +00:00
Denis Ovsienko
97c736e630 fixup a comment in method.c 2019-12-28 22:09:50 +00:00
louib
f212192155 Rename Quick Erase for Zero Fill 2019-12-27 12:21:20 -05:00
Legogizmo
a216fa2c24 Added Verify Method
and fixed other bugs.
2019-11-13 10:59:44 -06:00
PartialVolume
f6cf615a12 Fix segfault on Control-C, after a successful wipe
Symptoms: If you control-C to exit nwipe at the end of a successful
wipe you would get a segmentation fault. If nwipe log data was being
sent to stdout rather than to a log file, then you would not see the
log in the terminal windows after nwipe had exited. This patch fixes
those problems by creating a tri-state wipe flag for each wipe
thread. The main thread after having launched the wipe threads
will wait for ALL wipe flags to report that the wipe routine has
completed and the thread has exited. Only at that time does the
main() routine then proceed with joining the threads and waiting
for the join to confirm the thread has indeed exited. This join
is important as the thread will not actually exit until the OS
has flushed the disk buffers. Currently nwipe does not use O_SYNC
where data is sent straight to disk. Therefore it's important
to wait for data to be flushed before exiting nwipe. Part of this
patch is introducing a "please wait .. disks are being flushed"
prior to exiting nwipe otherwise it might look like nwipe had
hung. A disk flush in terms of how long it takes, can be from
instantly to 30 seconds or more, depending on how much system
memory you have, when the last sync occurred and if you have
changed the sync option from it's default. Something else to
note is that when all wipes have finished nwipe displays "Enter
To Exit" on the status line at the bottom of the screen. I
believe typing 'enter' rather than control-c did not produce a
segmentation fault. Irrespective, both methods of exiting nwipe
have been tested and confirmed to now work correctly. Tested
overnight with two drives using multiple wipe methods,
verification and blanking.
2019-11-11 12:34:28 +00:00
Nick Law
cd3716f260 Use stdint.h, ncurses.h and panel.h instead of netinet/in.h 2018-11-24 23:32:20 +00:00
Martijn van Brummelen
5912d0f57a check right pointer 2018-10-05 23:02:19 +02:00
Martijn van Brummelen
e16da663a1 fix more memory leaks 2018-10-05 22:58:58 +02:00
martijn
95dc8abcf3 fix 32bit issues 2017-12-03 19:07:31 +01:00
Martijn van Brummelen
c8a5a16108 place files in normal location 2017-02-21 22:31:11 +01:00
Martijn van Brummelen
4e64cab3c3 use localtime instead of gmtime for logging 2017-02-13 13:40:00 +01:00
Martijn van Brummelen
e7d9ff73fe remove unused netinet/in.h 2017-02-12 20:14:55 +01:00
Martijn
35009577ca Remove control reaches end of non-void function" warnings(Thanks Vincent Untz). 2014-10-19 14:04:36 +02:00
Andrew Beverley
ee99425d6d Allow building with clang compiler 2014-05-15 09:22:29 +01:00
Andy Beverley
b40d4d10c8 Initial commit 2013-09-06 23:38:39 +01:00