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

stat(): a vnode's attributes, in the structure user space gets. More...

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

Go to the source code of this file.

Functions

int vfs_stat (struct vnode *vnode, struct aquila_stat *buf)
 Fills a stat structure with a vnode's attributes.

Detailed Description

stat(): a vnode's attributes, in the structure user space gets.

Definition in file stat.c.

Function Documentation

◆ vfs_stat()

int vfs_stat ( struct vnode * vnode,
struct aquila_stat * buf )

Fills a stat structure with a vnode's attributes.

Parameters
vnodethe vnode
bufthe structure to fill, in kernel memory
Returns
0

Definition at line 16 of file stat.c.

References vnode::atime, vnode::ctime, vnode::dev, vnode::gid, vnode::ino, LOG_DEBUG, vnode::mode, vnode::mtime, vnode::nlink, vnode::rdev, vnode::size, timespec::tv_nsec, timespec::tv_sec, vnode::uid, and vfs_stat().

Referenced by do_fstatat(), sys_fstat(), and vfs_stat().