mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 22:01:17 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user