|
AquilaOS documentation
How it works, and its code
|
minix: directory entries, a name and an inode number each, in the directory's blocks. More...
Go to the source code of this file.
Functions | |
| uint32_t | minix_dentry_find (struct minix *desc, struct minix_inode *m_inode, const char *name) |
| Finds the inode number of a name in a directory. | |
| int | minix_dentry_create (struct vnode *dir, const char *name, ino_t ino, mode_t mode) |
| Adds an entry to a directory, in its first free slot. | |
minix: directory entries, a name and an inode number each, in the directory's blocks.
Definition in file dentry.c.
Adds an entry to a directory, in its first free slot.
The directory's size grows if the slot is past its end. A directory whose blocks are all full grows by a block, with the entry at its start.
| dir | the directory |
| name | the new entry's name (cut to the filesystem's longest) |
| ino | its inode number |
| mode | its type and permissions (not used) |
Definition at line 68 of file dentry.c.
References minix::bs, minix::dentry_size, minix_dentry::ino, vnode::ino, memcpy(), memset(), MIN, minix_dentry_create(), minix_inode_block_read(), minix_inode_block_write(), minix_inode_read(), minix_inode_write(), vnode::mode, minix_dentry::name, minix::name_len, vnode::p, minix_inode::size, and vnode::size.
Referenced by minix_dentry_create(), and minix_vmknod().
| uint32_t minix_dentry_find | ( | struct minix * | desc, |
| struct minix_inode * | m_inode, | ||
| const char * | name ) |
Finds the inode number of a name in a directory.
The callers check that the inode is a directory: an inode that isn't one has no entries.
| desc | the mounted filesystem |
| m_inode | the directory's inode |
| name | the name |
Definition at line 19 of file dentry.c.
References minix::bs, minix::dentry_size, minix_dentry::ino, memcpy(), minix_dentry_find(), minix_inode_block_read(), minix_inode::mode, minix_dentry::name, minix::name_len, and minix_inode::size.
Referenced by minix_dentry_find(), minix_finddir(), and minix_vmknod().