drivers/mtd/sector512.c: Fix syslog formats
This commit is contained in:
parent
cb52176615
commit
d1b5ab99ec
@ -43,6 +43,7 @@
|
|||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -253,8 +254,7 @@ static int s512_erase(FAR struct mtd_dev_s *dev, off_t sector512, size_t nsector
|
|||||||
size_t eblockno;
|
size_t eblockno;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
finfo("sector512: %08lx nsectors: %lu\n",
|
finfo("sector512: %08jx nsectors: %zu\n", (intmax_t)sector512, nsectors);
|
||||||
(unsigned long)sector512, (unsigned int)nsectors);
|
|
||||||
|
|
||||||
while (sectorsleft-- > 0)
|
while (sectorsleft-- > 0)
|
||||||
{
|
{
|
||||||
@ -265,7 +265,7 @@ static int s512_erase(FAR struct mtd_dev_s *dev, off_t sector512, size_t nsector
|
|||||||
dest = s512_cacheread(priv, sector512);
|
dest = s512_cacheread(priv, sector512);
|
||||||
if (!dest)
|
if (!dest)
|
||||||
{
|
{
|
||||||
ferr("ERROR: s512_cacheread(%ul) failed\n", (unsigned long)sector512);
|
ferr("ERROR: s512_cacheread(%lu) failed\n", (unsigned long)sector512);
|
||||||
DEBUGPANIC();
|
DEBUGPANIC();
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
@ -333,7 +333,7 @@ static ssize_t s512_bread(FAR struct mtd_dev_s *dev, off_t sector512,
|
|||||||
src = s512_cacheread(priv, sector512);
|
src = s512_cacheread(priv, sector512);
|
||||||
if (!src)
|
if (!src)
|
||||||
{
|
{
|
||||||
ferr("ERROR: s512_cacheread(%ul) failed\n", (unsigned long)sector512);
|
ferr("ERROR: s512_cacheread(%lu) failed\n", (unsigned long)sector512);
|
||||||
DEBUGPANIC();
|
DEBUGPANIC();
|
||||||
|
|
||||||
result = (ssize_t)nsectors - remaining;
|
result = (ssize_t)nsectors - remaining;
|
||||||
@ -467,7 +467,7 @@ static ssize_t s512_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes,
|
|||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
ferr("ERROR: s512_cacheread(%ul) failed\n", (unsigned long)sector);
|
ferr("ERROR: s512_cacheread(%lu) failed\n", (unsigned long)sector);
|
||||||
DEBUGPANIC();
|
DEBUGPANIC();
|
||||||
|
|
||||||
result = (ssize_t)nbytes - remaining;
|
result = (ssize_t)nbytes - remaining;
|
||||||
@ -528,7 +528,8 @@ static int s512_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
|
|||||||
geo->neraseblocks = priv->neblocks * priv->stdperblock;
|
geo->neraseblocks = priv->neblocks * priv->stdperblock;
|
||||||
ret = OK;
|
ret = OK;
|
||||||
|
|
||||||
finfo("blocksize: %d erasesize: %d neraseblocks: %d\n",
|
finfo("blocksize: %" PRId32 " erasesize: %" PRId32
|
||||||
|
" neraseblocks: %" PRId32 "\n",
|
||||||
geo->blocksize, geo->erasesize, geo->neraseblocks);
|
geo->blocksize, geo->erasesize, geo->neraseblocks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -594,7 +595,7 @@ FAR struct mtd_dev_s *s512_initialize(FAR struct mtd_dev_s *mtd)
|
|||||||
if (ret < 0 || geo.erasesize <= SECTOR_512 ||
|
if (ret < 0 || geo.erasesize <= SECTOR_512 ||
|
||||||
(geo.erasesize & ~MASK_512) != geo.erasesize)
|
(geo.erasesize & ~MASK_512) != geo.erasesize)
|
||||||
{
|
{
|
||||||
ferr("ERROR: MTDIOC_GEOMETRY ioctl returned %d, eraseize=%d\n",
|
ferr("ERROR: MTDIOC_GEOMETRY ioctl returned %d, eraseize=%" PRId32 "\n",
|
||||||
ret, geo.erasesize);
|
ret, geo.erasesize);
|
||||||
DEBUGPANIC();
|
DEBUGPANIC();
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user