fs: Move inotify.c from fs/notify/ to fs/vfs/
and merge fs/notify/notify.h into fs/vfs/vfs.h Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
1ea0ae8073
commit
c9dc89142c
44 changed files with 79 additions and 200 deletions
|
|
@ -135,7 +135,6 @@ source "fs/mqueue/Kconfig"
|
||||||
source "fs/shm/Kconfig"
|
source "fs/shm/Kconfig"
|
||||||
source "fs/mmap/Kconfig"
|
source "fs/mmap/Kconfig"
|
||||||
source "fs/partition/Kconfig"
|
source "fs/partition/Kconfig"
|
||||||
source "fs/notify/Kconfig"
|
|
||||||
source "fs/fat/Kconfig"
|
source "fs/fat/Kconfig"
|
||||||
source "fs/nfs/Kconfig"
|
source "fs/nfs/Kconfig"
|
||||||
source "fs/nxffs/Kconfig"
|
source "fs/nxffs/Kconfig"
|
||||||
|
|
|
||||||
21
fs/Make.defs
21
fs/Make.defs
|
|
@ -1,21 +0,0 @@
|
||||||
# ##############################################################################
|
|
||||||
# fs/Make.defs
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
|
||||||
# license agreements. See the NOTICE file distributed with this work for
|
|
||||||
# additional information regarding copyright ownership. The ASF licenses this
|
|
||||||
# file to you under the Apache License, Version 2.0 (the "License"); you may not
|
|
||||||
# use this file except in compliance with the License. You may obtain a copy of
|
|
||||||
# the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations under
|
|
||||||
# the License.
|
|
||||||
#
|
|
||||||
# ##############################################################################
|
|
||||||
|
|
@ -66,7 +66,6 @@ include rpmsgfs/Make.defs
|
||||||
include zipfs/Make.defs
|
include zipfs/Make.defs
|
||||||
include mnemofs/Make.defs
|
include mnemofs/Make.defs
|
||||||
include v9fs/Make.defs
|
include v9fs/Make.defs
|
||||||
include notify/Make.defs
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)fs
|
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)fs
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
|
|
||||||
#ifndef CONFIG_DISABLE_MOUNTPOINT
|
#ifndef CONFIG_DISABLE_MOUNTPOINT
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
#include <nuttx/sched_note.h>
|
#include <nuttx/sched_note.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
#include <nuttx/mtd/mtd.h>
|
#include <nuttx/mtd/mtd.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
|
|
||||||
#if defined(CONFIG_MTD) && !defined(CONFIG_DISABLE_MOUNTPOINT)
|
#if defined(CONFIG_MTD) && !defined(CONFIG_DISABLE_MOUNTPOINT)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
|
|
||||||
#ifdef CONFIG_PIPES
|
#ifdef CONFIG_PIPES
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
#include <nuttx/mtd/mtd.h>
|
#include <nuttx/mtd/mtd.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
|
|
||||||
#ifdef CONFIG_PIPES
|
#ifdef CONFIG_PIPES
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
#include "event/event.h"
|
#include "event/event.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@
|
||||||
#include <nuttx/reboot_notifier.h>
|
#include <nuttx/reboot_notifier.h>
|
||||||
#include <nuttx/trace.h>
|
#include <nuttx/trace.h>
|
||||||
|
|
||||||
#include "notify/notify.h"
|
|
||||||
#include "rpmsgfs/rpmsgfs.h"
|
#include "rpmsgfs/rpmsgfs.h"
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "aio/aio.h"
|
#include "aio/aio.h"
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
#include "driver/driver.h"
|
#include "driver/driver.h"
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "mqueue/mqueue.h"
|
#include "mqueue/mqueue.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions Prototypes
|
* Private Functions Prototypes
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "mqueue/mqueue.h"
|
#include "mqueue/mqueue.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
|
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
# ##############################################################################
|
|
||||||
# fs/notify/CMakeLists.txt
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
|
||||||
# license agreements. See the NOTICE file distributed with this work for
|
|
||||||
# additional information regarding copyright ownership. The ASF licenses this
|
|
||||||
# file to you under the Apache License, Version 2.0 (the "License"); you may not
|
|
||||||
# use this file except in compliance with the License. You may obtain a copy of
|
|
||||||
# the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations under
|
|
||||||
# the License.
|
|
||||||
#
|
|
||||||
# ##############################################################################
|
|
||||||
|
|
||||||
if(CONFIG_FS_NOTIFY)
|
|
||||||
target_sources(fs PRIVATE inotify.c)
|
|
||||||
endif()
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
#
|
|
||||||
# For a description of the syntax of this configuration file,
|
|
||||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
||||||
#
|
|
||||||
|
|
||||||
config FS_NOTIFY
|
|
||||||
bool "FS Notify System"
|
|
||||||
default n
|
|
||||||
---help---
|
|
||||||
The Fsnotify System
|
|
||||||
|
|
||||||
if FS_NOTIFY
|
|
||||||
config FS_NOTIFY_BUCKET_SIZE
|
|
||||||
int "Dir hash bucket size"
|
|
||||||
default 64
|
|
||||||
|
|
||||||
config FS_NOTIFY_MAX_EVENTS
|
|
||||||
int "Max events in one notify device"
|
|
||||||
default 1024
|
|
||||||
|
|
||||||
config FS_NOTIFY_FD_POLLWAITERS
|
|
||||||
int "Max pollwaiters in one notify device"
|
|
||||||
default 2
|
|
||||||
|
|
||||||
endif # FS_NOTIFY
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
############################################################################
|
|
||||||
# fs/notify/Make.defs
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
# contributor license agreements. See the NOTICE file distributed with
|
|
||||||
# this work for additional information regarding copyright ownership. The
|
|
||||||
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
||||||
# "License"); you may not use this file except in compliance with the
|
|
||||||
# License. You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
# Include FSNOTIFY build support
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_FS_NOTIFY),y)
|
|
||||||
CSRCS += inotify.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
DEPPATH += --dep-path notify
|
|
||||||
VPATH += :notify
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
* fs/notify/notify.h
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
* contributor license agreements. See the NOTICE file distributed with
|
|
||||||
* this work for additional information regarding copyright ownership. The
|
|
||||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the
|
|
||||||
* License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef __FS_NOTIFY_NOTIFY_H
|
|
||||||
#define __FS_NOTIFY_NOTIFY_H
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Included Files
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include <nuttx/fs/fs.h>
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Public Type Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Public Function Prototypes
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/* These are internal OS interface and are not available to applications */
|
|
||||||
|
|
||||||
void notify_open(FAR const char *path, int oflags);
|
|
||||||
void notify_close(FAR const char *path, int oflags);
|
|
||||||
void notify_close2(FAR struct inode *inode);
|
|
||||||
void notify_read(FAR struct file *filep);
|
|
||||||
void notify_write(FAR struct file *filep);
|
|
||||||
void notify_chstat(FAR struct file *filep);
|
|
||||||
void notify_unlink(FAR const char *path);
|
|
||||||
void notify_unmount(FAR const char *path);
|
|
||||||
void notify_mkdir(FAR const char *path);
|
|
||||||
void notify_create(FAR const char *path);
|
|
||||||
void notify_rename(FAR const char *oldpath, bool oldisdir,
|
|
||||||
FAR const char *newpath, bool newisdir);
|
|
||||||
void notify_initialize(void);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
|
|
||||||
#ifdef CONFIG_FS_NAMED_SEMAPHORES
|
#ifdef CONFIG_FS_NAMED_SEMAPHORES
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
#include "semaphore/semaphore.h"
|
#include "semaphore/semaphore.h"
|
||||||
|
|
||||||
#ifdef CONFIG_FS_NAMED_SEMAPHORES
|
#ifdef CONFIG_FS_NAMED_SEMAPHORES
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
#include <nuttx/semaphore.h>
|
#include <nuttx/semaphore.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
#include "semaphore/semaphore.h"
|
#include "semaphore/semaphore.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
#include "shm/shmfs.h"
|
#include "shm/shmfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs/vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
|
|
|
||||||
|
|
@ -53,14 +53,18 @@ set(SRCS
|
||||||
fs_syncfs.c
|
fs_syncfs.c
|
||||||
fs_truncate.c)
|
fs_truncate.c)
|
||||||
|
|
||||||
|
# File notify support
|
||||||
|
|
||||||
|
if(CONFIG_FS_NOTIFY)
|
||||||
|
list(APPEND SRCS fs_inotify.c)
|
||||||
|
endif()
|
||||||
|
|
||||||
# File lock support
|
# File lock support
|
||||||
|
|
||||||
if(NOT "${CONFIG_FS_LOCK_BUCKET_SIZE}" STREQUAL "0")
|
if(NOT "${CONFIG_FS_LOCK_BUCKET_SIZE}" STREQUAL "0")
|
||||||
list(APPEND SRCS fs_lock.c)
|
list(APPEND SRCS fs_lock.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Certain interfaces are not available if there is no mountpoint support
|
|
||||||
|
|
||||||
if(NOT "${CONFIG_PSEUDOFS_SOFTLINKS}" STREQUAL "0")
|
if(NOT "${CONFIG_PSEUDOFS_SOFTLINKS}" STREQUAL "0")
|
||||||
list(APPEND SRCS fs_link.c fs_symlink.c fs_readlink.c)
|
list(APPEND SRCS fs_link.c fs_symlink.c fs_readlink.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,27 @@ config SIGNAL_FD_NPOLLWAITERS
|
||||||
|
|
||||||
endif # SIGNAL_FD
|
endif # SIGNAL_FD
|
||||||
|
|
||||||
|
config FS_NOTIFY
|
||||||
|
bool "FS Notify System"
|
||||||
|
default n
|
||||||
|
---help---
|
||||||
|
The Fsnotify System
|
||||||
|
|
||||||
|
if FS_NOTIFY
|
||||||
|
config FS_NOTIFY_BUCKET_SIZE
|
||||||
|
int "Dir hash bucket size"
|
||||||
|
default 64
|
||||||
|
|
||||||
|
config FS_NOTIFY_MAX_EVENTS
|
||||||
|
int "Max events in one notify device"
|
||||||
|
default 1024
|
||||||
|
|
||||||
|
config FS_NOTIFY_FD_POLLWAITERS
|
||||||
|
int "Max pollwaiters in one notify device"
|
||||||
|
default 2
|
||||||
|
|
||||||
|
endif # FS_NOTIFY
|
||||||
|
|
||||||
config FS_BACKTRACE
|
config FS_BACKTRACE
|
||||||
int "VFS backtrace"
|
int "VFS backtrace"
|
||||||
default 0
|
default 0
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,9 @@ CSRCS += fs_rename.c fs_rmdir.c fs_select.c fs_sendfile.c fs_stat.c
|
||||||
CSRCS += fs_statfs.c fs_uio.c fs_unlink.c fs_write.c fs_dir.c fs_fsync.c
|
CSRCS += fs_statfs.c fs_uio.c fs_unlink.c fs_write.c fs_dir.c fs_fsync.c
|
||||||
CSRCS += fs_syncfs.c fs_truncate.c
|
CSRCS += fs_syncfs.c fs_truncate.c
|
||||||
|
|
||||||
# Certain interfaces are not available if there is no mountpoint support
|
ifeq ($(CONFIG_FS_NOTIFY),y)
|
||||||
|
CSRCS += fs_inotify.c
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_FS_LOCK_BUCKET_SIZE),0)
|
ifneq ($(CONFIG_FS_LOCK_BUCKET_SIZE),0)
|
||||||
CSRCS += fs_lock.c
|
CSRCS += fs_lock.c
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@
|
||||||
# include <android/fdsan.h>
|
# include <android/fdsan.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "notify/notify.h"
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "sched/sched.h"
|
#include "sched/sched.h"
|
||||||
#include "vfs.h"
|
#include "vfs.h"
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,8 @@
|
||||||
|
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
#include "notify/notify.h"
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
|
#include "vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* fs/notify/inotify.c
|
* fs/vfs/fs_inotify.c
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
@ -34,8 +34,8 @@
|
||||||
|
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
#include "notify/notify.h"
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
|
#include "vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
#include "sched/sched.h"
|
#include "sched/sched.h"
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "driver/driver.h"
|
#include "driver/driver.h"
|
||||||
#include "notify/notify.h"
|
#include "vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,8 @@
|
||||||
#include <nuttx/lib/math32.h>
|
#include <nuttx/lib/math32.h>
|
||||||
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "notify/notify.h"
|
|
||||||
#include "fs_heap.h"
|
#include "fs_heap.h"
|
||||||
|
#include "vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,8 @@
|
||||||
|
|
||||||
#include <nuttx/cancelpt.h>
|
#include <nuttx/cancelpt.h>
|
||||||
|
|
||||||
#include "notify/notify.h"
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
|
#include "vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,9 @@
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
#include <nuttx/lib/lib.h>
|
#include <nuttx/lib/lib.h>
|
||||||
|
|
||||||
#include "notify/notify.h"
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "fs_heap.h"
|
#include "fs_heap.h"
|
||||||
|
#include "vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,8 @@
|
||||||
|
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
#include "notify/notify.h"
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
|
#include "vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,9 @@
|
||||||
#include <nuttx/lib/lib.h>
|
#include <nuttx/lib/lib.h>
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
#include "notify/notify.h"
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "fs_heap.h"
|
#include "fs_heap.h"
|
||||||
|
#include "vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,8 @@
|
||||||
|
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
#include "notify/notify.h"
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
|
#include "vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,8 @@
|
||||||
|
|
||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
#include "notify/notify.h"
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
|
#include "vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,8 @@
|
||||||
|
|
||||||
#include <nuttx/cancelpt.h>
|
#include <nuttx/cancelpt.h>
|
||||||
|
|
||||||
#include "notify/notify.h"
|
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
|
#include "vfs.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
|
|
|
||||||
18
fs/vfs/vfs.h
18
fs/vfs/vfs.h
|
|
@ -27,6 +27,7 @@
|
||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/fs/fs.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|
@ -105,4 +106,21 @@ int file_setlk(FAR struct file *filep, FAR struct flock *flock,
|
||||||
bool nonblock);
|
bool nonblock);
|
||||||
|
|
||||||
#endif /* CONFIG_FS_LOCK_BUCKET_SIZE */
|
#endif /* CONFIG_FS_LOCK_BUCKET_SIZE */
|
||||||
|
|
||||||
|
#ifdef CONFIG_FS_NOTIFY
|
||||||
|
void notify_open(FAR const char *path, int oflags);
|
||||||
|
void notify_close(FAR const char *path, int oflags);
|
||||||
|
void notify_close2(FAR struct inode *inode);
|
||||||
|
void notify_read(FAR struct file *filep);
|
||||||
|
void notify_write(FAR struct file *filep);
|
||||||
|
void notify_chstat(FAR struct file *filep);
|
||||||
|
void notify_unlink(FAR const char *path);
|
||||||
|
void notify_unmount(FAR const char *path);
|
||||||
|
void notify_mkdir(FAR const char *path);
|
||||||
|
void notify_create(FAR const char *path);
|
||||||
|
void notify_rename(FAR const char *oldpath, bool oldisdir,
|
||||||
|
FAR const char *newpath, bool newisdir);
|
||||||
|
void notify_initialize(void);
|
||||||
|
#endif /* CONFIG_FS_NOTIFY */
|
||||||
|
|
||||||
#endif /* __FS_VFS_VFS_H */
|
#endif /* __FS_VFS_VFS_H */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue