mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 08:38:38 +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:
parent
c1c5d8d611
commit
939c10ea34
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue