File: xdf_prepare_transfer.3

package info (click to toggle)
xdffileio 0.3-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 2,780 kB
  • sloc: sh: 11,327; ansic: 7,695; makefile: 112
file content (65 lines) | stat: -rw-r--r-- 1,948 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
.\"Copyright 2010 (c) EPFL
.TH XDF_PREPARE_TRANSFER 3 2010 "EPFL" "xdffileio library manual"
.SH NAME
xdf_prepare_transfer - Setup the internals of the xDF file to be ready to
receive or send data.
.SH SYNOPSIS
.LP
.B #include <xdfio.h>
.sp
.BI "int xdf_prepare_transfer(struct xdf* " xdf ");"
.br
.SH DESCRIPTION
.LP
\fBxdf_prepare_transfer\fP() set up the internal structures of the xDF file
referenced by \fIxdf\fP to be ready to receive or send data. After a
successful call to it, you can call \fBxdf_write\fP(3) or \fBxdf_read\fP(3)
depending of the mode of the xDF file.
.LP
Since this function prepares the transfer, no call to any function which
configures it will be allowed anymore after \fBxdf_define_arrays\fP(3)
succeed. In particular, \fBxdf_set_conf\fP(3), \fBxdf_setchconf\fP(3) and
\fBxdf_define_arrays\fP(3) will fail afterwards.
.LP
In case of failure due to I/O (file to big, connection to file system
lost...), the best procedure is to close the file since the underlying file
will be in a undertermined stated.
.SH "RETURN VALUE"
.LP
\fBxdf_define_arrays\fP() returns 0 in case of success. Otherwise \-1 is
returned and \fIerrno\fP is set appropriately.
.SH ERRORS
.TP
.B EINVAL
\fIxdf\fP is NULL.
.TP
.B ENOMEM
The system is unable to allocate memory resources.
.TP
.B EFBIG
An attempt was made to write a file that exceeds the implementation-defined
maximum file size or the process's file size limit,
or to write at a position past the maximum allowed offset.
.TP
.B EINTR
The call was interrupted by a signal before any data was written; see
\fBsignal\fP(7).
.TP
.B EIO
A low-level I/O error occurred while modifying the inode.
.TP
.B ENOSPC
The device containing the xDF file has no room for the data.
.TP
.B ESTALE
Stale file handle. This error can occur for NFS and for other file systems
.SH "SEE ALSO"
.BR xdf_define_arrays (3),
.BR xdf_set_conf (3), 
.BR xdf_set_chconf (3),
.BR xdf_read (3),
.BR xdf_write (3)