mirror of
https://github.com/martijnvanbrummelen/nwipe.git
synced 2026-02-20 13:42:14 +00:00
Style formatting
This commit is contained in:
14
src/device.c
14
src/device.c
@@ -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;
|
||||
|
||||
20
src/method.c
20
src/method.c
@@ -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 */
|
||||
|
||||
|
||||
23
src/nwipe.c
23
src/nwipe.c
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user