|
AquilaOS documentation
How it works, and its code
|
Making a filesystem node by its path: a file, a directory, a device node, a FIFO or a symbolic link. More...
Go to the source code of this file.
Functions | |
| int | vfs_mknod (const char *path, mode_t mode, dev_t dev, struct uio *uio, struct vnode **ref) |
| Makes a node at a path. | |
| int | vfs_mkdir (const char *path, mode_t mode, struct uio *uio, struct vnode **ref) |
| Makes a directory at a path. | |
| int | vfs_creat (const char *path, mode_t mode, struct uio *uio, struct vnode **ref) |
| Makes a regular file at a path. | |
Making a filesystem node by its path: a file, a directory, a device node, a FIFO or a symbolic link.
Definition in file mknod.c.
Makes a regular file at a path.
| path | the new file's path |
| mode | its permissions |
| uio | who is asking |
| ref | if not NULL, set to the new vnode (the caller closes it) |
Definition at line 69 of file mknod.c.
References vnode::mode, vnode::ref, vfs_creat(), and vfs_mknod().
Referenced by do_openat(), and vfs_creat().
Makes a directory at a path.
| path | the new directory's path |
| mode | its permissions |
| uio | who is asking |
| ref | if not NULL, set to the new vnode (the caller closes it) |
Definition at line 55 of file mknod.c.
References vnode::mode, vnode::ref, vfs_mkdir(), and vfs_mknod().
Referenced by vfs_mkdir().
Makes a node at a path.
The caller's umask applies to the mode (but not for a symbolic link), and it needs write and search permission on the directory.
| path | the new node's path |
| mode | its type (S_IF*) and permissions |
| dev | its device number, for a device node |
| uio | who is asking (for permissions and the umask) |
| ref | if not NULL, set to the new vnode (the caller closes it) |
Definition at line 21 of file mknod.c.
References kfree(), uio::mask, vnode::mode, NULL, vnode::ref, vfs_access(), vfs_close(), vfs_lookup_parent(), vfs_mknod(), vfs_vmknod(), VFS_W, and VFS_X.
Referenced by do_mknodat(), kmain(), socket_unix_bind(), vfs_creat(), vfs_mkdir(), vfs_mknod(), and vfs_symlink().