Style formatting

This commit is contained in:
PartialVolume
2020-03-13 17:48:20 +00:00
parent 1c1b25e1ae
commit e955725fc5
3 changed files with 26 additions and 31 deletions

View File

@@ -197,13 +197,13 @@ int check_device( nwipe_context_t*** c, PedDevice* dev, int dcount )
next_device->device_size_text,
next_device->device_model );
}
nwipe_log( NWIPE_LOG_NOTICE,
"Found %s, %s, %s, S/N=%s",
next_device->device_name,
next_device->device_model,
next_device->device_size_text,
next_device->device_serial_no );
nwipe_log( NWIPE_LOG_NOTICE,
"Found %s, %s, %s, S/N=%s",
next_device->device_name,
next_device->device_model,
next_device->device_size_text,
next_device->device_serial_no );
( *c )[dcount] = next_device;
return 1;

View File

@@ -703,21 +703,16 @@ int nwipe_runmethod( nwipe_context_t* c, nwipe_pattern_t* patterns )
/* Initialize the working round counter. */
c->round_working = 0;
nwipe_log( NWIPE_LOG_NOTICE,
"Invoking method '%s' on %s",
nwipe_method_label( nwipe_options.method ),
c->device_name );
nwipe_log(
NWIPE_LOG_NOTICE, "Invoking method '%s' on %s", nwipe_method_label( nwipe_options.method ), c->device_name );
while( c->round_working < c->round_count )
{
/* Increment the round counter. */
c->round_working += 1;
nwipe_log( NWIPE_LOG_NOTICE,
"Starting round %i of %i on %s",
c->round_working,
c->round_count,
c->device_name );
nwipe_log(
NWIPE_LOG_NOTICE, "Starting round %i of %i on %s", c->round_working, c->round_count, c->device_name );
/* Initialize the working pass counter. */
c->pass_working = 0;
@@ -884,11 +879,8 @@ int nwipe_runmethod( nwipe_context_t* c, nwipe_pattern_t* patterns )
} /* for passes */
nwipe_log( NWIPE_LOG_NOTICE,
"Finished round %i of %i on %s",
c->round_working,
c->round_count,
c->device_name );
nwipe_log(
NWIPE_LOG_NOTICE, "Finished round %i of %i on %s", c->round_working, c->round_count, c->device_name );
} /* while rounds */

View File

@@ -317,15 +317,8 @@ int main( int argc, char** argv )
/* Do sector size and block size checking. */
if( ioctl( c2[i]->device_fd, BLKSSZGET, &c2[i]->device_sector_size ) == 0 )
{
//nwipe_log(
//NWIPE_LOG_INFO, "Device '%s' has sector size %i.", c2[i]->device_name, c2[i]->device_sector_size );
if( ioctl( c2[i]->device_fd, BLKBSZGET, &c2[i]->device_block_size ) == 0 )
{
//nwipe_log(
//NWIPE_LOG_INFO, "Device '%s' has block size %i.", c2[i]->device_name, c2[i]->device_block_size );
}
else
if( ioctl( c2[i]->device_fd, BLKBSZGET, &c2[i]->device_block_size ) != 0 )
{
nwipe_log( NWIPE_LOG_WARNING, "Device '%s' failed BLKBSZGET ioctl.", c2[i]->device_name );
c2[i]->device_block_size = 0;
@@ -386,13 +379,23 @@ int main( int argc, char** argv )
if( c2[i]->device_size == 0 )
{
nwipe_log( NWIPE_LOG_ERROR, "%s, sect/blk/dev %llu/%i/%i", c2[i]->device_name, c2[i]->device_sector_size, c2[i]->device_block_size, c2[i]->device_size );
nwipe_log( NWIPE_LOG_ERROR,
"%s, sect/blk/dev %llu/%i/%i",
c2[i]->device_name,
c2[i]->device_sector_size,
c2[i]->device_block_size,
c2[i]->device_size );
nwipe_error++;
continue;
}
else
{
nwipe_log( NWIPE_LOG_NOTICE, "%s, sect/blk/dev %llu/%i/%i", c2[i]->device_name, c2[i]->device_sector_size, c2[i]->device_block_size, c2[i]->device_size );
nwipe_log( NWIPE_LOG_NOTICE,
"%s, sect/blk/dev %llu/%i/%i",
c2[i]->device_name,
c2[i]->device_sector_size,
c2[i]->device_block_size,
c2[i]->device_size );
}
/* Fork a child process. */