mirror of
https://github.com/apache/nuttx.git
synced 2026-10-06 22:05:21 +00:00
sama5/at25_main: fix direct use of nput, convert to int
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
parent
a5459cdaca
commit
f53f0ecf0e
1 changed files with 4 additions and 4 deletions
|
|
@ -182,7 +182,7 @@ int at25_main(int argc, char *argv[])
|
|||
/* The HEX file load was successful, write the data to FLASH */
|
||||
|
||||
printf("Successfully loaded the Intel HEX file into memory...\n");
|
||||
printf(" Writing %d bytes to the AT25 Serial FLASH\n",
|
||||
printf(" Writing %" PRIdOFF " bytes to the AT25 Serial FLASH\n",
|
||||
memoutstream.common.nput);
|
||||
|
||||
remaining = memoutstream.common.nput;
|
||||
|
|
@ -215,7 +215,7 @@ int at25_main(int argc, char *argv[])
|
|||
* the same.
|
||||
*/
|
||||
|
||||
printf(" Verifying %d bytes in the AT25 Serial FLASH\n",
|
||||
printf(" Verifying %" PRIdOFF " bytes in the AT25 Serial FLASH\n",
|
||||
memoutstream.common.nput);
|
||||
|
||||
/* Open the AT25 device for writing */
|
||||
|
|
@ -254,7 +254,7 @@ int at25_main(int argc, char *argv[])
|
|||
{
|
||||
if (memcmp(g_iobuffer, src, nread) != 0)
|
||||
{
|
||||
fprintf(stderr, "ERROR: Verify failed at offset %d\n",
|
||||
fprintf(stderr, "ERROR: Verify failed at offset %"PRIdOFF"\n",
|
||||
memoutstream.common.nput - remaining);
|
||||
close(fd);
|
||||
return EXIT_FAILURE;
|
||||
|
|
@ -266,7 +266,7 @@ int at25_main(int argc, char *argv[])
|
|||
}
|
||||
while (remaining > 0);
|
||||
|
||||
printf(" Successfully verified %d bytes in the AT25 Serial FLASH\n",
|
||||
printf("Successfully verified %"PRIdOFF" bytes in the AT25 Serial FLASH\n",
|
||||
memoutstream.common.nput);
|
||||
|
||||
close(fd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue