This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 6304510c68a08b3b1432aacf1642a70b7bae1667 Author: Marco Casaroli <[email protected]> AuthorDate: Wed Nov 11 06:04:47 2026 +0100 fs/inode: Start the serial numbers of the pseudo file system at 1. The root node of the pseudo file system is the first node, and it got the serial number 0: stat("/") gave st_ino 0. Some programs take a serial number 0 as "no number". Give the first node the number 1. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- fs/inode/fs_inodereserve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/inode/fs_inodereserve.c b/fs/inode/fs_inodereserve.c index 9b1a1e73ab0..2824b81e767 100644 --- a/fs/inode/fs_inodereserve.c +++ b/fs/inode/fs_inodereserve.c @@ -92,7 +92,7 @@ static FAR struct inode *inode_alloc(FAR const char *name, mode_t mode) inode = fs_heap_zalloc(FSNODE_SIZE(namelen)); if (inode) { - inode->i_ino = g_ino++; + inode->i_ino = ++g_ino; atomic_set(&inode->i_crefs, 1); #ifdef CONFIG_PSEUDOFS_ATTRIBUTES inode->i_mode = mode;
