Commit Graph

166 Commits

Author SHA1 Message Date
PartialVolume
95ab80cc68 Fix window/panel resizing & display when terminal resized by user
Also fixes an issue where program exits when terminal resized but
only after all the wipes have finished. You can now resize the
terminal, before, during and after the wipes have completed and
the windows are now all correctly updated and sized.

Updated version to 0.28-pre-release

Removed unnecessary zero of gui thread pointer.

Created six new functions in gui.c in order to fix the above problem
and reduce existing duplicated code.
2020-03-08 01:42:47 +00:00
PartialVolume
97e5591fd5 Release 0.27 2020-03-03 20:38:47 +00:00
PartialVolume
bebae43b3b Merge pull request #190 from louib/fix_device_label_printing
Prefixing device fields with `_device`.
2020-01-12 21:36:56 +00:00
louib
49aa14a490 Prefixing device fields with _device.
Also added a `device_label` field to centralize
the creation of the device label. This fixes the
labels for devices without a serial number, and
makes sure we have the same label format everywhere.
2020-01-12 14:24:32 -05:00
PartialVolume
0a53ec9c42 Fix percentage calculation for IS5 only 2020-01-12 10:20:17 +00:00
louib
af0fdadc88 Creating subdirs for third-party modules.
Since these modules are considered third-party (at
least for now) and we also don't want to apply
formatting to them.

Also removed the `AUTOMAKE_OPTIONS` from `Makefile.am` since
it would appear the `AM_INIT_AUTOMAKE` is actually defining
the automake options.
2020-01-10 18:08:07 -05:00
louib
4071e5f66a Formatting gui module. 2020-01-07 20:05:16 -05:00
louib
6b7186f7ed Formatting logging module. 2020-01-06 20:40:26 -05:00
louib
7af9c90e3a Formatting prng module. 2020-01-05 20:45:26 -05:00
louib
851735c1f0 Formatting pass module. 2020-01-05 19:11:24 -05:00
PartialVolume
79dee9cb79 Merge pull request #180 from louib/formatting_pass_5
Formatting device module.
2020-01-05 23:40:51 +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
louib
a5a3f3b9a3 Formatting device module. 2020-01-05 16:29:27 -05: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
PartialVolume
10f2678c10 Merge branch 'master' into formatting_pass_4 2020-01-05 19:23: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
louib
92c7d99714 Formatting context.h 2020-01-04 12:38:41 -05:00
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
louib
d19dc05793 Small formatting fix. 2019-12-29 16:19:17 -05:00
PartialVolume
615c2ee035 Merge branch 'master' into master 2019-12-29 20:47:14 +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
ead64479f4 remove duplicate "h" from nwipe_options_short[] 2019-12-28 22:09:50 +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
Denis Ovsienko
97c736e630 fixup a comment in method.c 2019-12-28 22:09:50 +00:00
louib
e180154320 Update else styling. 2019-12-28 13:21:42 -05:00
louib
25116c2046 Formatting options module. 2019-12-28 13:11:47 -05:00
PartialVolume
d5fe1c096a Merge pull request #164 from louib/formatting_pass_1
Formatting pass 1
2019-12-28 17:50:15 +00:00
louib
a384bd75fd Updated zero-fill documentation. 2019-12-27 13:55:16 -05:00
louib
f212192155 Rename Quick Erase for Zero Fill 2019-12-27 12:21:20 -05:00
louib
494d269936 Formatting nwipe.c and nwipe.h 2019-12-26 14:04:38 -05:00
louib
d8749ab9da Fixed typos in help message. 2019-12-23 17:35:42 -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
8d02bfe6f8 Merge pull request #157 from PartialVolume/fix_segfault_and_missing_log_lines
Fix segfault & missing log lines
2019-12-10 23:32:16 +00:00
PartialVolume
a215aa14fa Fix segfault & missing log lines
This patch fixes a segfault that occurs when a logfile is specified.
The segfault occurred on exit of nwipe. It did not affect the wipe
process.

This patch also fixes a related issue, at the end of a wipe some
of the log lines were missing on stdout, this occurred when a log
file was not specified as an option.
2019-12-10 23:29:42 +00:00
PartialVolume
4666f17930 Fixes Implicit declaration of function 'fdatasync' is invalid in C99 2019-12-08 22:26:09 +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
b102bee6fa Update version.c
Make the change in both version strings.
2019-12-04 22:09:12 +00:00
PartialVolume
551836e092 Update version.c with release candidate versioning
To avoid confusion, the master code should have the version number in the title bar. The version number shown in the master should be the version number of the next (unreleased version) followed by the suffix rc1. As an example, the current official released version is 0.26 so in the master title bar the version should be 0.27rc1, i.e. the release candidate for the proposed release 0.27.
2019-12-04 22:07:59 +00:00
PartialVolume
4dc84a727c Update version.c, Simplify the title text 2019-12-04 21:50:48 +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
PartialVolume
82e4d1b2ea Merge pull request #136 from louib/backspace_as_return
Update footers for key commands.
2019-11-30 23:14:55 +00:00
PartialVolume
c064a66115 warning: logical 'or' of collectively exhaustive tests is always true
If using || in the while statement and if 'MAX_DRIVE_PATH_LENGTH' was exceeded the while loop would loop indefinitely.
2019-11-30 17:07:14 +00:00
louib
d3ddd8d2ac Exit on invalid long option. 2019-11-24 11:14:28 -05: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
louib
5bf579d5b2 Suppress warnings from glibc macros. 2019-11-16 18:25:34 -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