Commit Graph

44 Commits

Author SHA1 Message Date
PartialVolume
e5a0f85d56 Show percentage completed, on completion of wipe.
Rather than delete percentage complete, show it. Because we were hiding
percentage complete we were not aware of inaccuracies in the percentage
calculation that are introduced when you toggle blanking and
verification on various methods.
2019-12-30 18:18:15 +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
f866d84e3d fixup descriptions of --noblank
Both display_help() and nwipe_options_parse() are consistent about the
--noblank option, in that it exists and has no short form. Make the man
page and nwipe_gui_noblank() indicate that correctly. Mention that "ops2"
never blanks the device regardless of the option.
2019-12-28 22:09:50 +00:00
louib
a384bd75fd Updated zero-fill documentation. 2019-12-27 13:55:16 -05:00
PartialVolume
8bb3f9ff14 Fix missing log lines
Change code so that there is only one place where the log is flushed on
exit from the ncurses gui. Prior to this patch the flush was done twice
which resulted in duplicated lines and missing lines. The
log_current_element variable was being initialised after the first flush.
This caused subsequent writes to nwipe to write log_lines pointers passed
the end of the pointer array causing memory corruption and resulting in the
occassional segfault on attempts to print the log array.
2019-12-15 18:14:27 +00:00
PartialVolume
11a0c2de6b Runtime statistics uses too much CPU
During testing a single drive two cores consistently run at close to 100%,
one core at 100% and the other varying between 80-100%. This shouldn't be
the case. Although there would be two threads running, i.e. the gui status
thread and the disk drives wipe thread I would have expected the amount of
CPU required to calculate the on screen stats to be insignificant as they
are only updated once a second.

To reduce the gui stats thread to near zero% while still maintaining the
stats update at one second I inserted an nanosleep interval of 100ms. This
now means that only the one core now shows at 80-100% while all other cores
are close to zero.
2019-12-08 11:40:14 +00:00
PartialVolume
5004c15481 Merge pull request #144 from PartialVolume/add_error_checking_code_tidy_up
Add error checking code to pthread_mutex_lock functions
2019-12-01 22:26:07 +00:00
PartialVolume
3110267373 Add error checking code to pthread_mutex_lock functions
Move flush of logs into final cleanup function
Minor alteration to one or two error messages
2019-12-01 22:22:47 +00:00
louib
974f323857 Update footers for key commands.
Update the footers for the commands available in each
screen. Also added the possibility to cancel from the
rounds screen. It was possible to cancel with backspace
from the other screens (method prng etc) but this was not
displayed in the footers. Added the `Ctrl-C` command
to all the footers since this is a global command.
Added the `Left` command to the rounds screen, since it
was implemented but not documented.
Also made sure the Ctrl-C was placed at the end on every
footer.
2019-11-24 10:52:22 -05:00
PartialVolume
1090ac5d83 Merge branch 'master' into fix_segfault_on_CNTRL-C_at_end_wipe_take3 2019-11-14 01:26:20 +00:00
PartialVolume
4241485e6a 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-14 01:07:08 +00:00
Legogizmo
94a9437166 Fixed the Error count issue 2019-11-13 14:30:20 -06: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
PartialVolume
5199fb1793 Fix wipe status saying Success when it never even started.
Capitalise success and failure messages in GUI and log to make them stand out
2019-11-06 20:03:39 +00:00
Martijn van Brummelen
025a02e87c Merge pull request #86 from PartialVolume/netinet_header_removal
Use stdint.h, ncurses.h and panel.h instead of netinet/in.h
2018-11-25 20:53:24 +01: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
Nick Law
10221fb2a9 (void) unused wy, to silence compiler warning 2018-11-23 21:09:24 +00:00
Martijn van Brummelen
58d4733273 Merge pull request #65 from PartialVolume/Fixes-uninitialized-variable-warning
Fix uninitialized variable 'keystroke' in nwipe_gui_verify()
2018-11-17 11:23:03 +01:00
Nick Law
157797c1ca Fixes uninitialized variable 'keystroke' in nwipe_gui_prng 2018-11-16 22:35:52 +00:00
Nick Law
396896e16c Fix uninitialized variable 'keystroke' in nwipe_gui_verify() 2018-11-16 22:16:17 +00:00
Martijn van Brummelen
5cb6003fc0 Fixes spurious character at the end of serial no string. 2018-11-16 22:35:32 +01:00
Martijn van Brummelen
b2bee8ac83 Fixes uninitialized variable warning 2018-11-16 22:20:48 +01:00
Martijn van Brummelen
4606834286 Variable 'keystroke' is used uninitialized 2018-11-16 21:27:42 +01:00
Martijn van Brummelen
81850bde42 Fixes uninitialized variable 2018-10-05 23:23:16 +02:00
Martijn van Brummelen
0ecc90786d fix cast 2018-10-05 23:07:06 +02:00
Martijn van Brummelen
baab603809 Version 0.25(change footer) 2018-10-05 22:20:09 +02:00
Martijn van Brummelen
3638eae8d4 change version number and add friendly throughput 2017-12-06 20:28:09 +01:00
martijn
22665fa781 include version.h 2017-12-03 19:31:17 +01:00
martijn
95dc8abcf3 fix 32bit issues 2017-12-03 19:07:31 +01:00
Martijn van Brummelen
d9ba357722 add friendly disk size 2017-12-02 19:46:38 +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 van Brummelen
72c5cd8a0f forgot to include version.h in gui.c 2017-02-12 19:23:26 +01:00
Martijn van Brummelen
0f26c8ea68 use banner and update manpage 2017-02-12 19:05:36 +01:00
Niels Bassler
7039f381af Fix total throughtput display, which showed cummulative throughput, and not current througput. Fix also ETA, which would never decrease. 2016-08-21 19:48:54 +02:00
Martijn
167e4787b7 Change start key to S instead of F10. 2014-10-19 14:23:36 +02:00
Martijn
35009577ca Remove control reaches end of non-void function" warnings(Thanks Vincent Untz). 2014-10-19 14:04:36 +02:00
Andy Beverley
c6475277c9 Merge branch 'v0.15' 2014-03-28 17:17:32 +00:00
Andy Beverley
95c3a2c691 Fix missing footer on narrow screens 2013-12-31 10:29:21 +00:00
Andy Beverley
dd6610e98b Enable SIGUSR1 stats to work without gui 2013-09-07 12:40:21 +01:00
Andy Beverley
7ac6de9933 Add additional info to status screen when blanking 2013-09-07 00:19:37 +01:00
Andy Beverley
b40d4d10c8 Initial commit 2013-09-06 23:38:39 +01:00