nshlib/dd: Increase the integer width for sector size in dd.

On some systems, using sector sizes larger than 65536 is needed for
profiling performance or testing.
This commit is contained in:
Stuart Ianna 2023-06-26 11:42:20 +10:00 committed by Xiang Xiao
parent a549668439
commit 53e837e357

View File

@ -76,8 +76,8 @@ struct dd_s
uint32_t skip; /* The number of sectors skipped on input */
bool eof; /* true: The end of the input or output file has been hit */
bool verify; /* true: Verify infile and outfile correctness */
uint16_t sectsize; /* Size of one sector */
uint16_t nbytes; /* Number of valid bytes in the buffer */
size_t sectsize; /* Size of one sector */
size_t nbytes; /* Number of valid bytes in the buffer */
FAR uint8_t *buffer; /* Buffer of data to write to the output file */
};
@ -92,7 +92,7 @@ struct dd_s
static int dd_write(FAR struct dd_s *dd)
{
FAR uint8_t *buffer = dd->buffer;
uint16_t written ;
size_t written;
ssize_t nbytes;
/* Is the out buffer full (or is this the last one)? */