mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
fs/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition.
This commit is contained in:
+3
-3
@@ -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
|
||||
}
|
||||
|
||||
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
+4
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user