fs: nxffs: nxstyle error fix
Fix nxstyle errors to pass CI Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
parent
789d3751ad
commit
a544c3f499
@ -89,8 +89,9 @@ int closedir(FAR DIR *dirp)
|
||||
goto errout;
|
||||
}
|
||||
|
||||
/* A special case is when we enumerate an "empty", unused inode. That is
|
||||
* an inode in the pseudo-filesystem that has no operations and no children.
|
||||
/* A special case is when we enumerate an "empty", unused inode.
|
||||
* That is an inode in the pseudo-filesystem that has no operations
|
||||
* and no children.
|
||||
* This is a "dangling" directory entry that has lost its childre.
|
||||
*/
|
||||
|
||||
|
@ -56,7 +56,8 @@
|
||||
* Call the close method and release the inode
|
||||
*
|
||||
* Input Parameters:
|
||||
* inode - reference to the inode of a block driver opened by open_blockdriver
|
||||
* inode - reference to the inode of a block driver opened by
|
||||
* open_blockdriver
|
||||
*
|
||||
* Returned Value:
|
||||
* Returns zero on success or a negated errno on failure:
|
||||
|
@ -128,8 +128,8 @@ void rammap_initialize(void);
|
||||
* offset The offset into the file to map
|
||||
*
|
||||
* Returned Value:
|
||||
* On success, rammmap() returns a pointer to the mapped area. On error, the
|
||||
* value MAP_FAILED is returned, and errno is set appropriately.
|
||||
* On success, rammmap() returns a pointer to the mapped area. On error,
|
||||
* the value MAP_FAILED is returned, and errno is set appropriately.
|
||||
*
|
||||
* EBADF
|
||||
* 'fd' is not a valid file descriptor.
|
||||
|
@ -147,8 +147,8 @@ static inline ssize_t nxffs_analyzeinode(FAR struct nxffs_blkinfo_s *blkinfo,
|
||||
|
||||
if (doffs < blkinfo->offset + offset + SIZEOF_NXFFS_BLOCK_HDR)
|
||||
{
|
||||
/* The first data block begins before the inode header. This can't can't
|
||||
* be a real inode header (or it is a corrupted one).
|
||||
/* The first data block begins before the inode header. This can't
|
||||
* can't be a real inode header (or it is a corrupted one).
|
||||
*/
|
||||
|
||||
return ERROR;
|
||||
@ -197,7 +197,8 @@ static inline ssize_t nxffs_analyzeinode(FAR struct nxffs_blkinfo_s *blkinfo,
|
||||
nxffs_wrle32(inode.crc, 0);
|
||||
|
||||
crc = crc32((FAR const uint8_t *)&inode, SIZEOF_NXFFS_INODE_HDR);
|
||||
crc = crc32part(&blkinfo->buffer[noffs - blkinfo->offset], inode.namlen, crc);
|
||||
crc = crc32part(&blkinfo->buffer[noffs - blkinfo->offset],
|
||||
inode.namlen, crc);
|
||||
|
||||
if (crc != ecrc)
|
||||
{
|
||||
@ -273,7 +274,8 @@ static inline ssize_t nxffs_analyzedata(FAR struct nxffs_blkinfo_s *blkinfo,
|
||||
nxffs_wrle32(dathdr.crc, 0);
|
||||
|
||||
crc = crc32((FAR const uint8_t *)&dathdr, SIZEOF_NXFFS_DATA_HDR);
|
||||
crc = crc32part(&blkinfo->buffer[offset + SIZEOF_NXFFS_DATA_HDR], datlen, crc);
|
||||
crc = crc32part(&blkinfo->buffer[offset + SIZEOF_NXFFS_DATA_HDR],
|
||||
datlen, crc);
|
||||
|
||||
if (crc != ecrc)
|
||||
{
|
||||
@ -329,7 +331,12 @@ static inline void nxffs_analyze(FAR struct nxffs_blkinfo_s *blkinfo)
|
||||
{
|
||||
if (blkinfo->verbose)
|
||||
{
|
||||
syslog(LOG_NOTICE, g_format, blkinfo->block, 0, "BLOCK", "ERASED ",
|
||||
syslog(LOG_NOTICE,
|
||||
g_format,
|
||||
blkinfo->block,
|
||||
0,
|
||||
"BLOCK",
|
||||
"ERASED ",
|
||||
blkinfo->geo.blocksize);
|
||||
}
|
||||
|
||||
@ -409,8 +416,9 @@ static inline void nxffs_analyze(FAR struct nxffs_blkinfo_s *blkinfo)
|
||||
* Name: nxffs_dump
|
||||
*
|
||||
* Description:
|
||||
* Dump a summary of the contents of an NXFFS file system. CONFIG_DEBUG_FEATURES
|
||||
* and CONFIG_DEBUG_FS must be enabled for this function to do anything.
|
||||
* Dump a summary of the contents of an NXFFS file system.
|
||||
* CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_FS must be enabled
|
||||
* for this function to do anything.
|
||||
*
|
||||
* Input Parameters:
|
||||
* mtd - The MTD device that provides the interface to NXFFS-formatted
|
||||
@ -435,7 +443,9 @@ int nxffs_dump(FAR struct mtd_dev_s *mtd, bool verbose)
|
||||
*/
|
||||
|
||||
memset(&blkinfo, 0, sizeof(struct nxffs_blkinfo_s));
|
||||
ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&blkinfo.geo));
|
||||
ret = MTD_IOCTL(mtd,
|
||||
MTDIOC_GEOMETRY,
|
||||
(unsigned long)((uintptr_t)&blkinfo.geo));
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", -ret);
|
||||
|
@ -107,7 +107,9 @@ ssize_t file_read(FAR struct file *filep, FAR void *buf, size_t nbytes)
|
||||
* signature and position in the operations vtable.
|
||||
*/
|
||||
|
||||
ret = (int)inode->u.i_ops->read(filep, (FAR char *)buf, (size_t)nbytes);
|
||||
ret = (int)inode->u.i_ops->read(filep,
|
||||
(FAR char *)buf,
|
||||
(size_t)nbytes);
|
||||
}
|
||||
|
||||
/* Return the number of bytes read (or possibly an error code) */
|
||||
|
Loading…
Reference in New Issue
Block a user