ReactOS 0.4.15-dev-7717-g4dc4ec2
io.h
Go to the documentation of this file.
1/* io.h - Virtual disk input/output
2
3 Copyright (C) 1993 Werner Almesberger <werner.almesberger@lrc.di.epfl.ch>
4 Copyright (C) 1998 Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
5 Copyright (C) 2008-2014 Daniel Baumann <mail@daniel-baumann.ch>
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20 The complete text of the GNU General Public License
21 can be found in /usr/share/common-licenses/GPL-3 file.
22*/
23
24/* FAT32, VFAT, Atari format support, and various fixes additions May 1998
25 * by Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de> */
26
27#ifndef _IO_H
28#define _IO_H
29
30#ifndef __REACTOS__
31#include <fcntl.h> /* for off_t */
32#endif
33
34#ifndef __REACTOS__
35void fs_open(char *path, int rw);
36#else
38#endif
39
40/* Opens the filesystem PATH. If RW is zero, the filesystem is opened
41 read-only, otherwise, it is opened read-write. */
42
43#ifdef __REACTOS__
44BOOLEAN fs_isdirty(void);
45
46/* Checks if filesystem is dirty */
47#endif
48
49void fs_read(off_t pos, int size, void *data);
50
51/* Reads SIZE bytes starting at POS into DATA. Performs all applicable
52 changes. */
53
54int fs_test(off_t pos, int size);
55
56/* Returns a non-zero integer if SIZE bytes starting at POS can be read without
57 errors. Otherwise, it returns zero. */
58
59void fs_write(off_t pos, int size, void *data);
60
61/* If write_immed is non-zero, SIZE bytes are written from DATA to the disk,
62 starting at POS. If write_immed is zero, the change is added to a list in
63 memory. */
64
65int fs_close(int write);
66
67/* Closes the filesystem, performs all pending changes if WRITE is non-zero
68 and removes the list of changes. Returns a non-zero integer if the file
69 system has been changed since the last fs_open, zero otherwise. */
70
71int fs_changed(void);
72
73/* Determines whether the filesystem has changed. See fs_close. */
74
75#ifdef __REACTOS__
76NTSTATUS fs_lock(BOOLEAN LockVolume);
77
78/* Lock or unlocks the volume */
79
80void fs_dismount(void);
81
82/* Dismounts the volume */
83#endif
84#endif
unsigned char BOOLEAN
#define write
Definition: acwin.h:97
LONG NTSTATUS
Definition: precomp.h:26
__kernel_off_t off_t
Definition: linux.h:201
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
static const struct @1636 read_write[]
#define rw
Definition: rosglue.h:38
int fs_changed(void)
Definition: io.c:475
int fs_close(int write)
Definition: io.c:455
int fs_test(off_t pos, int size)
Definition: io.c:322
void fs_read(off_t pos, int size, void *data)
Definition: io.c:282
void fs_write(off_t pos, int size, void *data)
Definition: io.c:344
void fs_open(char *path, int rw)
Definition: io.c:163