hos/kernel/fs/vfs.h

62 lines
1.1 KiB
C

// vfs.h
// Virtual file system subsystem for HOS
// Author: Josh Holtrop
// Date: 05/10/05
// Modified: 05/10/05
#ifndef __HOS_VFS_H__
#define __HOS_VFS_H__ __HOS_VFS_H__
#define FS_EXT2 1
#define FS_MAX 5
#define VFS_FT_UNKNOWN 0
#define VFS_FT_FILE 1
#define VFS_FT_DIR 2
#define VFS_FT_CHAR 3
#define VFS_FT_BLOCK 4
#define VFS_FT_FIFO 5
#define VFS_FT_SOCK 6
#define VFS_FT_SYMLINK 7
#define VFS_PERMS_OX 0x0001
#define VFS_PERMS_OW 0x0002
#define VFS_PERMS_OR 0x0004
#define VFS_PERMS_GX 0x0008
#define VFS_PERMS_GW 0x0010
#define VFS_PERMS_GR 0x0020
#define VFS_PERMS_UX 0x0040
#define VFS_PERMS_UW 0x0080
#define VFS_PERMS_UR 0x0100
#define VFS_PERMS_STICKY 0x0200
#define VFS_PERMS_SGID 0x0400
#define VFS_PERMS_SUID 0x0800
#define EOF 1000000
#include "hos_defines.h"
#include "devices.h"
#ifdef _HOS_CPP_
extern "C" {
#endif
typedef u64_t inode_num_t;
int vfs_init();
int vfs_mount(device_t device, int fsType, char *mountPoint);
#ifdef _HOS_CPP_
}
#include "lang/string.h"
#include "fs/FileSystem.h"
#include "fs/VFSMount.h"
FileSystem *vfs_attempt_mount(device_t device, int fsType);
#endif
#endif