fs_truncate: provide inotify call for truncate

IN_MODIFY event should occur on file modification, which includes
truncate. This is consistent with the inotify usage on Linux.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This commit is contained in:
Michal Lenc 2024-10-07 10:49:01 +02:00 committed by Xiang Xiao
parent c1c5d8d611
commit 939c10ea34

View file

@ -32,6 +32,7 @@
#include <nuttx/fs/fs.h>
#include "notify/notify.h"
#include "inode/inode.h"
/****************************************************************************
@ -180,6 +181,9 @@ int ftruncate(int fd, off_t length)
fs_putfilep(filep);
if (ret >= 0)
{
#ifdef CONFIG_FS_NOTIFY
notify_write(filep);
#endif
return 0;
}