PKG_CHECK_MODULES needs all modules in a single list or else the following
error message appears during configure run:
./configure: 6807: libconfig: not found
because the macro interprets "[libconfig]" as the action that needs to be
done if parted was found.
Removed superfluous check for libconfig as requested by PartialVolume
This fixes a valgrind detected error. We check that
the number of real max sectors is greater than zero before
incrementing the value by 1. However ocassionaly the ioctl
call may not be able to obtain the dco and therefore the
ioctl data block is never populated. By zeroing the data
block prior to use and if it is not populated by the ioctl
call then the calculated real max sectors will be
zero and no increment will occur which is what we want.
Now populates the block size (physical) before
the hidden sector determination function runs.
The naming of block/sector can be very confusing in
nwipe. So I have created a device_phy_sector_size
in the drive context, so we have
->device_sector_size // logical sector size
->device_phys_sector_size // physical sector size
->device_block_size // Usually the same as logical
size but could be increased by nwipe to encompass
multiple logical sectors, i.e a block of sectors
This fixes an issue where nwipe detects a discrepancy
between the number of sectors reported by hdparm and
nwipe's own HPA/DCO functions that were reporting the
same values, using number of sectors based on 512 byte
sectors but disagreed with the number of sectors
generated from libata which was reporting the number of
sectors based on 4096 byte sectors.
This has been fixed by always calculating the number
of sectors returned by libata using 512 bytes per sector
so a direct comparison can be made to data from hdparm
& nwipe's HPA/DCO functions.
These changes solve three issues. The first
issue was that it wasn't obvious that the
PDFs are only created once you press return
to exit after all the wipes have finished. It
is now explicitly stated in the footer message if
PDFs are enabled.
It also now specifies the logfile name on the
footer if the user has specified a log file as a
command line option. If no logfile is specified
then STDOUT is displayed.
If the user specified --PDFreportpath=noPDF on the
command line, prior to this commit it had no affect.
This is now fixed so that it disables PDF's irrespective
of what is in nwipe.conf. i.e command line options
override the entries in nwipe.conf
If the user has specified a --PDFreportpath=noPDF=/some/path
then PDF's are enabled irrespective of the value in nwipe.conf