RTC added, new syscalls, i386 code was moved to separate part, better
[ZeXOS.git] / kernel / include / vfs.h
blob2d22181826f927c8993d1fb8ddedfa32aa8ac264
1 /*
2 * ZeX/OS
3 * Copyright (C) 2007 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com)
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef _VFS_H
21 #define _VFS_H
23 #define VFS_FILEATTR_FILE 0x1
24 #define VFS_FILEATTR_DIR 0x2
25 #define VFS_FILEATTR_HIDDEN 0x4
26 #define VFS_FILEATTR_SYSTEM 0x8
27 #define VFS_FILEATTR_BIN 0x10
28 #define VFS_FILEATTR_READ 0x20
29 #define VFS_FILEATTR_WRITE 0x40
30 #define VFS_FILEATTR_MOUNTED 0x80
32 #define VFS_FILENAME_LEN 10
33 #define VFS_MOUNTPOINT_LEN 32
36 /* Virtual filesystem structure */
37 typedef struct vfs_context {
38 struct vfs_context *next, *prev;
40 char *name;
41 char mountpoint[VFS_MOUNTPOINT_LEN];
42 unsigned attrib;
43 char *ptr;
44 } vfs_t;
46 /* externs */
47 extern bool vfs_list_findbymp (char *mountpoint);
48 extern bool vfs_cd (char *file, unsigned file_len);
49 extern bool vfs_mkdir (char *file, unsigned file_len);
50 extern bool vfs_list_add (char *name, unsigned attrib, char *mountpoint);
51 extern unsigned int init_vfs ();
53 #endif