Commit Graph

193 Commits

Author SHA1 Message Date
PartialVolume
000ebe6deb Merge pull request #137 from louib/exit_invalid_option
Exit on invalid long option.
2019-11-24 17:11:13 +00:00
PartialVolume
8a7ca91da6 Update URL with correct workflow name
i.e underscores
2019-11-24 17:00:52 +00:00
PartialVolume
404962e6fc Update README.md
Update URL to badge for new workflow name
2019-11-24 16:57:09 +00:00
PartialVolume
f96f17b0a6 Update ci.yml
Maybe better to use ubuntu-latest so we don't need to update every so often.
2019-11-24 16:51:15 +00:00
louib
d3ddd8d2ac Exit on invalid long option. 2019-11-24 11:14:28 -05:00
PartialVolume
4f6354919b Merge pull request #135 from louib/github-ci
Adding GitHub CI build process.
2019-11-24 08:25:39 +00:00
louib
2a7d07676b Adding CI badge 2019-11-23 21:31:45 -05:00
louib
06aecbb8f8 Adding GitHub CI build process. 2019-11-19 19:00:49 -05:00
PartialVolume
353a577282 Merge pull request #133 from louib/glibc_deprecated_warnings
Suppress warnings from glibc macros.
2019-11-19 12:44:10 +00:00
louib
5bf579d5b2 Suppress warnings from glibc macros. 2019-11-16 18:25:34 -05:00
PartialVolume
607a244bbf Make it clear 0.27 is a pending release 2019-11-14 11:32:56 +00:00
PartialVolume
d770f219b9 Merge pull request #132 from PartialVolume/fix_segfault_on_CNTRL-C_at_end_wipe_take3
Fix segfault on control c at end wipe
2019-11-14 01:27:33 +00: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
PartialVolume
dd3828008d Add notification of cache flush on CNTRL-C exit 2019-11-14 01:07:08 +00:00
PartialVolume
4f72927146 Merge pull request #130 from louib/verify_option_documentation
Add documentation for verify
2019-11-14 00:03:51 +00:00
louib
a5715eeca4 Add documentation for verify 2019-11-13 18:35:12 -05:00
PartialVolume
214ff8fb7a Merge pull request #128 from Legogizmo/Verify_Method
Added Verify Method
2019-11-13 23:03:51 +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
08d61dc9f1 Merge pull request #124 from PartialVolume/fix_control-C_segfault_after_successful_wipe
Fix segfault on Control-C, after a successful wipe
2019-11-11 12:54:59 +00: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
df36255e06 Merge pull request #123 from PartialVolume/add_notification_of_cache_flush
Add notification of cache flush on CNTRL-C exit
2019-11-10 11:55:12 +00:00
PartialVolume
602cdcaa58 Add notification of cache flush on CNTRL-C exit 2019-11-10 11:42:26 +00:00
PartialVolume
95b30f6286 Merge pull request #122 from PartialVolume/update_README.md_with_dmidecode
Add dmidecode as an optional package to README.md
2019-11-09 21:10:14 +00:00
PartialVolume
b4d82ec19b Add dmidecode as an optional package to README.md 2019-11-09 21:06:08 +00:00
PartialVolume
d968225417 Merge pull request #121 from louib/cleanup_top_level_doc
Cleanup top-level documentation
2019-11-09 20:23:28 +00:00
louib
46f8cc352d Cleanup top-level documentation
Moved most of the documentation from `README` to
`README.md`, and added MarkDown formatting when
required. Also move the release notes to a
`CHANGELOG.md`, and made sure the formatting
was consistent.
2019-11-09 10:39:22 -05:00
PartialVolume
42e58bbd22 Merge pull request #120 from louib/clang_format_dont_sort_includes
Do not sort includes on clang-format
2019-11-08 22:35:39 +00:00
louib
10028b6f95 Do not sort includes on clang-format 2019-11-08 17:06:52 -05:00
PartialVolume
7d70fa5dc5 Merge pull request #119 from PartialVolume/fix_header_order
Fix order of include files in options.c
2019-11-08 18:02:03 +00:00
PartialVolume
53b1c6ba62 Fix order of include files in options.c
After running clang on options.c the includes were reordered. This caused the compilation to fail with multiple errors.
2019-11-08 18:00:24 +00:00
PartialVolume
88ce0b7494 Merge pull request #105 from Legogizmo/SyncChanges
Sync changes
2019-11-08 13:21:31 +00:00
PartialVolume
2a056b7bfa Changed sync from 0 (at end) to every 1000000 blks
Instead of defaulting to only calling fdatasync at the end of a wipe, it now defaults to calling fdatasync every 1000000 blocks. This shows a unresponsive drive far quicker and also allows wipe threads to complete and be cancelled within a couple of seconds if a wipe is aborted with control-c.
2019-11-08 13:18:50 +00:00
Legogizmo
f9f0ec605c Merge branch 'master' into SyncChanges 2019-11-07 14:09:07 -06:00
PartialVolume
9331061cbf Merge pull request #112 from louib/clang_format
First clang-format file version.
2019-11-07 19:47:01 +00:00
PartialVolume
2402ca0602 Merge branch 'master' into clang_format 2019-11-07 19:33:32 +00:00
Legogizmo
7db0bd733e Merge branch 'master' into SyncChanges 2019-11-07 11:22:43 -06:00
PartialVolume
128dfb3a4e Merge pull request #116 from PartialVolume/fix_drive_parsing_and_success_status
Fix drive parsing and success status
2019-11-06 20:23:32 +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
PartialVolume
f6c1cab28a Have nwipe continue with following devices even if one fails 2019-11-06 14:13:33 +00:00
PartialVolume
4b9ae33171 Merge pull request #114 from PartialVolume/limit_help_line_length_to_80_characters
Limit help text line length to 80 characters
2019-11-05 23:32:01 +00:00
PartialVolume
d04ae940b6 Limit help text line length to 80 characters
1. When running nwipe in a 80x24 terminal such as ALT-F2 or shredos the line length needs to limited to 80 characters otherwise the text looks misaligned.
2. Added a line between each option to make it more legible.
2019-11-05 22:56:58 +00:00
PartialVolume
74c05fe290 Merge pull request #113 from PartialVolume/fix_dmidecode_error_reporting
Fix error reporting when accessing dmidecode.
2019-11-04 22:48:02 +00:00
PartialVolume
766d8020c6 Fix error reporting when accessing dmidecode.
This fix allows nwipe to log an error, specifically the exit code of dmidecode if the exit code
is not 0.

For instance if dmidecode is not installed on a system, then dmidecode reports the following
[2019/11/04 22:12:50] nwipe: info: nwipe_log_sysinfo: dmidecode failed, "dmidecode -s bios-version" exit status = 127

nwipe does not abort on this error but does log the error and continue.
2019-11-04 22:39:20 +00:00
louib
76f097c272 First clang-format file version. 2019-11-03 11:38:41 -05:00
PartialVolume
5e2d55ba7f Merge pull request #110 from louib/ac_deprecated_init
Fix AutoConf deprecated warning
2019-11-03 01:10:19 +00:00
louib
7c025040b4 Fix AutoConf deprecated warning
This fixes the following AC warning:
```
configure.ac:6: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.ac:6: https://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
```

As per the deprecation notice, using `AM_INIT_AUTOMAKE` for setting the
version is mostly obsolete because the package and version can be obtained
from Autoconf’s `AC_INIT` macro.
2019-11-02 19:24:25 -04:00
PartialVolume
661785294c Merge pull request #109 from louib/documentation
Fix typos in README and comments.
2019-11-02 22:51:07 +00:00
louib
7b1a5b98a7 Fix typos in README and comments. 2019-11-02 18:33:36 -04:00