Updated README file; sys_gttyinit () was updated; sys_ioctl () was updated; shell...
[ZeXOS.git] / kernel / include / fs.h
blob85ac207b648959da0d6d0663160d4dd4f35b225d
1 /*
2 * ZeX/OS
3 * Copyright (C) 2007 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com)
4 * Copyright (C) 2009 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com)
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef _FS_H
22 #define _FS_H
24 #include <system.h>
25 #include <dev.h>
26 #include <partition.h>
28 #define FS_NAME_LEN 11
30 #define FS_ACT_INIT 0x1
31 #define FS_ACT_READ 0x2
32 #define FS_ACT_WRITE 0x4
33 #define FS_ACT_MKDIR 0x8
34 #define FS_ACT_TOUCH 0x10
35 #define FS_ACT_RMDIR 0x20
36 #define FS_ACT_RM 0x40
37 #define FS_ACT_CHDIR 0x80
38 #define FS_ACT_EXIT 0x100
40 typedef bool (fs_handler_t) (unsigned act, char *block, unsigned n, unsigned long l);
42 /* Filesystem structure */
43 typedef struct fs_context {
44 struct fs_context *next, *prev;
46 char *name;
47 fs_handler_t *handler;
48 } fs_t;
50 /* externs */
51 //extern bool fs_list_add (char *name, fs_handler_t *handler);
52 extern fs_t *fs_supported (char *name);
53 //extern fs_t *fs_detect (partition_t *p);
54 extern unsigned int init_fs ();
56 #endif