Skip to content

Commit ebd82c1

Browse files
committed
system/dd: align nsh dd command
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. Stuart Ianna <[email protected]> Signed-off-by: dongjiuzhu1 <[email protected]>
1 parent 489b7a6 commit ebd82c1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

system/dd/dd_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ struct dd_s
8181
uint32_t seek; /* The number of sectors seeked on output */
8282
int oflags; /* The open flags on output deivce */
8383
bool eof; /* true: The end of the input or output file has been hit */
84-
uint16_t sectsize; /* Size of one sector */
85-
uint16_t nbytes; /* Number of valid bytes in the buffer */
84+
size_t sectsize; /* Size of one sector */
85+
size_t nbytes; /* Number of valid bytes in the buffer */
8686
FAR uint8_t *buffer; /* Buffer of data to write to the output file */
8787
};
8888

@@ -97,7 +97,7 @@ struct dd_s
9797
static int dd_write(FAR struct dd_s *dd)
9898
{
9999
FAR uint8_t *buffer = dd->buffer;
100-
uint16_t written;
100+
size_t written;
101101
ssize_t nbytes;
102102

103103
/* Is the out buffer full (or is this the last one)? */

0 commit comments

Comments
 (0)