Commit Graph

819 Commits

Author SHA1 Message Date
PartialVolume
ea1c2019cd Created further date/time functions.
write_system_datetime() and
nwipe_gui_set_system_month()
2023-09-14 22:07:37 +01:00
PartialVolume
c5b4e58cee Merge pull request #487 from PartialVolume/PDFGen33
Create function read_system_datetime()
2023-09-05 19:09:49 +01:00
PartialVolume
8a46658820 Create function read_system_datetime()
The purpose of this is to read year, month, day, hours
minutes and seconds into variables for updating in the GUI
prior to writing back to the system.

For systems isolated from the internet this will allow the
user to update system date/time from the nwipe GUI rather than
having to drop into the command line.

To complete this feature next will be to create the write_system_datetime
function.
2023-09-05 19:01:08 +01:00
PartialVolume
1e50f2fd2c Merge pull request #485 from PartialVolume/PDFGen32
PDFGen32 Create Set Date/Time window in GUI
2023-08-14 22:01:19 +01:00
PartialVolume
60d38a80e4 PDFGen32 Create Set Date/Time window in GUI
Created a window where you can edit the systems
date and time. To be completed.
2023-08-14 21:53:10 +01:00
PartialVolume
c72f740587 Merge pull request #484 from PartialVolume/PDFGen31
PDFGen31 Created truncate string function
2023-08-11 22:29:58 +01:00
PartialVolume
ba4c4c51f1 PDFGen31 Created truncate string function
Created a function that truncates a string that is printed
to a window if the string should exceed the window width.

This prevents the line wrap that occurs with mvwprintw
when the window width is not wide enough. This mainly
occurs with a 4:3 ratio monitor, 80 columns wide.
2023-08-11 21:41:48 +01:00
PartialVolume
86d71d0858 Update README.md
Removed the download link to the build script. As it's only a short script it can be copied and pasted from the github page.
2023-08-08 11:12:24 +01:00
PartialVolume
bb0cd2258d Update README.md - Add libconfig-dev libconfig++-dev
Added libconfig-dev libconfig++-dev to the build script
2023-08-08 11:03:26 +01:00
PartialVolume
4c703a6922 Merge pull request #483 from PartialVolume/PDFGen30
PDFGen30 Added org, customer & date/time preview
2023-08-05 23:26:32 +01:00
PartialVolume
9f92ec1b29 PDFGen30 Added org, customer & date/time preview
Created a window that shows a preview of organisational,
customer and date time information that will be added to
the PDF report. Items within the preview can be selected
which takes you to the relevant window for editing the
data. This can be optionally displayed before the drive
selection window is displayed.

To complete this I need to add a further entry in the
config window to allow editing date & time. Plus a
function needs to be added to truncate the strings
based on window width as some address strings could
be wider than the window and mess up the display as
they wrap to the next line.
2023-08-05 23:13:41 +01:00
PartialVolume
17a391f971 Merge pull request #482 from PartialVolume/PDFGen29
PDFGen29 Fix incorrect customer deletion/selection
2023-08-04 17:29:14 +01:00
PartialVolume
b40563ab22 PDFGen29 Fix incorrect customer deletion/selection
When using backspace or esc to abort customer deletion,
first customer in list would incorrectly be deleted.
Corrected by this fix.

Also when aborting customer selection, first customer
in list would be automatically selected. Also corrected
by this fix.
2023-08-04 17:14:39 +01:00
PartialVolume
7fc4325d69 Merge pull request #481 from PartialVolume/PDFGen28
PDFGen28 Completed customer delete feature.
2023-08-03 00:15:57 +01:00
PartialVolume
c137736997 PDFGen28 Completed customer delete feature. 2023-08-02 23:54:35 +01:00
PartialVolume
1a3e7eb23e Merge pull request #480 from PartialVolume/PDFGen27
PDFGen27 Cleaned up customer selection list
2023-07-27 23:47:15 +01:00
PartialVolume
e6034cf94e PDFGen27 Cleaned up customer selection list
Removed the csv field double quotes from the customer
selection list as displayed on screen. The double quotes will
still obviously exist in the csv file and are required
for the code to work correctly in various places. However, for
human readable text they are removed before displaying the
customer details line on the selection screen as it makes the
list look less 'busy' on screen hopefully.

