"Fossies" - the Fresh Open Source Software Archive
Member "dosfstools-4.2/src/io.h" (31 Jan 2021, 2241 Bytes) of package /linux/misc/dosfstools-4.2.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard
) with prefixed line numbers and code folding
Alternatively you can here view
the uninterpreted source code file.
For more information about "io.h" see the Fossies "Dox" file reference
documentation and the latest Fossies "Diffs"
side-by-side code changes report: 4.1_vs_4.2
1 /* io.h - Virtual disk input/output
3 Copyright (C) 1993 Werner Almesberger <firstname.lastname@example.org>
4 Copyright (C) 1998 Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
5 Copyright (C) 2008-2014 Daniel Baumann <email@example.com>
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.
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.
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/>.
20 The complete text of the GNU General Public License
21 can be found in /usr/share/common-licenses/GPL-3 file.
24 /* FAT32, VFAT, Atari format support, and various fixes additions May 1998
25 * by Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de> */
27 #ifndef _IO_H
28 #define _IO_H
30 #include <fcntl.h> /* for off_t */
32 void fs_open(const char *path, int rw);
34 /* Opens the filesystem PATH. If RW is zero, the filesystem is opened
35 read-only, otherwise, it is opened read-write. */
37 void fs_read(off_t pos, int size, void *data);
39 /* Reads SIZE bytes starting at POS into DATA. Performs all applicable
40 changes. */
42 int fs_test(off_t pos, int size);
44 /* Returns a non-zero integer if SIZE bytes starting at POS can be read without
45 errors. Otherwise, it returns zero. */
47 void fs_write(off_t pos, int size, void *data);
49 /* If write_immed is non-zero, SIZE bytes are written from DATA to the disk,
50 starting at POS. If write_immed is zero, the change is added to a list in
51 memory. */
53 int fs_close(int write);
55 /* Closes the filesystem, performs all pending changes if WRITE is non-zero
56 and removes the list of changes. Returns a non-zero integer if the file
57 system has been changed since the last fs_open, zero otherwise. */
59 int fs_changed(void);
61 /* Determines whether the filesystem has changed. See fs_close. */