From ad2f7b011939220ff700257c7272f5d8b6df7495 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 11 Jun 2016 17:14:02 -0600 Subject: [PATCH] fs/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition. --- fs/driver/fs_closeblockdriver.c | 2 +- fs/driver/fs_findblockdriver.c | 6 ++-- fs/driver/fs_openblockdriver.c | 4 +-- fs/fat/fs_configfat.c | 36 +++++++++---------- fs/fat/fs_fat32.c | 4 +-- fs/fat/fs_fat32util.c | 34 +++++++++--------- fs/mmap/fs_mmap.c | 6 ++-- fs/mmap/fs_munmap.c | 4 +-- fs/mmap/fs_rammap.c | 7 ++-- fs/mount/fs_automount.c | 2 +- fs/nfs/nfs_util.c | 12 +++---- fs/nfs/nfs_vfsops.c | 8 ++--- fs/nfs/rpc_clnt.c | 10 +++--- fs/nxffs/nxffs_blockstats.c | 22 ++++++------ fs/nxffs/nxffs_initialize.c | 2 +- fs/romfs/fs_romfs.c | 62 ++++++++++++++++----------------- fs/romfs/fs_romfsutil.c | 2 +- fs/smartfs/smartfs_smart.c | 46 +++++++++++++++--------- fs/smartfs/smartfs_utils.c | 54 +++++++++++++++------------- fs/tmpfs/fs_tmpfs.c | 2 +- fs/vfs/fs_epoll.c | 4 +-- 21 files changed, 173 insertions(+), 156 deletions(-) diff --git a/fs/driver/fs_closeblockdriver.c b/fs/driver/fs_closeblockdriver.c index defd3dcb5c..7c9c60244d 100644 --- a/fs/driver/fs_closeblockdriver.c +++ b/fs/driver/fs_closeblockdriver.c @@ -84,7 +84,7 @@ int close_blockdriver(FAR struct inode *inode) if (!INODE_IS_BLOCK(inode)) { - ferr("inode is not a block driver\n"); + ferr("ERROR: inode is not a block driver\n"); ret = -ENOTBLK; goto errout; } diff --git a/fs/driver/fs_findblockdriver.c b/fs/driver/fs_findblockdriver.c index b2b47e4ecb..8667beaef2 100644 --- a/fs/driver/fs_findblockdriver.c +++ b/fs/driver/fs_findblockdriver.c @@ -96,7 +96,7 @@ int find_blockdriver(FAR const char *pathname, int mountflags, FAR struct inode inode = inode_find(pathname, NULL); if (!inode) { - ferr("Failed to find %s\n", pathname); + ferr("ERROR: Failed to find %s\n", pathname); ret = -ENOENT; goto errout; } @@ -105,7 +105,7 @@ int find_blockdriver(FAR const char *pathname, int mountflags, FAR struct inode if (!INODE_IS_BLOCK(inode)) { - ferr("%s is not a block driver\n", pathname); + ferr("ERROR: %s is not a block driver\n", pathname); ret = -ENOTBLK; goto errout_with_inode; } @@ -115,7 +115,7 @@ int find_blockdriver(FAR const char *pathname, int mountflags, FAR struct inode if (!inode->u.i_bops || !inode->u.i_bops->read || (!inode->u.i_bops->write && (mountflags & MS_RDONLY) == 0)) { - ferr("%s does not support requested access\n", pathname); + ferr("ERROR: %s does not support requested access\n", pathname); ret = -EACCES; goto errout_with_inode; } diff --git a/fs/driver/fs_openblockdriver.c b/fs/driver/fs_openblockdriver.c index 67a955cf57..9a42020bf7 100644 --- a/fs/driver/fs_openblockdriver.c +++ b/fs/driver/fs_openblockdriver.c @@ -96,7 +96,7 @@ int open_blockdriver(FAR const char *pathname, int mountflags, ret = find_blockdriver(pathname, mountflags, &inode); if (ret < 0) { - ferr("Failed to file %s block driver\n", pathname); + ferr("ERROR: Failed to file %s block driver\n", pathname); goto errout; } @@ -110,7 +110,7 @@ int open_blockdriver(FAR const char *pathname, int mountflags, ret = inode->u.i_bops->open(inode); if (ret < 0) { - ferr("%s driver open failed\n", pathname); + ferr("ERROR: %s driver open failed\n", pathname); goto errout_with_inode; } } diff --git a/fs/fat/fs_configfat.c b/fs/fat/fs_configfat.c index 3064a82f92..11fc358e2e 100644 --- a/fs/fat/fs_configfat.c +++ b/fs/fat/fs_configfat.c @@ -473,7 +473,7 @@ mkfatfs_tryfat12(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var, if (config->fc_nclusters + 2 > maxnclusters) { - ferr("Too many clusters for FAT12: %d > %d\n", + ferr("ERROR: Too many clusters for FAT12: %d > %d\n", config->fc_nclusters, maxnclusters - 2); return -ENFILE; @@ -550,7 +550,7 @@ mkfatfs_tryfat16(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var, if ((config->fc_nclusters + 2 > maxnclusters) || (config->fc_nclusters < FAT_MINCLUST16)) { - ferr("Too few or too many clusters for FAT16: %d < %d < %d\n", + ferr("ERROR: Too few or too many clusters for FAT16: %d < %d < %d\n", FAT_MINCLUST16, config->fc_nclusters, maxnclusters - 2); return -ENFILE; @@ -622,7 +622,7 @@ mkfatfs_tryfat32(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var, if ((config->fc_nclusters + 3 > maxnclusters) || (config->fc_nclusters < FAT_MINCLUST32)) { - ferr("Too few or too many clusters for FAT32: %d < %d < %d\n", + ferr("ERROR: Too few or too many clusters for FAT32: %d < %d < %d\n", FAT_MINCLUST32, config->fc_nclusters, maxnclusters - 3); return -ENFILE; @@ -696,7 +696,7 @@ mkfatfs_clustersearch(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var) if (fmt->ff_rsvdseccount < 2) { - ferr("At least 2 reserved sectors needed by FAT32\n"); + ferr("ERROR: At least 2 reserved sectors needed by FAT32\n"); fatconfig32.fc_rsvdseccount = 2; } else @@ -756,7 +756,7 @@ mkfatfs_clustersearch(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var) if (mkfatfs_tryfat12(fmt, var, &fatconfig12) != 0) { - ferr("Cannot format FAT12 at %u sectors/cluster\n", + ferr("ERROR: Cannot format FAT12 at %u sectors/cluster\n", 1 << fmt->ff_clustshift); fatconfig12.fc_nfatsects = 0; @@ -772,7 +772,7 @@ mkfatfs_clustersearch(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var) if (mkfatfs_tryfat16(fmt, var, &fatconfig16) != 0) { - ferr("Cannot format FAT16 at %u sectors/cluster\n", + ferr("ERROR: Cannot format FAT16 at %u sectors/cluster\n", 1 << fmt->ff_clustshift); fatconfig16.fc_nfatsects = 0; @@ -828,7 +828,7 @@ mkfatfs_clustersearch(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var) if (mkfatfs_tryfat32(fmt, var, &fatconfig32) != 0) { - ferr("Cannot format FAT32 at %u sectors/cluster\n", + ferr("ERROR: Cannot format FAT32 at %u sectors/cluster\n", 1 << fmt->ff_clustshift); fatconfig32.fc_nfatsects = 0; @@ -940,7 +940,7 @@ int mkfatfs_configfatfs(FAR struct fat_format_s *fmt, if (fmt->ff_backupboot <= 1 || fmt->ff_backupboot >= fmt->ff_rsvdseccount) { - ferr("Invalid backup boot sector: %d\n", fmt->ff_backupboot); + ferr("ERROR: Invalid backup boot sector: %d\n", fmt->ff_backupboot); fmt->ff_backupboot = 0; } @@ -974,21 +974,21 @@ int mkfatfs_configfatfs(FAR struct fat_format_s *fmt, /* Describe the configured filesystem */ #ifdef CONFIG_DEBUG_FEATURES - ferr("Sector size: %d bytes\n", var->fv_sectorsize); - ferr("Number of sectors: %d sectors\n", fmt->ff_nsectors); - ferr("FAT size: %d bits\n", var->fv_fattype); - ferr("Number FATs: %d\n", fmt->ff_nfats); - ferr("Sectors per cluster: %d sectors\n", 1 << fmt->ff_clustshift); - ferr("FS size: %d sectors\n", var->fv_nfatsects); - ferr(" %d clusters\n", var->fv_nclusters); + finfo("Sector size: %d bytes\n", var->fv_sectorsize); + finfo("Number of sectors: %d sectors\n", fmt->ff_nsectors); + finfo("FAT size: %d bits\n", var->fv_fattype); + finfo("Number FATs: %d\n", fmt->ff_nfats); + finfo("Sectors per cluster: %d sectors\n", 1 << fmt->ff_clustshift); + finfo("FS size: %d sectors\n", var->fv_nfatsects); + finfo(" %d clusters\n", var->fv_nclusters); if (var->fv_fattype != 32) { - ferr("Root directory slots: %d\n", fmt->ff_rootdirentries); + finfo("Root directory slots: %d\n", fmt->ff_rootdirentries); } - ferr("Volume ID: %08x\n", fmt->ff_volumeid); - ferr("Volume Label: \"%c%c%c%c%c%c%c%c%c%c%c\"\n", + finfo("Volume ID: %08x\n", fmt->ff_volumeid); + finfo("Volume Label: \"%c%c%c%c%c%c%c%c%c%c%c\"\n", fmt->ff_volumelabel[0], fmt->ff_volumelabel[1], fmt->ff_volumelabel[2], fmt->ff_volumelabel[3], fmt->ff_volumelabel[4], fmt->ff_volumelabel[5], fmt->ff_volumelabel[6], fmt->ff_volumelabel[7], fmt->ff_volumelabel[8], diff --git a/fs/fat/fs_fat32.c b/fs/fat/fs_fat32.c index 46ace6fd89..618aa22e2f 100644 --- a/fs/fat/fs_fat32.c +++ b/fs/fat/fs_fat32.c @@ -624,7 +624,7 @@ fat_read_restart: if (ret == -EFAULT && !force_indirect) { - ferr("DMA: read alignment error, restarting indirect\n"); + ferr("ERROR: DMA read alignment error, restarting indirect\n"); force_indirect = true; goto fat_read_restart; } @@ -884,7 +884,7 @@ fat_write_restart: if (ret == -EFAULT && !force_indirect) { - ferr("DMA: write alignment error, restarting indirect\n"); + ferr("ERROR: DMA write alignment error, restarting indirect\n"); force_indirect = true; goto fat_write_restart; } diff --git a/fs/fat/fs_fat32util.c b/fs/fat/fs_fat32util.c index 1ed62cb1e7..a4ec2732cb 100644 --- a/fs/fat/fs_fat32util.c +++ b/fs/fat/fs_fat32util.c @@ -623,7 +623,7 @@ int fat_mount(struct fat_mountpt_s *fs, bool writeable) if (i > 3) { - ferr("No valid MBR\n"); + ferr("ERROR: No valid MBR\n"); ret = -EINVAL; goto errout_with_buffer; } @@ -644,22 +644,22 @@ int fat_mount(struct fat_mountpt_s *fs, bool writeable) /* We did it! */ - ferr("FAT%d:\n", fs->fs_type == 0 ? 12 : fs->fs_type == 1 ? 16 : 32); - ferr("\tHW sector size: %d\n", fs->fs_hwsectorsize); - ferr("\t sectors: %d\n", fs->fs_hwnsectors); - ferr("\tFAT reserved: %d\n", fs->fs_fatresvdseccount); - ferr("\t sectors: %d\n", fs->fs_fattotsec); - ferr("\t start sector: %d\n", fs->fs_fatbase); - ferr("\t root sector: %d\n", fs->fs_rootbase); - ferr("\t root entries: %d\n", fs->fs_rootentcnt); - ferr("\t data sector: %d\n", fs->fs_database); - ferr("\t FSINFO sector: %d\n", fs->fs_fsinfo); - ferr("\t Num FATs: %d\n", fs->fs_fatnumfats); - ferr("\t FAT sectors: %d\n", fs->fs_nfatsects); - ferr("\t sectors/cluster: %d\n", fs->fs_fatsecperclus); - ferr("\t max clusters: %d\n", fs->fs_nclusters); - ferr("\tFSI free count %d\n", fs->fs_fsifreecount); - ferr("\t next free %d\n", fs->fs_fsinextfree); + finfo("FAT%d:\n", fs->fs_type == 0 ? 12 : fs->fs_type == 1 ? 16 : 32); + finfo("\tHW sector size: %d\n", fs->fs_hwsectorsize); + finfo("\t sectors: %d\n", fs->fs_hwnsectors); + finfo("\tFAT reserved: %d\n", fs->fs_fatresvdseccount); + finfo("\t sectors: %d\n", fs->fs_fattotsec); + finfo("\t start sector: %d\n", fs->fs_fatbase); + finfo("\t root sector: %d\n", fs->fs_rootbase); + finfo("\t root entries: %d\n", fs->fs_rootentcnt); + finfo("\t data sector: %d\n", fs->fs_database); + finfo("\t FSINFO sector: %d\n", fs->fs_fsinfo); + finfo("\t Num FATs: %d\n", fs->fs_fatnumfats); + finfo("\t FAT sectors: %d\n", fs->fs_nfatsects); + finfo("\t sectors/cluster: %d\n", fs->fs_fatsecperclus); + finfo("\t max clusters: %d\n", fs->fs_nclusters); + finfo("\tFSI free count %d\n", fs->fs_fsifreecount); + finfo("\t next free %d\n", fs->fs_fsinextfree); return OK; diff --git a/fs/mmap/fs_mmap.c b/fs/mmap/fs_mmap.c index 222a2591b2..1d8f88e705 100644 --- a/fs/mmap/fs_mmap.c +++ b/fs/mmap/fs_mmap.c @@ -135,14 +135,14 @@ FAR void *mmap(FAR void *start, size_t length, int prot, int flags, if (prot == PROT_NONE || (flags & (MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS | MAP_DENYWRITE)) != 0) { - ferr("Unsupported options, prot=%x flags=%04x\n", prot, flags); + ferr("ERROR: Unsupported options, prot=%x flags=%04x\n", prot, flags); set_errno(ENOSYS); return MAP_FAILED; } if (length == 0 || (flags & MAP_SHARED) == 0) { - ferr("Invalid options, lengt=%d flags=%04x\n", length, flags); + ferr("ERROR: Invalid options, lengt=%d flags=%04x\n", length, flags); set_errno(EINVAL); return MAP_FAILED; } @@ -163,7 +163,7 @@ FAR void *mmap(FAR void *start, size_t length, int prot, int flags, #ifdef CONFIG_FS_RAMMAP return rammap(fd, length, offset); #else - ferr("ioctl(FIOC_MMAP) failed: %d\n", get_errno()); + ferr("ERROR: ioctl(FIOC_MMAP) failed: %d\n", get_errno()); return MAP_FAILED; #endif } diff --git a/fs/mmap/fs_munmap.c b/fs/mmap/fs_munmap.c index cf53957085..5673797136 100644 --- a/fs/mmap/fs_munmap.c +++ b/fs/mmap/fs_munmap.c @@ -143,7 +143,7 @@ int munmap(FAR void *start, size_t length) if (!curr) { - ferr("Region not found\n"); + ferr("ERROR: Region not found\n"); errcode = EINVAL; goto errout_with_semaphore; } @@ -158,7 +158,7 @@ int munmap(FAR void *start, size_t length) offset = start - curr->addr; if (offset + length < curr->length) { - ferr("Cannot umap without unmapping to the end\n"); + ferr("ERROR: Cannot umap without unmapping to the end\n"); errcode = ENOSYS; goto errout_with_semaphore; } diff --git a/fs/mmap/fs_rammap.c b/fs/mmap/fs_rammap.c index 22ccd7aeea..5fe71478f5 100644 --- a/fs/mmap/fs_rammap.c +++ b/fs/mmap/fs_rammap.c @@ -142,7 +142,7 @@ FAR void *rammap(int fd, size_t length, off_t offset) alloc = (FAR uint8_t *)kumm_malloc(sizeof(struct fs_rammap_s) + length); if (!alloc) { - ferr("Region allocation failed, length: %d\n", (int)length); + ferr("ERROR: Region allocation failed, length: %d\n", (int)length); errcode = ENOMEM; goto errout; } @@ -164,7 +164,7 @@ FAR void *rammap(int fd, size_t length, off_t offset) * the correct response. */ - ferr("Seek to position %d failed\n", (int)offset); + ferr("ERROR: Seek to position %d failed\n", (int)offset); errcode = EINVAL; goto errout_with_region; } @@ -190,7 +190,8 @@ FAR void *rammap(int fd, size_t length, off_t offset) * destroy the errno value. */ - ferr("Read failed: offset=%d errno=%d\n", (int)offset, errcode); + ferr("ERROR: Read failed: offset=%d errno=%d\n", + (int)offset, errcode); #ifdef CONFIG_DEBUG_FS goto errout_with_region; #else diff --git a/fs/mount/fs_automount.c b/fs/mount/fs_automount.c index 689e58051a..f67f43573c 100644 --- a/fs/mount/fs_automount.c +++ b/fs/mount/fs_automount.c @@ -204,7 +204,7 @@ static void automount_mount(FAR struct automounter_state_s *priv) * try to unmount again because the mount might be stale. */ - ferr("WARNING: Mountpoint %s already exists\n", lower->mountpoint); + fwarn("WARNING: Mountpoint %s already exists\n", lower->mountpoint); ret = automount_unmount(priv); if (ret < 0) { diff --git a/fs/nfs/nfs_util.c b/fs/nfs/nfs_util.c index 7fa0944026..e2dd949dcd 100644 --- a/fs/nfs/nfs_util.c +++ b/fs/nfs/nfs_util.c @@ -103,7 +103,7 @@ static inline int nfs_pathsegment(FAR const char **path, FAR char *buffer, } else if (nbytes >= NAME_MAX) { - ferr("File name segment is too long: %d\n", *path); + ferr("ERROR: File name segment is too long: %d\n", *path); return EFBIG; } else @@ -277,7 +277,7 @@ int nfs_lookup(struct nfsmount *nmp, FAR const char *filename, namelen = strlen(filename); if (namelen > NAME_MAX) { - ferr("Length of the string is too big: %d\n", namelen); + ferr("ERROR: Length of the string is too long: %d\n", namelen); return E2BIG; } @@ -427,7 +427,7 @@ int nfs_findnode(struct nfsmount *nmp, FAR const char *relpath, { /* The filename segment contains is too long. */ - ferr("nfs_pathsegment of \"%s\" failed after \"%s\": %d\n", + ferr("ERROR: nfs_pathsegment of \"%s\" failed after \"%s\": %d\n", relpath, buffer, error); return error; } @@ -437,7 +437,7 @@ int nfs_findnode(struct nfsmount *nmp, FAR const char *relpath, error = nfs_lookup(nmp, buffer, fhandle, obj_attributes, dir_attributes); if (error != OK) { - ferr("nfs_lookup of \"%s\" failed at \"%s\": %d\n", + ferr("ERROR: nfs_lookup of \"%s\" failed at \"%s\": %d\n", relpath, buffer, error); return error; } @@ -521,7 +521,7 @@ int nfs_finddir(struct nfsmount *nmp, FAR const char *relpath, { /* The filename segment contains is too long. */ - ferr("nfs_pathsegment of \"%s\" failed after \"%s\": %d\n", + ferr("ERROR: nfs_pathsegment of \"%s\" failed after \"%s\": %d\n", relpath, filename, error); return error; } @@ -545,7 +545,7 @@ int nfs_finddir(struct nfsmount *nmp, FAR const char *relpath, error = nfs_lookup(nmp, filename, fhandle, attributes, NULL); if (error != OK) { - ferr("nfs_lookup of \"%s\" failed at \"%s\": %d\n", + ferr("ERROR: fs_lookup of \"%s\" failed at \"%s\": %d\n", relpath, filename, error); return error; } diff --git a/fs/nfs/nfs_vfsops.c b/fs/nfs/nfs_vfsops.c index aacc003c50..ecdf3ea265 100644 --- a/fs/nfs/nfs_vfsops.c +++ b/fs/nfs/nfs_vfsops.c @@ -357,7 +357,7 @@ static int nfs_filecreate(FAR struct nfsmount *nmp, struct nfsnode *np, tmp = *ptr; /* handle_follows */ if (!tmp) { - ferr("WARNING: no file attributes\n"); + fwarn"WARNING: no file attributes\n"); } else { @@ -790,7 +790,7 @@ static ssize_t nfs_read(FAR struct file *filep, char *buffer, size_t buflen) error = nfs_checkmount(nmp); if (error != OK) { - ferr("nfs_checkmount failed: %d\n", error); + ferr("ERROR: nfs_checkmount failed: %d\n", error); goto errout_with_semaphore; } @@ -966,7 +966,7 @@ static ssize_t nfs_write(FAR struct file *filep, const char *buffer, error = nfs_checkmount(nmp); if (error != OK) { - ferr("nfs_checkmount failed: %d\n", error); + ferr("ERROR: nfs_checkmount failed: %d\n", error); goto errout_with_semaphore; } @@ -1449,7 +1449,7 @@ static int nfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) error = nfs_lookup(nmp, dir->fd_dir.d_name, &fhandle, &obj_attributes, NULL); if (error != OK) { - ferr("nfs_lookup failed: %d\n", error); + ferr("ERROR: nfs_lookup failed: %d\n", error); goto errout_with_semaphore; } diff --git a/fs/nfs/rpc_clnt.c b/fs/nfs/rpc_clnt.c index af163f034b..fe3a660574 100644 --- a/fs/nfs/rpc_clnt.c +++ b/fs/nfs/rpc_clnt.c @@ -554,7 +554,7 @@ int rpcclnt_connect(struct rpcclnt *rpc) error = psock_connect(rpc->rc_so, saddr, sizeof(*saddr)); if (error) { - ferr("psock_connect NFS port returns %d\n", error); + ferr("ERROR: psock_connect NFS port returns %d\n", error); goto bad; } @@ -766,11 +766,11 @@ int rpcclnt_request(FAR struct rpcclnt *rpc, int procnum, int prog, switch (tmp) { case RPC_MISMATCH: - ferr("RPC_MSGDENIED: RPC_MISMATCH error\n"); + ferr(ERROR: RPC_MSGDENIED: RPC_MISMATCH error\n"); return EOPNOTSUPP; case RPC_AUTHERR: - ferr("RPC_MSGDENIED: RPC_AUTHERR error\n"); + ferr("ERROR: RPC_MSGDENIED: RPC_AUTHERR error\n"); return EACCES; default: @@ -789,12 +789,12 @@ int rpcclnt_request(FAR struct rpcclnt *rpc, int procnum, int prog, } else if (tmp == RPC_PROGMISMATCH) { - ferr("RPC_MSGACCEPTED: RPC_PROGMISMATCH error\n"); + ferr("ERROR: RPC_MSGACCEPTED: RPC_PROGMISMATCH error\n"); return EOPNOTSUPP; } else if (tmp > 5) { - ferr("ERROR: Other RPC type: %d\n", tmp); + ferr("ERROR: Unsupported RPC type: %d\n", tmp); return EOPNOTSUPP; } diff --git a/fs/nxffs/nxffs_blockstats.c b/fs/nxffs/nxffs_blockstats.c index 8ba53dec12..d1c3b8fb8d 100644 --- a/fs/nxffs/nxffs_blockstats.c +++ b/fs/nxffs/nxffs_blockstats.c @@ -147,11 +147,11 @@ int nxffs_blockstats(FAR struct nxffs_volume_s *volume, } } - ferr("Number blocks: %d\n", stats->nblocks); - ferr(" Good blocks: %d\n", stats->ngood); - ferr(" Bad blocks: %d\n", stats->nbad); - ferr(" Unformatted blocks: %d\n", stats->nunformat); - ferr(" Corrupt blocks: %d\n", stats->ncorrupt); + finfo("Number blocks: %d\n", stats->nblocks); + finfo(" Good blocks: %d\n", stats->ngood); + finfo(" Bad blocks: %d\n", stats->nbad); + finfo(" Unformatted blocks: %d\n", stats->nunformat); + finfo(" Corrupt blocks: %d\n", stats->ncorrupt); #else for (ioblock = 0; ioblock < volume->nblocks; ioblock++) @@ -221,12 +221,12 @@ int nxffs_blockstats(FAR struct nxffs_volume_s *volume, } } - ferr("Number blocks: %d\n", stats->nblocks); - ferr(" Good blocks: %d\n", stats->ngood); - ferr(" Bad blocks: %d\n", stats->nbad); - ferr(" Unformatted blocks: %d\n", stats->nunformat); - ferr(" Corrupt blocks: %d\n", stats->ncorrupt); - ferr(" Unreadable blocks: %d\n", stats->nbadread); + finfo("Number blocks: %d\n", stats->nblocks); + finfo(" Good blocks: %d\n", stats->ngood); + finfo(" Bad blocks: %d\n", stats->nbad); + finfo(" Unformatted blocks: %d\n", stats->nunformat); + finfo(" Corrupt blocks: %d\n", stats->ncorrupt); + finfo(" Unreadable blocks: %d\n", stats->nbadread); #endif return OK; diff --git a/fs/nxffs/nxffs_initialize.c b/fs/nxffs/nxffs_initialize.c index 217f0963f9..8b99252bba 100644 --- a/fs/nxffs/nxffs_initialize.c +++ b/fs/nxffs/nxffs_initialize.c @@ -274,7 +274,7 @@ int nxffs_initialize(FAR struct mtd_dev_s *mtd) /* We may need to format the volume. Try that before giving up. */ - ferr("WARNING: Failed to calculate file system limits: %d\n", -ret); + fwarn("WARNING: Failed to calculate file system limits: %d\n", -ret); ret = nxffs_reformat(volume); if (ret < 0) { diff --git a/fs/romfs/fs_romfs.c b/fs/romfs/fs_romfs.c index b90b87101b..92584422e9 100644 --- a/fs/romfs/fs_romfs.c +++ b/fs/romfs/fs_romfs.c @@ -169,7 +169,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath, ret = romfs_checkmount(rm); if (ret != OK) { - ferr("romfs_checkmount failed: %d\n", ret); + ferr("ERROR: romfs_checkmount failed: %d\n", ret); goto errout_with_semaphore; } @@ -179,7 +179,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath, if ((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0) { - ferr("Only O_RDONLY supported\n"); + ferr("ERROR: Only O_RDONLY supported\n"); ret = -EACCES; goto errout_with_semaphore; } @@ -193,7 +193,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath, ret = romfs_finddirentry(rm, &dirinfo, relpath); if (ret < 0) { - ferr("Failed to find directory directory entry for '%s': %d\n", + ferr("ERROR: Failed to find directory directory entry for '%s': %d\n", relpath, ret); goto errout_with_semaphore; } @@ -207,7 +207,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath, /* It is a directory */ ret = -EISDIR; - ferr("'%s' is a directory\n", relpath); + ferr("ERROR: '%s' is a directory\n", relpath); goto errout_with_semaphore; } @@ -222,7 +222,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath, rf = (FAR struct romfs_file_s *)kmm_zalloc(sizeof(struct romfs_file_s)); if (!rf) { - ferr("Failed to allocate private data\n", ret); + ferr("ERROR: Failed to allocate private data\n", ret); ret = -ENOMEM; goto errout_with_semaphore; } @@ -239,7 +239,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath, &rf->rf_startoffset); if (ret < 0) { - ferr("Failed to locate start of file data: %d\n", ret); + ferr("ERROR: Failed to locate start of file data: %d\n", ret); goto errout_with_semaphore; } @@ -248,7 +248,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath, ret = romfs_fileconfigure(rm, rf); if (ret < 0) { - ferr("Failed configure buffering: %d\n", ret); + ferr("ERROR: Failed configure buffering: %d\n", ret); goto errout_with_semaphore; } @@ -359,7 +359,7 @@ static ssize_t romfs_read(FAR struct file *filep, FAR char *buffer, ret = romfs_checkmount(rm); if (ret != OK) { - ferr("romfs_checkmount failed: %d\n", ret); + ferr("ERROR: romfs_checkmount failed: %d\n", ret); goto errout_with_semaphore; } @@ -408,7 +408,7 @@ static ssize_t romfs_read(FAR struct file *filep, FAR char *buffer, ret = romfs_hwread(rm, userbuffer, sector, nsectors); if (ret < 0) { - ferr("romfs_hwread failed: %d\n", ret); + ferr("ERROR: romfs_hwread failed: %d\n", ret); goto errout_with_semaphore; } @@ -426,7 +426,7 @@ static ssize_t romfs_read(FAR struct file *filep, FAR char *buffer, ret = romfs_filecacheread(rm, rf, sector); if (ret < 0) { - ferr("romfs_filecacheread failed: %d\n", ret); + ferr("ERROR: romfs_filecacheread failed: %d\n", ret); goto errout_with_semaphore; } @@ -511,7 +511,7 @@ static off_t romfs_seek(FAR struct file *filep, off_t offset, int whence) break; default: - ferr("Whence is invalid: %d\n", whence); + ferr("ERROR: Whence is invalid: %d\n", whence); return -EINVAL; } @@ -521,7 +521,7 @@ static off_t romfs_seek(FAR struct file *filep, off_t offset, int whence) ret = romfs_checkmount(rm); if (ret != OK) { - ferr("romfs_checkmount failed: %d\n", ret); + ferr("ERROR: romfs_checkmount failed: %d\n", ret); goto errout_with_semaphore; } @@ -582,7 +582,7 @@ static int romfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) return OK; } - ferr("Invalid cmd: %d \n", cmd); + ferr("ERROR: Invalid cmd: %d \n", cmd); return -ENOTTY; } @@ -618,7 +618,7 @@ static int romfs_dup(FAR const struct file *oldp, FAR struct file *newp) ret = romfs_checkmount(rm); if (ret != OK) { - ferr("romfs_checkmount failed: %d\n", ret); + ferr("ERROR: romfs_checkmount failed: %d\n", ret); goto errout_with_semaphore; } @@ -633,7 +633,7 @@ static int romfs_dup(FAR const struct file *oldp, FAR struct file *newp) newrf = (FAR struct romfs_file_s *)kmm_malloc(sizeof(struct romfs_file_s)); if (!newrf) { - ferr("Failed to allocate private data\n", ret); + ferr("ERROR: Failed to allocate private data\n", ret); ret = -ENOMEM; goto errout_with_semaphore; } @@ -649,7 +649,7 @@ static int romfs_dup(FAR const struct file *oldp, FAR struct file *newp) if (ret < 0) { kmm_free(newrf); - ferr("Failed configure buffering: %d\n", ret); + ferr("ERROR: Failed configure buffering: %d\n", ret); goto errout_with_semaphore; } @@ -707,7 +707,7 @@ static int romfs_opendir(FAR struct inode *mountpt, FAR const char *relpath, ret = romfs_checkmount(rm); if (ret != OK) { - ferr("romfs_checkmount failed: %d\n", ret); + ferr("ERROR: romfs_checkmount failed: %d\n", ret); goto errout_with_semaphore; } @@ -716,7 +716,7 @@ static int romfs_opendir(FAR struct inode *mountpt, FAR const char *relpath, ret = romfs_finddirentry(rm, &dirinfo, relpath); if (ret < 0) { - ferr("Failed to find directory '%s': %d\n", relpath, ret); + ferr("ERROR: Failed to find directory '%s': %d\n", relpath, ret); goto errout_with_semaphore; } @@ -726,7 +726,7 @@ static int romfs_opendir(FAR struct inode *mountpt, FAR const char *relpath, { /* The entry is not a directory */ - ferr("'%s' is not a directory: %d\n", relpath); + ferr("ERROR: '%s' is not a directory: %d\n", relpath); ret = -ENOTDIR; goto errout_with_semaphore; } @@ -775,7 +775,7 @@ static int romfs_readdir(FAR struct inode *mountpt, ret = romfs_checkmount(rm); if (ret != OK) { - ferr("romfs_checkmount failed: %d\n", ret); + ferr("ERROR: omfs_checkmount failed: %d\n", ret); goto errout_with_semaphore; } @@ -791,7 +791,7 @@ static int romfs_readdir(FAR struct inode *mountpt, * special error -ENOENT */ - ferr("End of directory\n"); + finfo("End of directory\n"); ret = -ENOENT; goto errout_with_semaphore; } @@ -802,7 +802,7 @@ static int romfs_readdir(FAR struct inode *mountpt, &next, &info, &size); if (ret < 0) { - ferr("romfs_parsedirentry failed: %d\n", ret); + ferr("ERROR: romfs_parsedirentry failed: %d\n", ret); goto errout_with_semaphore; } @@ -811,7 +811,7 @@ static int romfs_readdir(FAR struct inode *mountpt, ret = romfs_parsefilename(rm, dir->u.romfs.fr_curroffset, dir->fd_dir.d_name); if (ret < 0) { - ferr("romfs_parsefilename failed: %d\n", ret); + ferr("ERROR: romfs_parsefilename failed: %d\n", ret); goto errout_with_semaphore; } @@ -897,14 +897,14 @@ static int romfs_bind(FAR struct inode *blkdriver, FAR const void *data, if (!blkdriver || !blkdriver->u.i_bops) { - ferr("No block driver/ops\n"); + ferr("ERROR: No block driver/ops\n"); return -ENODEV; } if (blkdriver->u.i_bops->open && blkdriver->u.i_bops->open(blkdriver) != OK) { - ferr("No open method\n"); + ferr("ERROR: No open method\n"); return -ENODEV; } @@ -913,7 +913,7 @@ static int romfs_bind(FAR struct inode *blkdriver, FAR const void *data, rm = (FAR struct romfs_mountpt_s *)kmm_zalloc(sizeof(struct romfs_mountpt_s)); if (!rm) { - ferr("Failed to allocate mountpoint structure\n"); + ferr("ERROR: Failed to allocate mountpoint structure\n"); return -ENOMEM; } @@ -930,7 +930,7 @@ static int romfs_bind(FAR struct inode *blkdriver, FAR const void *data, ret = romfs_hwconfigure(rm); if (ret < 0) { - ferr("romfs_hwconfigure failed: %d\n", ret); + ferr("ERROR: romfs_hwconfigure failed: %d\n", ret); goto errout_with_sem; } @@ -941,7 +941,7 @@ static int romfs_bind(FAR struct inode *blkdriver, FAR const void *data, ret = romfs_fsconfigure(rm); if (ret < 0) { - ferr("romfs_fsconfigure failed: %d\n", ret); + ferr("ERROR: romfs_fsconfigure failed: %d\n", ret); goto errout_with_buffer; } @@ -993,7 +993,7 @@ static int romfs_unbind(FAR void *handle, FAR struct inode **blkdriver, { /* We cannot unmount now.. there are open files */ - ferr("There are open files\n"); + fwarn("WARNING: There are open files\n"); /* This implementation currently only supports unmounting if there are * no open file references. @@ -1072,7 +1072,7 @@ static int romfs_statfs(FAR struct inode *mountpt, FAR struct statfs *buf) ret = romfs_checkmount(rm); if (ret < 0) { - ferr("romfs_checkmount failed: %d\n", ret); + ferr("ERROR: romfs_checkmount failed: %d\n", ret); goto errout_with_semaphore; } @@ -1130,7 +1130,7 @@ static int romfs_stat(FAR struct inode *mountpt, FAR const char *relpath, ret = romfs_checkmount(rm); if (ret != OK) { - ferr("romfs_checkmount failed: %d\n", ret); + ferr("ERROR: romfs_checkmount failed: %d\n", ret); goto errout_with_semaphore; } diff --git a/fs/romfs/fs_romfsutil.c b/fs/romfs/fs_romfsutil.c index b39f3e866f..50bf56ddc2 100644 --- a/fs/romfs/fs_romfsutil.c +++ b/fs/romfs/fs_romfsutil.c @@ -467,7 +467,7 @@ int romfs_filecacheread(struct romfs_mountpt_s *rm, struct romfs_file_s *rf, ret = romfs_hwread(rm, rf->rf_buffer, sector, 1); if (ret < 0) { - ferr("romfs_hwread failed: %d\n", ret); + ferr("ERROR: romfs_hwread failed: %d\n", ret); return ret; } } diff --git a/fs/smartfs/smartfs_smart.c b/fs/smartfs/smartfs_smart.c index eeae9d6ccf..c276eeff30 100644 --- a/fs/smartfs/smartfs_smart.c +++ b/fs/smartfs/smartfs_smart.c @@ -505,7 +505,8 @@ static ssize_t smartfs_read(FAR struct file *filep, char *buffer, size_t buflen) ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error %d reading sector %d data\n", ret, sf->currsector); + ferr("ERROR: Error %d reading sector %d data\n", + ret, sf->currsector); goto errout_with_semaphore; } @@ -614,7 +615,8 @@ static int smartfs_sync_internal(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error %d writing used bytes for sector %d\n", ret, sf->currsector); + ferr("ERROR: Error %d writing used bytes for sector %d\n", + ret, sf->currsector); goto errout; } @@ -639,7 +641,8 @@ static int smartfs_sync_internal(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error %d reading sector %d data\n", ret, sf->currsector); + ferr("ERROR: Error %d reading sector %d data\n", + ret, sf->currsector); goto errout; } @@ -661,7 +664,8 @@ static int smartfs_sync_internal(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error %d writing used bytes for sector %d\n", ret, sf->currsector); + ferr("ERROR: Error %d writing used bytes for sector %d\n", + ret, sf->currsector); goto errout; } @@ -766,7 +770,8 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error %d writing sector %d data\n", ret, sf->currsector); + ferr("ERROR: Error %d writing sector %d data\n", + et, sf->currsector); goto errout_with_semaphore; } @@ -793,7 +798,8 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error %d reading sector %d header\n", ret, sf->currsector); + ferr("ERROR: Error %d reading sector %d header\n", + ret, sf->currsector); goto errout_with_semaphore; } @@ -841,7 +847,8 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error %d writing sector %d data\n", ret, sf->currsector); + ferr("ERROR: Error %d writing sector %d data\n", + ret, sf->currsector); goto errout_with_semaphore; } } @@ -867,7 +874,7 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, ret = FS_IOCTL(fs, BIOC_ALLOCSECT, 0xFFFF); if (ret < 0) { - ferr("Error %d allocating new sector\n", ret); + ferr("ERROR: Error %d allocating new sector\n", ret); goto errout_with_semaphore; } @@ -892,7 +899,7 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, { /* Error allocating logical sector! */ - ferr("Error - duplicate logical sector %d\n", sf->currsector); + ferr("ERROR: Duplicate logical sector %d\n", sf->currsector); } sf->bflags = SMARTFS_BFLAG_DIRTY; @@ -922,7 +929,7 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, ret = FS_IOCTL(fs, BIOC_ALLOCSECT, 0xFFFF); if (ret < 0) { - ferr("Error %d allocating new sector\n", ret); + ferr("ERROR: Error %d allocating new sector\n", ret); goto errout_with_semaphore; } @@ -937,7 +944,7 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error %d writing next sector\n", ret); + ferr("ERROR: Error %d writing next sector\n", ret); goto errout_with_semaphore; } @@ -949,7 +956,7 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, { /* Error allocating logical sector! */ - ferr("Error - duplicate logical sector %d\n", sf->currsector); + ferr("ERROR: Duplicate logical sector %d\n", sf->currsector); } sf->currsector = SMARTFS_NEXTSECTOR(header); @@ -1078,7 +1085,8 @@ static off_t smartfs_seek_internal(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error %d reading sector %d header\n", ret, sf->currsector); + ferr("ERROR: Error %d reading sector %d header\n", + ret, sf->currsector); goto errout; } @@ -1103,7 +1111,8 @@ static off_t smartfs_seek_internal(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error %d reading sector %d header\n", ret, sf->currsector); + ferr("ERROR: Error %d reading sector %d header\n", + ret, sf->currsector); goto errout; } } @@ -1933,7 +1942,8 @@ int smartfs_rename(struct inode *mountpt, const char *oldrelpath, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error %d reading sector %d data\n", ret, oldentry.dsector); + ferr("ERROR: Error %d reading sector %d data\n", + ret, oldentry.dsector); goto errout_with_semaphore; } @@ -2005,7 +2015,8 @@ int smartfs_rename(struct inode *mountpt, const char *oldrelpath, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error %d reading sector %d data\n", ret, oldentry.dsector); + ferr("ERROR: Error %d reading sector %d data\n", + ret, oldentry.dsector); goto errout_with_semaphore; } @@ -2024,7 +2035,8 @@ int smartfs_rename(struct inode *mountpt, const char *oldrelpath, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error %d writing flag bytes for sector %d\n", ret, readwrite.logsector); + ferr("ERROR: Error %d writing flag bytes for sector %d\n", + ret, readwrite.logsector); goto errout_with_semaphore; } } diff --git a/fs/smartfs/smartfs_utils.c b/fs/smartfs/smartfs_utils.c index 6c8373e79f..44efc60c26 100644 --- a/fs/smartfs/smartfs_utils.c +++ b/fs/smartfs/smartfs_utils.c @@ -231,7 +231,7 @@ int smartfs_mount(struct smartfs_mountpt_s *fs, bool writeable) ret = FS_IOCTL(fs, BIOC_GETFORMAT, (unsigned long) &fs->fs_llformat); if (ret != OK) { - ferr("Error getting device low level format: %d\n", ret); + ferr("ERROR: Error getting device low level format: %d\n", ret); goto errout; } @@ -239,7 +239,7 @@ int smartfs_mount(struct smartfs_mountpt_s *fs, bool writeable) if (!(fs->fs_llformat.flags & SMART_FMT_ISFORMATTED)) { - ferr("No low-level format found\n"); + ferr("ERROR: No low-level format found\n"); ret = -ENODEV; goto errout; } @@ -311,16 +311,16 @@ int smartfs_mount(struct smartfs_mountpt_s *fs, bool writeable) fs->fs_mounted = TRUE; - ferr("SMARTFS:\n"); - ferr("\t Sector size: %d\n", fs->fs_llformat.sectorsize); - ferr("\t Bytes/sector %d\n", fs->fs_llformat.availbytes); - ferr("\t Num sectors: %d\n", fs->fs_llformat.nsectors); - ferr("\t Free sectors: %d\n", fs->fs_llformat.nfreesectors); - ferr("\t Max filename: %d\n", CONFIG_SMARTFS_MAXNAMLEN); + finfo("SMARTFS:\n"); + finfo("\t Sector size: %d\n", fs->fs_llformat.sectorsize); + finfo("\t Bytes/sector %d\n", fs->fs_llformat.availbytes); + finfo("\t Num sectors: %d\n", fs->fs_llformat.nsectors); + finfo("\t Free sectors: %d\n", fs->fs_llformat.nfreesectors); + finfo("\t Max filename: %d\n", CONFIG_SMARTFS_MAXNAMLEN); #ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS - ferr("\t RootDirEntries: %d\n", fs->fs_llformat.nrootdirentries); + finfo("\t RootDirEntries: %d\n", fs->fs_llformat.nrootdirentries); #endif - ferr("\t RootDirSector: %d\n", fs->fs_rootsector); + finfo("\t RootDirSector: %d\n", fs->fs_rootsector); errout: return ret; @@ -695,10 +695,12 @@ int smartfs_finddirentry(struct smartfs_mountpt_s *fs, /* Read the next sector of the file */ readwrite.logsector = dirsector; - ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); + ret = FS_IOCTL(fs, BIOC_READSECT, + (unsigned long) &readwrite); if (ret < 0) { - ferr("Error in sector chain at %d!\n", dirsector); + ferr("ERROR: Error in sector chain at %d!\n", + dirsector); break; } @@ -937,7 +939,7 @@ int smartfs_createentry(FAR struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error chaining sector %d\n", nextsector); + ferr("ERROR: Error chaining sector %d\n", nextsector); goto errout; } } @@ -1014,7 +1016,7 @@ int smartfs_createentry(FAR struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error %d setting new sector type for sector %d\n", + ferr("ERROR: Error %d setting new sector type for sector %d\n", ret, nextsector); goto errout; } @@ -1129,7 +1131,7 @@ int smartfs_deleteentry(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error reading sector %d\n", nextsector); + ferr("ERROR: Error reading sector %d\n", nextsector); break; } @@ -1148,7 +1150,8 @@ int smartfs_deleteentry(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error reading directory info at sector %d\n", entry->dsector); + ferr("ERROR: Error reading directory info at sector %d\n", + entry->dsector); goto errout; } @@ -1177,7 +1180,8 @@ int smartfs_deleteentry(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error marking entry inactive at sector %d\n", entry->dsector); + ferr("ERROR: Error marking entry inactive at sector %d\n", + entry->dsector); goto errout; } @@ -1242,7 +1246,7 @@ int smartfs_deleteentry(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error reading sector %d\n", nextsector); + ferr("ERROR: Error reading sector %d\n", nextsector); break; } @@ -1259,7 +1263,7 @@ int smartfs_deleteentry(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error unchaining sector (%d)\n", nextsector); + ferr("ERROR: Error unchaining sector (%d)\n", nextsector); goto errout; } @@ -1268,7 +1272,7 @@ int smartfs_deleteentry(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_FREESECT, (unsigned long) entry->dsector); if (ret < 0) { - ferr("Error freeing sector %d\n", entry->dsector); + ferr("ERROR: Error freeing sector %d\n", entry->dsector); goto errout; } @@ -1327,7 +1331,7 @@ int smartfs_countdirentries(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error reading sector %d\n", nextsector); + ferr("ERROR: Error reading sector %d\n", nextsector); break; } @@ -1336,7 +1340,7 @@ int smartfs_countdirentries(struct smartfs_mountpt_s *fs, header = (struct smartfs_chain_header_s *) fs->fs_rwbuffer; if (header->type != SMARTFS_SECTOR_TYPE_DIR) { - ferr("Sector %d is not a DIR sector!\n", nextsector); + ferr("ERROR: Sector %d is not a DIR sector!\n", nextsector); goto errout; } @@ -1411,7 +1415,7 @@ int smartfs_truncatefile(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error reading sector %d header\n", nextsector); + ferr("ERROR: Error reading sector %d header\n", nextsector); goto errout; } @@ -1447,7 +1451,7 @@ int smartfs_truncatefile(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - ferr("Error blanking 1st sector (%d) of file\n", nextsector); + ferr("ERROR: Error blanking 1st sector (%d) of file\n", nextsector); goto errout; } @@ -1463,7 +1467,7 @@ int smartfs_truncatefile(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_FREESECT, (unsigned long) nextsector); if (ret < 0) { - ferr("Error freeing sector %d\n", nextsector); + ferr("ERROR: Error freeing sector %d\n", nextsector); goto errout; } } diff --git a/fs/tmpfs/fs_tmpfs.c b/fs/tmpfs/fs_tmpfs.c index a44ddb11ff..ee56d7189b 100644 --- a/fs/tmpfs/fs_tmpfs.c +++ b/fs/tmpfs/fs_tmpfs.c @@ -1727,7 +1727,7 @@ static int tmpfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) return OK; } - ferr("Invalid cmd: %d\n", cmd); + ferr("ERROR: Invalid cmd: %d\n", cmd); return -ENOTTY; } diff --git a/fs/vfs/fs_epoll.c b/fs/vfs/fs_epoll.c index bc0502e111..47500d01f3 100644 --- a/fs/vfs/fs_epoll.c +++ b/fs/vfs/fs_epoll.c @@ -190,12 +190,12 @@ int epoll_wait(int epfd, FAR struct epoll_event *evs, int maxevents, { if (rc < 0) { - ferr("%08x poll fail: %d for %d, %d msecs\n", + ferr("ERROR: %08x poll fail: %d for %d, %d msecs\n", epfd, rc, eph->occupied, timeout); for (i = 0; i < eph->occupied; i++) { - ferr("%02d: fd=%d\n", i, eph->evs[i].data.fd); + ferr(" %02d: fd=%d\n", i, eph->evs[i].data.fd); } }