"Fossies" - the Fresh Open Source Software Archive 
Member "cryptsetup-2.4.3/lib/utils_io.h" (13 Jan 2022, 1843 Bytes) of package /linux/misc/cryptsetup-2.4.3.tar.xz:
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 option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "utils_io.h" see the
Fossies "Dox" file reference documentation and the last
Fossies "Diffs" side-by-side code changes report:
2.3.6_vs_2.4.0.
1 /*
2 * utils - miscellaneous I/O utilities for cryptsetup
3 *
4 * Copyright (C) 2004 Jana Saout <jana@saout.de>
5 * Copyright (C) 2004-2007 Clemens Fruhwirth <clemens@endorphin.org>
6 * Copyright (C) 2009-2021 Red Hat, Inc. All rights reserved.
7 * Copyright (C) 2009-2021 Milan Broz
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 */
23
24 #ifndef _CRYPTSETUP_UTILS_IO_H
25 #define _CRYPTSETUP_UTILS_IO_H
26
27 #include <stddef.h>
28 #include <sys/types.h>
29
30 ssize_t read_buffer(int fd, void *buf, size_t length);
31 ssize_t read_buffer_intr(int fd, void *buf, size_t length, volatile int *quit);
32 ssize_t write_buffer(int fd, const void *buf, size_t length);
33 ssize_t write_buffer_intr(int fd, const void *buf, size_t length, volatile int *quit);
34 ssize_t write_blockwise(int fd, size_t bsize, size_t alignment,
35 void *orig_buf, size_t length);
36 ssize_t read_blockwise(int fd, size_t bsize, size_t alignment,
37 void *orig_buf, size_t length);
38 ssize_t write_lseek_blockwise(int fd, size_t bsize, size_t alignment,
39 void *buf, size_t length, off_t offset);
40 ssize_t read_lseek_blockwise(int fd, size_t bsize, size_t alignment,
41 void *buf, size_t length, off_t offset);
42
43 #endif