source: trunk/kernel/kern/sys-vfs.h @ 220

Last change on this file since 220 was 1, checked in by alain, 8 years ago

First import

File size: 1.9 KB
Line 
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
29struct vfs_usp_dirent_s;
30
31/* Files related system call */
32int sys_open (char *pathname, uint_t flags, uint_t mode);
33int sys_stat (char *path, struct vfs_stat_s *buf, int fd);
34int sys_creat (char *pathname, uint_t mode);
35int sys_read (uint_t fd, void *buf, size_t count);
36int sys_write (uint_t fd, void *buf, size_t count);
37int sys_lseek (uint_t fd, off_t offset, int whence);
38int sys_unlink (char *pathname);
39int sys_close (uint_t fd);
40
41/* Directories related system call */
42int sys_opendir (char *pathname);
43int sys_mkdir (char *pathname, uint_t mode);
44int sys_rmdir (char *pathname);
45int sys_chdir (char *pathname);
46int sys_readdir (uint_t fd, struct vfs_usp_dirent_s *dirent);
47int sys_closedir (uint_t fd);
48int sys_getcwd (char *buff, size_t size);
49
50/* Common */
51int sys_chmod (char *pathname, uint_t mode);
52int sys_fsync (uint_t fd);
53
54/* Anonymous/Named pipes related system call */
55int sys_pipe (uint_t *pipefd);
56int sys_mkfifo (char *pathname, uint_t mode);
57
58#endif
Note: See TracBrowser for help on using the repository browser.