Home
last modified time | relevance | path

Searched refs:vnode (Results 1 - 25 of 33) sorted by relevance

12

/third_party/NuttX/fs/vfs/
H A Dfs_rmdir.c30 #include "vnode.h"
39 static int check_target(struct Vnode *vnode, char *name) in check_target() argument
41 if (vnode == NULL) in check_target()
46 if ((vnode->originMount) && (vnode->originMount->mountFlags & MS_RDONLY)) in check_target()
51 if (vnode->type != VNODE_TYPE_DIR) in check_target()
56 if (vnode->useCount > 0) in check_target()
61 if ((vnode->flag & VNODE_FLAG_MOUNT_ORIGIN) in check_target()
62 || (vnode->flag & VNODE_FLAG_MOUNT_NEW)) in check_target()
73 if (ret == OK && (cwdnode == vnode)) in check_target()
93 struct Vnode *vnode = NULL; do_rmdir() local
[all...]
H A Dfs_unlink.c31 #include "vnode.h"
38 static int check_target(struct Vnode *vnode) in check_target() argument
40 if (vnode->type == VNODE_TYPE_DIR) in check_target()
45 if ((vnode->originMount) && (vnode->originMount->mountFlags & MS_RDONLY)) in check_target()
50 if (vnode->useCount > 0) in check_target()
55 if (VfsVnodePermissionCheck(vnode->parent, (WRITE_OP | EXEC_OP))) in check_target()
74 struct Vnode *vnode = NULL; in do_unlink() local
99 ret = VnodeLookup(fullpath, &vnode, 0); in do_unlink()
105 ret = check_target(vnode); in do_unlink()
[all...]
H A Dfs_open.c36 #include "vnode.h"
150 struct Vnode *vnode = NULL; in fp_open() local
155 ret = follow_symlink(dirfd, path, &vnode, &fullpath); in fp_open()
159 if (vnode->type == VNODE_TYPE_BCHR) in fp_open()
166 if (vnode->type == VNODE_TYPE_CHR) in fp_open()
168 if (OsDevLimitCheckPermission(vnode->type, fullpath, oflags) != LOS_OK) in fp_open()
177 if (vnode->type == VNODE_TYPE_BLK) in fp_open()
187 if (OsDevLimitCheckPermission(vnode->type, fullpath, oflags) != LOS_OK) in fp_open()
196 if ((vnode->originMount) && (vnode in fp_open()
[all...]
H A Dfs_readlink.c33 #include "vnode.h"
37 struct Vnode *vnode = NULL; in do_readlink() local
60 ret = VnodeLookup(fullpath, &vnode, 0); in do_readlink()
66 if (vnode->type != VNODE_TYPE_LNK && vnode->type != VNODE_TYPE_VIR_LNK) in do_readlink()
68 if (vnode->type != VNODE_TYPE_LNK) in do_readlink()
75 if (!vnode->vop || !vnode->vop->Readlink) in do_readlink()
81 ret = vnode->vop->Readlink(vnode, bu in do_readlink()
[all...]
H A Dfs_truncate64.c51 #include "vnode.h"
65 struct Vnode *vnode = NULL; in file_truncate64() local
76 /* Is this vnode a registered mountpoint? Does it support the in file_truncate64()
81 vnode = filep->f_vnode; in file_truncate64()
82 if (!vnode || !vnode->vop || !vnode->vop->Truncate64) in file_truncate64()
92 err = vnode->vop->Truncate64(vnode, length); in file_truncate64()
H A Dfs_truncate.c33 #include "vnode.h"
46 struct Vnode *vnode = NULL; in file_truncate() local
58 /* Is this vnode a registered mountpoint? Does it support the in file_truncate()
63 vnode = filep->f_vnode; in file_truncate()
64 if (!vnode || !vnode->vop || !vnode->vop->Truncate) in file_truncate()
74 ret = vnode->vop->Truncate(vnode, length); in file_truncate()
H A Dfs_statfs.c30 #include "vnode.h"
58 struct Vnode *vnode = NULL; in statfs() local
73 /* Get an vnode for this file */ in statfs()
75 ret = VnodeLookup(path, &vnode, 0); in statfs()
81 vnode->useCount++; in statfs()
84 mnt = vnode->originMount; in statfs()
100 vnode->useCount--; in statfs()
109 vnode->useCount--; in statfs()
H A Dfs_mkdir.c30 #include "vnode.h"
41 struct Vnode *vnode = NULL; in do_mkdir() local
76 ret = VnodeLookup(fullpath, &vnode, V_DUMMY|V_CREATE); in do_mkdir()
81 vnode->mode = mode | S_IFDIR; in do_mkdir()
82 vnode->type = VNODE_TYPE_DIR; in do_mkdir()
119 ret = parentVnode->vop->Mkdir(parentVnode, dirname, mode, &vnode); in do_mkdir()
131 struct PathCache *dt = PathCacheAlloc(parentVnode, vnode, dirname, strlen(dirname)); in do_mkdir()
136 vnode->filePath = strdup(fullpath); in do_mkdir()
H A Dfs_lseek64.c50 #include "vnode.h"
78 struct Vnode *vnode = NULL; in file_seek64() local
83 vnode = filep->f_vnode; in file_seek64()
85 if (vnode == NULL) in file_seek64()
H A Dfs_lseek.c32 #include "vnode.h"
60 struct Vnode *vnode; in file_seek() local
64 vnode = filep->f_vnode; in file_seek()
66 if (!vnode) in file_seek()
H A Dfs_symlink.c33 #include "vnode.h"
36 int follow_symlink(int dirfd, const char *path, struct Vnode **vnode, char **fullpath) in follow_symlink() argument
64 /* The object of fullpath is not exist. Return its parent's vnode. */ in follow_symlink()
65 *vnode = newvnode; in follow_symlink()
70 /* The object of fullpath is exist, and is not a symbol link. Return its vnode. */ in follow_symlink()
71 *vnode = newvnode; in follow_symlink()
/third_party/NuttX/fs/dirent/
H A Dfs_seekdir.c30 #include "vnode.h"
41 struct Vnode *vnode; in seekmountptdir() local
50 vnode = idir->fd_root; in seekmountptdir()
53 if (vnode->vop != NULL && vnode->vop->Rewinddir != NULL) in seekmountptdir()
57 vnode->vop->Rewinddir(vnode, idir); in seekmountptdir()
82 if (!vnode->vop || !vnode->vop->Readdir || in seekmountptdir()
83 vnode in seekmountptdir()
[all...]
H A Dfs_closedir.c30 #include "vnode.h"
56 struct Vnode *vnode = NULL; in closedir() local
69 /* This is the 'root' vnode of the directory. This means different in closedir()
72 vnode = idir->fd_root; in closedir()
74 if (vnode->vop && vnode->vop->Closedir) in closedir()
76 ret = vnode->vop->Closedir(vnode, idir); in closedir()
88 vnode->useCount--; in closedir()
/third_party/NuttX/drivers/bch/
H A Dbchdev_driver.c55 static int bch_unlink(struct Vnode *vnode);
86 struct Vnode *vnode = filep->f_vnode; in bch_open() local
90 bch = (struct bchlib_s *)((struct drv_data *)vnode->data)->priv; in bch_open()
117 struct Vnode *vnode = filep->f_vnode; in bch_close() local
121 bch = (struct bchlib_s *)((struct drv_data *)vnode->data)->priv; in bch_close()
176 struct Vnode *vnode = filep->f_vnode; in bch_seek() local
181 bch = (struct bchlib_s *)((struct drv_data *)vnode->data)->priv; in bch_seek()
240 struct Vnode *vnode = filep->f_vnode; in bch_read() local
244 bch = (struct bchlib_s *)((struct drv_data *)vnode->data)->priv; in bch_read()
263 struct Vnode *vnode in bch_write() local
294 struct Vnode *vnode = filep->f_vnode; bch_ioctl() local
381 bch_unlink(struct Vnode *vnode) bch_unlink() argument
[all...]
H A Dbchlib_setup.c67 ret = open_blockdriver(blkdev, readonly ? MS_RDONLY : 0, &bch->vnode); in bchlib_setup()
74 struct drv_data *drv = (struct drv_data *)bch->vnode->data; in bchlib_setup()
77 DEBUGASSERT(bch->vnode && bops && bops->geometry); in bchlib_setup()
79 ret = bops->geometry(bch->vnode, &geo); in bchlib_setup()
110 part = los_part_find(bch->vnode); in bchlib_setup()
H A Dbchlib_teardown.c61 (void)close_blockdriver(bch->vnode); in bchlib_teardown()
/third_party/NuttX/fs/vfs/include/
H A Ddriver.h44 #include "vnode.h"
72 int (*open)(struct Vnode *vnode);
73 int (*close)(struct Vnode *vnode);
74 ssize_t (*read)(struct Vnode *vnode, unsigned char *buffer,
76 ssize_t (*write)(struct Vnode *vnode, const unsigned char *buffer,
78 int (*geometry)(struct Vnode *vnode, struct geometry *geometry);
79 int (*ioctl)(struct Vnode *vnode, int cmd, unsigned long arg);
80 int (*unlink)(struct Vnode *vnode);
94 * Register a character driver vnode the pseudo file system.
97 * path - The path to the vnode t
[all...]
H A Dfile.h88 * the file descriptor to the file state and to a set of vnode operations.
148 int (*unlink)(struct Vnode *vnode);
182 * Assign an vnode to a specific files structure. This is the heart of
468 * Allocate a struct files instance and associate it with an vnode instance.
479 * Close an vnode (if open)
585 int follow_symlink(int dirfd, const char *path, struct Vnode **vnode, char **fullpath);
/third_party/NuttX/fs/driver/
H A Dfs_registerdriver.c29 #include "vnode.h"
42 * Register a character driver vnode the pseudo file system.
45 * path - The path to the vnode to create
48 * priv - Private, user data that will be associated with the vnode.
51 * Zero on success (with the vnode point in 'vnode'); A negated errno
56 * EEXIST - An vnode already exists at 'path'
64 struct Vnode *vnode = NULL; in register_driver() local
73 ret = VnodeLookup(path, &vnode, 0); in register_driver()
80 /* Insert a dummy node -- we need to hold the vnode semaphor in register_driver()
[all...]
H A Dfs_unregisterdriver.c27 #include "vnode.h"
39 * Remove the character driver vnode at 'path' from the pseudo-file system
45 struct Vnode *vnode = NULL; in unregister_driver() local
52 ret = VnodeLookup(path, &vnode, V_DUMMY); in unregister_driver()
58 if (vnode->type != VNODE_TYPE_CHR && vnode->type != VNODE_TYPE_BLK) in unregister_driver()
63 ret = VnodeFree(vnode); in unregister_driver()
H A Dfs_blockproxy.c155 struct Vnode *vnode = NULL; in block_proxy() local
206 vnode = filep->f_vnode; in block_proxy()
208 vnode->type = VNODE_TYPE_BCHR; in block_proxy()
/third_party/NuttX/drivers/pipes/
H A Dpipe.c133 struct Vnode *vnode = filep->f_vnode; in pipe_close() local
134 struct pipe_dev_s *dev = (struct pipe_dev_s *)((struct drv_data *)vnode->data)->priv; in pipe_close()
145 if (ret == 0 && vnode->useCount <= 1) in pipe_close()
160 int pipe_unlink(struct Vnode *vnode) in pipe_unlink() argument
162 struct pipe_dev_s *dev = ((struct drv_data *)vnode->data)->priv; in pipe_unlink()
171 ret = pipecommon_unlink(vnode); in pipe_unlink()
192 * pipe() creates a pair of file descriptors, pointing to a pipe vnode,
214 struct Vnode *vnode = NULL; in UpdateDev() local
219 ret = VnodeLookup(dev->name, &vnode, 0); in UpdateDev()
226 data = (struct drv_data *)vnode in UpdateDev()
[all...]
H A Dpipe_common.c171 struct Vnode *vnode = filep->f_vnode; in pipecommon_open() local
172 struct pipe_dev_s *dev = (struct pipe_dev_s *)((struct drv_data *)vnode->data)->priv; in pipecommon_open()
197 if (vnode->useCount == 1 && dev->d_buffer == NULL) in pipecommon_open()
269 vnode->useCount++; in pipecommon_open()
280 struct Vnode *vnode = filep->f_vnode; in pipecommon_close() local
281 struct pipe_dev_s *dev = (struct pipe_dev_s *)((struct drv_data *)vnode->data)->priv; in pipecommon_close()
300 /* Check if the decremented vnode reference count would go to zero */ in pipecommon_close()
302 if (vnode->useCount > 1) in pipecommon_close()
366 vnode->useCount--; in pipecommon_close()
378 struct Vnode *vnode in pipecommon_read() local
539 struct Vnode *vnode = filep->f_vnode; pipecommon_write() local
700 struct Vnode *vnode = filep->f_vnode; pipecommon_poll() local
785 pipecommon_unlink(struct Vnode *vnode) pipecommon_unlink() argument
[all...]
/third_party/NuttX/fs/inode/
H A Dfs_files.c54 #include "vnode.h"
183 * Close an vnode (if open)
192 struct Vnode *vnode = filep->f_vnode; in _files_close() local
195 /* Check if the struct file is open (i.e., assigned an vnode) */ in _files_close()
218 vnode->useCount--; in _files_close()
220 if (vnode->type == VNODE_TYPE_BCHR) in _files_close()
222 ret = VnodeFree(vnode); in _files_close()
304 * Assign an vnode to a specific files structure. This is the heart of
344 /* If there is already an vnode contained in the new file structure, in file_dup2()
345 * close the file and release the vnode in file_dup2()
624 close_files(struct Vnode *vnode) close_files() argument
[all...]
/third_party/toybox/toys/pending/
H A Dcrond.c306 VAR *v, *vnode = (VAR *)l->var; in free_cronfile() local
310 while (vnode && (v = dlist_pop(&vnode))) { in free_cronfile()
400 VAR *v, *vnode = (VAR *)cfile->var; in scan_cronfiles() local
405 while (vnode && (v = dlist_pop(&vnode))) { in scan_cronfiles()

Completed in 9 milliseconds

12