From 67fbbf935b3d73f3acd65bca49a5f124972e50d1 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Sun, 22 Nov 2020 10:52:05 +0900 Subject: [PATCH] fs/romfs/fs_romfs.c: Fix syslog formats --- fs/romfs/fs_romfs.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fs/romfs/fs_romfs.c b/fs/romfs/fs_romfs.c index d382352c83..675d075ffc 100644 --- a/fs/romfs/fs_romfs.c +++ b/fs/romfs/fs_romfs.c @@ -375,7 +375,7 @@ static ssize_t romfs_read(FAR struct file *filep, FAR char *buffer, int sectorndx; int ret; - finfo("Read %zu bytes from offset %d\n", buflen, filep->f_pos); + finfo("Read %zu bytes from offset %jd\n", buflen, (intmax_t)filep->f_pos); /* Sanity checks */ @@ -443,7 +443,8 @@ static ssize_t romfs_read(FAR struct file *filep, FAR char *buffer, /* Read all of the sectors directly into user memory */ - finfo("Read %d sectors starting with %d\n", nsectors, sector); + finfo("Read %d sectors starting with %jd\n", nsectors, + (intmax_t)sector); ret = romfs_hwread(rm, userbuffer, sector, nsectors); if (ret < 0) { @@ -460,7 +461,7 @@ static ssize_t romfs_read(FAR struct file *filep, FAR char *buffer, * it is already there then all is well. */ - finfo("Read sector %d\n", sector); + finfo("Read sector %jd\n", (intmax_t)sector); ret = romfs_filecacheread(rm, rf, sector); if (ret < 0) { @@ -510,7 +511,7 @@ static off_t romfs_seek(FAR struct file *filep, off_t offset, int whence) off_t position; int ret; - finfo("Seek to offset: %d whence: %d\n", offset, whence); + finfo("Seek to offset: %jd whence: %d\n", (intmax_t)offset, whence); /* Sanity checks */ @@ -575,7 +576,7 @@ static off_t romfs_seek(FAR struct file *filep, off_t offset, int whence) /* Set file position and return success */ filep->f_pos = position; - finfo("New file position: %d\n", filep->f_pos); + finfo("New file position: %jd\n", (intmax_t)filep->f_pos); romfs_semgive(rm); return OK;