|
AquilaOS documentation
How it works, and its code
|
Mounting: a filesystem on a directory, by type (mount()), and the root filesystem from a disk partition. More...
#include <core/system.h>#include <core/string.h>#include <fs/vfs.h>#include <fs/devfs.h>#include <dev/dev.h>#include <ds/queue.h>Go to the source code of this file.
Functions | |
| int | vfs_mount (const char *type, const char *dir, int flags, void *data, struct uio *uio) |
| Mounts a filesystem of a type on a directory, for mount(). | |
| static int | root_dev (const char *name, dev_t *dev) |
| Gets the device number of an ATA disk partition, by its name (/dev/hda1 to /dev/hdd4). | |
| int | vfs_mount_root_dev (const char *name, const char *type) |
| Mounts the root filesystem from a disk partition (the root=/dev/hda2 kernel argument). | |
Variables | |
| struct queue * | mounts = QUEUE_NEW() |
Mounting: a filesystem on a directory, by type (mount()), and the root filesystem from a disk partition.
/proc/mounts lists the mounts.
Definition in file mount.c.
|
static |
Gets the device number of an ATA disk partition, by its name (/dev/hda1 to /dev/hdd4).
Returns 0, or -ENODEV for another name.
Definition at line 100 of file mount.c.
References DEV, and root_dev().
Referenced by root_dev(), and vfs_mount_root_dev().
| int vfs_mount | ( | const char * | type, |
| const char * | dir, | ||
| int | flags, | ||
| void * | data, | ||
| struct uio * | uio ) |
Mounts a filesystem of a type on a directory, for mount().
| type | the filesystem's name ("ext2", "procfs", ...) |
| dir | the directory's path |
| flags | passed on to the filesystem |
| data | the filesystem's arguments (its device, its options) |
| uio | who is asking |
Definition at line 29 of file mount.c.
References vnode::covered, mountpoint::dev, kfree(), kmalloc(), vnode::mode, fs::mount, vnode::mounted, mounts, fs_list::next, NULL, mountpoint::options, mountpoint::path, registered_fs, mountpoint::type, vfs_close(), vfs_lookup(), vfs_mount(), and vfs_vnode_path().
Referenced by kmain(), sys_mount(), and vfs_mount().
| int vfs_mount_root_dev | ( | const char * | name, |
| const char * | type ) |
Mounts the root filesystem from a disk partition (the root=/dev/hda2 kernel argument).
There are no device nodes yet at boot, so the partition's vnode is made here, as the RAM disk's is.
| name | the partition's name, /dev/hda1 to /dev/hdd4 |
| type | the filesystem's type (rootfstype=), or NULL for ext2 |
Definition at line 120 of file mount.c.
References devfs, kfree(), kmalloc(), fs::load, M_ZERO, fs::name, fs_list::next, NULL, printk(), vnode::rdev, registered_fs, root_dev(), vfs_mount_root(), and vfs_mount_root_dev().
Referenced by kmain(), and vfs_mount_root_dev().
Definition at line 14 of file mount.c.
Referenced by procfs_mounts(), and vfs_mount().