Some IDE USB adapter chipsets get the endian wrong for model name
This fix identifies a endian swapped model name and corrects it.
The function currently only includes Samsung but I'll add more IDE
drive manufacturers as I come across them.
This is peculiar to some USB IDE adapters. I've never seen this
issue with SATA, ATA drives connected directly to the motherboard.
Under the following conditions a segfault will
occur upon starting nwipe.
Run nwipe with --logfile option AND run nwipe in a directory that does
not have write permissions so the logfile can't be created AND run nwipe
without sudo or root or as as a user without sufficient privileges so
you don't have permissions to write to the directory.
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.
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.
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.
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.
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.