[1] | 1 | /* |
---|
| 2 | * kern/sys-vfs.h - exported file management services |
---|
| 3 | * |
---|
| 4 | * Copyright (c) 2008,2009,2010,2011,2012 Ghassan Almaless |
---|
| 5 | * Copyright (c) 2011,2012 UPMC Sorbonne Universites |
---|
| 6 | * |
---|
| 7 | * This file is part of ALMOS-kernel. |
---|
| 8 | * |
---|
| 9 | * ALMOS-kernel is free software; you can redistribute it and/or modify it |
---|
| 10 | * under the terms of the GNU General Public License as published by |
---|
| 11 | * the Free Software Foundation; version 2.0 of the License. |
---|
| 12 | * |
---|
| 13 | * ALMOS-kernel is distributed in the hope that it will be useful, but |
---|
| 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
| 16 | * General Public License for more details. |
---|
| 17 | * |
---|
| 18 | * You should have received a copy of the GNU General Public License |
---|
| 19 | * along with ALMOS-kernel; if not, write to the Free Software Foundation, |
---|
| 20 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
| 21 | */ |
---|
| 22 | |
---|
| 23 | #ifndef _SYS_VFS_H_ |
---|
| 24 | #define _SYS_VFS_H_ |
---|
| 25 | |
---|
| 26 | #include <types.h> |
---|
| 27 | #include <vfs.h> |
---|
| 28 | |
---|
| 29 | struct vfs_usp_dirent_s; |
---|
| 30 | |
---|
| 31 | /* Files related system call */ |
---|
| 32 | int sys_open (char *pathname, uint_t flags, uint_t mode); |
---|
| 33 | int sys_stat (char *path, struct vfs_stat_s *buf, int fd); |
---|
| 34 | int sys_creat (char *pathname, uint_t mode); |
---|
| 35 | int sys_read (uint_t fd, void *buf, size_t count); |
---|
| 36 | int sys_write (uint_t fd, void *buf, size_t count); |
---|
| 37 | int sys_lseek (uint_t fd, off_t offset, int whence); |
---|
| 38 | int sys_unlink (char *pathname); |
---|
| 39 | int sys_close (uint_t fd); |
---|
| 40 | |
---|
| 41 | /* Directories related system call */ |
---|
| 42 | int sys_opendir (char *pathname); |
---|
| 43 | int sys_mkdir (char *pathname, uint_t mode); |
---|
| 44 | int sys_rmdir (char *pathname); |
---|
| 45 | int sys_chdir (char *pathname); |
---|
| 46 | int sys_readdir (uint_t fd, struct vfs_usp_dirent_s *dirent); |
---|
| 47 | int sys_closedir (uint_t fd); |
---|
| 48 | int sys_getcwd (char *buff, size_t size); |
---|
| 49 | |
---|
| 50 | /* Common */ |
---|
| 51 | int sys_chmod (char *pathname, uint_t mode); |
---|
| 52 | int sys_fsync (uint_t fd); |
---|
| 53 | |
---|
| 54 | /* Anonymous/Named pipes related system call */ |
---|
| 55 | int sys_pipe (uint_t *pipefd); |
---|
| 56 | int sys_mkfifo (char *pathname, uint_t mode); |
---|
| 57 | |
---|
| 58 | #endif |
---|