• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

vfs.h

Go to the documentation of this file.
00001 /* VFS interface */
00002 /* Copyright (C) 2011 Holger Dietze
00003  *
00004  *   This program is free software; you can redistribute it and/or modify
00005  *   it under the terms of the GNU General Public License as published by
00006  *   the Free Software Foundation; either version 2 of the License, or
00007  *   (at your option) version 3.
00008  *
00009  *   This program is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details.
00013  *
00014  *   You should have received a copy of the GNU General Public License along
00015  *   with this program; if not, see <http://www.gnu.org/licenses/>.
00016  */
00017 
00018 #ifndef VFS_H
00019 #define VFS_H
00020 
00021 #include <stdint.h>
00022 
00028 int mount (const char *source, const char *target,
00029            const char *filesystemtype, uint16_t mountflags,
00030            const void *data);
00031 
00033 #define MS_RDONLY (1<<1)
00034 
00037 int umount (const char *target);
00038 
00039 typedef uint16_t mode_t;
00040 
00043 int open (const char *pathname, uint16_t flags, mode_t mode);
00044 #define O_ACCMODE       000003
00045 
00046 #define O_RDONLY        000000
00047 
00048 #define O_WRONLY        000001
00049 
00050 #define O_RDWR          000002
00051 
00052 #define O_CREAT         000100
00053 
00054 #define O_TRUNC         001000
00055 
00058 int close (int fd);
00059 
00060 typedef uint32_t off_t;
00061 typedef int32_t ssize_t;
00062 
00064 ssize_t read (int fd, void *buf, size_t count);
00066 ssize_t write (int fd, const void *buf, size_t count);
00067 
00068 #endif

Generated by  doxygen 1.7.1