Skip to content

Commit

Permalink
Merge pull request martijnvanbrummelen#403 from martijnvanbrummelen/r…
Browse files Browse the repository at this point in the history
…evert-402-revert-401-update_isaac64_command_line_options_help_and_man_page

Revert "Revert "Isaac64, update options, help and man page""
  • Loading branch information
PartialVolume authored Jan 13, 2022
2 parents 34fca07 + 40569ce commit dff450c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion man/nwipe.1
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ is5enh \- HMG IS5 enhanced
Filename to log to. Default is STDOUT
.TP
\fB\-p\fR, \fB\-\-prng\fR=\fIMETHOD\fR
PRNG option (mersenne|twister|isaac)
PRNG option (mersenne|twister|isaac|isaac64)
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Anonymize serial numbers, Gui & logs display:
Expand Down
18 changes: 16 additions & 2 deletions src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,12 @@ int nwipe_options_parse( int argc, char** argv )
break;
}

if( strcmp( optarg, "isaac64" ) == 0 )
{
nwipe_options.prng = &nwipe_isaac64;
break;
}

/* Else we do not know this PRNG. */
fprintf( stderr, "Error: Unknown prng '%s'.\n", optarg );
exit( EINVAL );
Expand Down Expand Up @@ -423,6 +429,7 @@ void nwipe_options_log( void )
{
extern nwipe_prng_t nwipe_twister;
extern nwipe_prng_t nwipe_isaac;
extern nwipe_prng_t nwipe_isaac64;

/**
* Prints a manifest of options to the log.
Expand Down Expand Up @@ -482,7 +489,14 @@ void nwipe_options_log( void )
}
else
{
nwipe_log( NWIPE_LOG_NOTICE, " prng = Undefined" );
if( nwipe_options.prng == &nwipe_isaac64 )
{
nwipe_log( NWIPE_LOG_NOTICE, " prng = Isaac64" );
}
else
{
nwipe_log( NWIPE_LOG_NOTICE, " prng = Undefined" );
}
}
}

Expand Down Expand Up @@ -556,7 +570,7 @@ void display_help()
puts( " verify_zero - Verifies disk is zero filled" );
puts( " verify_one - Verifies disk is 0xFF filled\n" );
puts( " -l, --logfile=FILE Filename to log to. Default is STDOUT\n" );
puts( " -p, --prng=METHOD PRNG option (mersenne|twister|isaac)\n" );
puts( " -p, --prng=METHOD PRNG option (mersenne|twister|isaac|isaac64)\n" );
puts( " -q, --quiet Anonymize logs and the GUI by removing unique data, i.e." );
puts( " serial numbers, LU WWN Device ID, and SMBIOS/DMI data" );
puts( " XXXXXX = S/N exists, ????? = S/N not obtainable\n" );
Expand Down

0 comments on commit dff450c

Please sign in to comment.