I also fixed a issue where spaces were incorrectly being removed
from the customer details when filtering for printable characters
only.
2023-07-27 23:36:11 +01:00
PartialVolume
ce628e5c17 Merge pull request #479 from PartialVolume/PDFGen26
PDFGen26 Completed the code that adds a customer
2023-07-27 02:51:00 +01:00
PartialVolume
3dcc40c0e7 PDFGen26 Completed the code that adds a customer
Completed the code that adds a customer and saves
in /etc/nwipe.customers.csv so they can be selected
for display on the PDF report.
2023-07-27 02:46:09 +01:00
PartialVolume
1582f8c224 Merge pull request #477 from PartialVolume/PDFGen25
PDFGen25 Continuation of add customer csv
2023-07-25 22:24:57 +01:00
PartialVolume
a3fd0b71ca PDFGen25 Continuation of add customer csv
Continuation of add a customer entry to the
customers.csv file.

Plus a few corrections to earlier code.
2023-07-25 22:16:42 +01:00
PartialVolume
580429a371 Merge pull request #476 from PartialVolume/PDFGen24
PDFGen24 Created dialogs for adding a customer
2023-07-24 23:09:46 +01:00
PartialVolume
b46575cd63 PDFGen24 Created dialogs for adding a customer 2023-07-24 22:56:42 +01:00
PartialVolume
0d403a20a3 Merge pull request #475 from PartialVolume/PDFGen23
Completed the code that writes the user selected customer to nwipe's config file
2023-07-19 01:12:05 +01:00
PartialVolume
baefd77605 Completed code that writes selected customer to nwipe's config file /etc/nwipe/nwipe.conf 2023-07-19 01:03:49 +01:00
PartialVolume
9f8aecaa52 Merge pull request #473 from PartialVolume/PDFGen22
PDFGen22 Further work completed on customer selection and deletion
2023-07-18 02:10:43 +01:00
PartialVolume
0948596559 PDFGen22 Further work completed on customer selection and deletion dialogs 2023-07-18 02:06:33 +01:00
PartialVolume
2630edbea1 Merge pull request #472 from PartialVolume/PDFGen21
PDFGen21 Completed all GUI dialog boxes for entering organisational data.
2023-07-14 23:12:33 +01:00
PartialVolume
e74ae252ef PDFGen21 Completed all GUI dialog boxes for entering organisational data. Confirmed the data is correctly saved to /etc/nwipe/nwipe.conf and read back for automatic entry into the PDF erasure report. Further work is required to create dialog entry screens for customer details.. to be continued. 2023-07-14 23:00:17 +01:00
PartialVolume
2ebea57008 Merge pull request #471 from PartialVolume/PDFGen20
PDFGen20 Started creating new GUI dialogs.  A Configuration dialog and sub dialogs for allowing the user to enter business and customer details. Further dialog windows and code to be added...
2023-07-13 22:34:31 +01:00
PartialVolume
247cf3031b PDFGen20 Started creating new GUI dialogs. A Configuration Dialog and sub dialogs for allowing the user to enter business and customer details. Further dialog windows and code to be added... 2023-07-13 22:28:23 +01:00
PartialVolume
a05784f05a Merge pull request #470 from PartialVolume/PDFGen19
PDFGen19 Completed data extraction from nwipe.conf
2023-07-12 20:45:09 +01:00
PartialVolume
6f453967f6 PDFGen19 Completed the code the extracts the organisation and selected customer details from the nwipe.conf configuration file and populates the business and customer details boxes on the PDF report. 2023-07-12 20:37:08 +01:00
PartialVolume
0649f1c606 Merge pull request #469 from PartialVolume/PDFGen18
PDFGen18 - further work on PDF certificate
2023-07-11 23:36:26 +01:00
PartialVolume
174072db2e PDFGen18 - further work on PDF certificate, basic construction & format of the nwipe.conf file for PDF organisation and customer details 2023-07-11 23:30:03 +01:00
PartialVolume
60385f479a Update README.md
Remove old 16.04 badge
2023-07-03 01:25:02 +01:00
PartialVolume
49d82eebc9 Merge pull request #467 from PartialVolume/Fix_intermittent_exit_when_sizing_console
Fix the premature exit when sizing konsole
2023-06-30 23:57:36 +01:00
PartialVolume
d7b1fdf2ce Fix the premature exit when sizing konsole
If you are running nwipe within the KDE konsole
terminal and you resize the window by pulling on
the corners, occasionally nwipe will exit with the
error message:

"GUI.c,nwipe_gui_select(), loop runaway,
did you close the terminal without exiting nwipe?
Initiating shutdown now"

