AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
ioctl.c File Reference

ioctl() on a vnode: passed on to its device or its filesystem. More...

#include <core/system.h>
#include <fs/vfs.h>
#include <dev/dev.h>

Go to the source code of this file.

Functions

int vfs_ioctl (struct vnode *vnode, unsigned long request, void *argp)
 Passes an ioctl() request to a vnode's device driver, or to its filesystem.

Detailed Description

ioctl() on a vnode: passed on to its device or its filesystem.

Definition in file ioctl.c.

Function Documentation

◆ vfs_ioctl()

int vfs_ioctl ( struct vnode * vnode,
unsigned long request,
void * argp )

Passes an ioctl() request to a vnode's device driver, or to its filesystem.

Parameters
vnodethe vnode
requestthe request
argpits argument, often a pointer to user memory
Returns
the request's result, -EINVAL for an invalid vnode, or -ENOSYS if its filesystem has no ioctl operation

Definition at line 19 of file ioctl.c.

References vnode::fs, vops::ioctl, ISDEV, kdev_ioctl(), LOG_DEBUG, vfs_ioctl(), VNODE_DEV, and fs::vops.

Referenced by posix_file_ioctl(), and vfs_ioctl().