use core::ffi::{c_char, c_int, c_ulong};

use super::sys_types::{fsblkcnt_t, fsfilcnt_t};

#[repr(C)]
pub struct statvfs {
    pub f_bsize: c_ulong,
    pub f_frsize: c_ulong,
    pub f_blocks: fsblkcnt_t,
    pub f_bfree: fsblkcnt_t,
    pub f_bavail: fsblkcnt_t,

    pub f_files: fsfilcnt_t,
    pub f_ffree: fsfilcnt_t,
    pub f_favail: fsfilcnt_t,

    pub f_fsid: c_ulong,
    pub f_flag: c_ulong,
    pub f_namemax: c_ulong,
}

pub const ST_RDONLY: c_ulong = 1 << 0;
pub const ST_NOSUID: c_ulong = 1 << 1;

#[no_mangle]
unsafe extern "C" fn fstatvfs(_fd: c_int, _statvfs: *mut statvfs) -> c_int {
    todo!()
}

#[no_mangle]
unsafe extern "C" fn statvfs(_path: *const c_char, _statvfs: *mut statvfs) -> c_int {
    todo!()
}