The loop runaway detection has been made less sensitive,
i.e 32 iterations per second of the GUI update can now
be completed before a loop runaway is detected. previously
it was 8. In practise when sizing the konsole window,
anywhere between 1 and 17 iterations will occur.
2023-06-30 23:40:23 +01:00
PartialVolume
21ef97e355 Merge pull request #465 from PartialVolume/HPA_DCO_013
HPA_DCO_013 Continuation of HPA/DCO integration
2023-04-12 23:34:46 +01:00
PartialVolume
447c4eddf7 HPA_DCO_013 Continuation of HPA/DCO integration
Fixes to apparent and real disc size fields in PDF based on use
of c->Calculated_real_max_size_in_bytes.

Minor changes to HPA status messages for consistent messaging.

When HPA and DCO sector information cannot be obtained display the
message "HPA/DCO data unavailable, can not determine hidden sector
status" in the information field on the PDF.

Determine human readable size for the c->Calculated_real_max_size_in_bytes
as used in the PDF real disc size field.

Instead of >>FAILURE!<< -1 when a I/O error occurs display >>IOERROR!<< -1
in the GUI.
2023-04-12 23:29:13 +01:00
PartialVolume
3a9ff16d29 Merge pull request #464 from PartialVolume/HPA_DCO_012
HPA_DCO_012 Continuation of HPA/DCO integration
2023-04-11 22:47:31 +01:00
PartialVolume
d981159f04 HPA_DCO_012 Continuation of HPA/DCO integration
Simplified the code that determines whether a HPA/DCO
is present and in the process fixed some related bugs
to do with the HPA/DCO fields in the PDF document
displaying incorrect information in some drive specific
cases.
2023-04-11 22:42:16 +01:00
PartialVolume
3d2ba87967 Merge pull request #463 from PartialVolume/HPA_DCO_011
HPA_DCO_011 Continuation of HPA/DCO integration.
2023-04-05 22:58:02 +01:00
PartialVolume
e7fca73970 HPA_DCO_011 Continuation of HPA/DCO integration.
Fixed a issue that occurs when a drive is attached via a USB adapter
that doesn't correctly pass the ATA commands for HPA/DCO determination.

It incorrectly set the HPA_status as enabled when in fact it should
have determined that DCO was accessible and a comparison against
the size as returned by libata and the real max sectors which in this
particular adapters case worked, was sufficient to correctly determine
whether there were hidden sectors or not.

Now fixed, so HPA status is now determined correctly even on some
less than ideal USB adapters.
2023-04-05 22:50:39 +01:00
PartialVolume
dfa78567e0 Merge pull request #462 from PartialVolume/HPA_DCO_010
HPA_DCO_010 Continuation of HPA/DCO integration.
2023-04-05 18:12:16 +01:00
PartialVolume
30997876a5 HPA_DCO_010 Continuation of HPA/DCO integration.
The Seagate EXOS family of drives don't support the ATA
drive configuration overlay (DCO) command, however they do
support host protected area (HPA). Therefore these drives
can have hidden sectors.

The code was changed to accommodate the slightly different
way these drives respond to a hdparm -N, that is, the
response is accessible max address enabled or
accessible max address disabled. The new code correctly
determines a the status of a drive in regards to
whether it has hidden sectors or not and what it's
apparent and real size is.
2023-04-05 18:05:54 +01:00
PartialVolume
0c41d895e2 Merge pull request #461 from PartialVolume/HPA_DCO_009
HPA_DCO_009 Continuation of HPA/DCO integration.
2023-04-04 23:58:42 +01:00
PartialVolume
776717a729 HPA_DCO_009 Continuation of HPA/DCO integration.
Changed the way percentage is calculated. As we
are dealing with large numbers and for some reason
printf prints a double that is 99.99999999999 as
100.00 when a precision of two is specified I wrote
a function that creates a percentage string such that
99.99999999999 is displayed as 99.99%. This is important
in the report as a disc with one hidden sector will now
correctly show as 99.99% erased and not 100.00% erased.
2023-04-04 23:52:40 +01:00
PartialVolume
a1e607dc02 Merge pull request #460 from PartialVolume/HPA_DCO_008
HPA_DCO_008 continuation of HPA/DCO integration.
2023-04-03 23:19:20 +01:00
PartialVolume
0b720b155c HPA_DCO_008 continuation of HPA/DCO integration.
Many changes related to DCO real max sectors and HPA set and real
sectors and how they are processed and used in the PDF creation
function. More testing is required until I'm happy this works
correctly with lots of different hardware including USB adapters
that don't support DCO/HPA and also drives that don't support
DCO/HPA such as the Seagate Enterprise EXOS drives.
2023-04-03 23:11:41 +01:00