1XDF_PREPARE_TRANSFER(3)    xdffileio library manual    XDF_PREPARE_TRANSFER(3)
2
3
4

NAME

6       xdf_prepare_transfer  - Setup the internals of the xDF file to be ready
7       to receive or send data.
8

SYNOPSIS

10       #include <xdfio.h>
11
12       int xdf_prepare_transfer(struct xdf* xdf);
13

DESCRIPTION

15       xdf_prepare_transfer() set up the internal structures of the  xDF  file
16       referenced by xdf to be ready to receive or send data. After a success‐
17       ful call to it, you can call xdf_write(3) or xdf_read(3)  depending  of
18       the mode of the xDF file.
19
20       Since  this  function  prepares  the  transfer, no call to any function
21       which configures it will be allowed anymore after  xdf_define_arrays(3)
22       succeed.   In   particular,   xdf_set_conf(3),   xdf_setchconf(3)   and
23       xdf_define_arrays(3) will fail afterwards.
24
25       In case of failure due to I/O (file to big, connection to  file  system
26       lost...),  the best procedure is to close the file since the underlying
27       file will be in a undertermined stated.
28

RETURN VALUE

30       xdf_define_arrays() returns 0 in  case  of  success.  Otherwise  -1  is
31       returned and errno is set appropriately.
32

ERRORS

34       EINVAL xdf is NULL.
35
36       ENOMEM The system is unable to allocate memory resources.
37
38       EFBIG  An attempt was made to write a file that exceeds the implementa‐
39              tion-defined maximum file size or the process's file size limit,
40              or to write at a position past the maximum allowed offset.
41
42       EINTR  The  call  was interrupted by a signal before any data was writ‐
43              ten; see signal(7).
44
45       EIO    A low-level I/O error occurred while modifying the inode.
46
47       ENOSPC The device containing the xDF file has no room for the data.
48
49       ESTALE Stale file handle. This error can occur for NFS  and  for  other
50              file systems
51

SEE ALSO

53       xdf_define_arrays(3),  xdf_set_conf(3), xdf_set_chconf(3), xdf_read(3),
54       xdf_write(3)
55
56
57
58
59
60
61
62EPFL                                 2010              XDF_PREPARE_TRANSFER(3)
Impressum