1LFC_REGISTERFILES(3) LFC Library Functions LFC_REGISTERFILES(3)
2
3
4
6 lfc_registerfiles - register list of files with their corresponding
7 replica entry
8
10 #include <sys/types.h>
11 #include "lfc_api.h"
12
13 int lfc_registerfiles (int nbfiles, struct lfc_filereg *files, int
14 *nbstatuses, int **statuses)
15
17 lfc_registerfiles registers a list of files with their corresponding
18 replica entry. If the lfn is already registered, the guid is optional
19 and only the replica is added (after checking that filesize and possi‐
20 bly checksum match). If the lfn is not registered yet, the guid is
21 mandatory for the LFC. The lfn and the replica get registered.
22
23 nbfiles
24 specifies the number of files in the array files.
25
26 files is a pointer to an array of lfc_filereg structures provided by
27 the application.
28
29 struct lfc_filereg {
30 char *lfn;
31 char *guid;
32 mode_t mode;
33 u_signed64 size;
34 char *csumtype;
35 char *csumvalue;
36 char *server;
37 char *sfn;
38 };
39
40 nbstatuses
41 will be set to the number of replies in the array of statuses.
42
43 statuses
44 will be set to the address of an array of integer statuses allo‐
45 cated by the API. The client application is responsible for
46 freeing the array when not needed anymore. Individual statuses
47 are 0 if the operation was successful or set to the serrno value
48 in case of error.
49
51 This routine returns 0 if the operation was successful or -1 if the
52 operation failed. In the latter case, serrno is set appropriately.
53
55 ENOENT A component of lfn prefix does not exist or lfn is a null
56 pathname.
57
58 E2BIG Request too large (max 1 MB).
59
60 ENOMEM Memory could not be allocated for marshalling the request
61 or unmarshalling the reply.
62
63 EACCES Search permission is denied on a component of the lfn pre‐
64 fix or the file does not exist and write permission on the
65 parent directory is denied or write permission on the file
66 itself is denied.
67
68 EFAULT files, nbstatuses or statuses is a NULL pointer.
69
70 EEXIST The sfn exists already.
71
72 ENOTDIR A component of lfn prefix is not a directory.
73
74 EISDIR The lfn exists already and is not a regular file.
75
76 EINVAL nbfiles is not strictly positive, the length of one of the
77 guids exceeds CA_MAXGUIDLEN or the length of server
78 exceeds CA_MAXHOSTNAMELEN or lfn and guid are both given
79 and they point at a different file.
80
81 ENOSPC The name server database is full.
82
83 ENAMETOOLONG The length of lfn exceeds CA_MAXPATHLEN or the length of
84 an lfn component exceeds CA_MAXNAMELEN or the length of
85 sfn exceeds CA_MAXSFNLEN.
86
87 SENOSSERV Service unknown.
88
89 SEINTERNAL Database error.
90
91 SECOMERR Communication error.
92
93 ENSNACT Name server is not running or is being shutdown.
94
96 Castor_limits(4), lfc_addreplica(3), lfc_creatg(3), lfc_setfsize(3)
97
99 LCG Grid Deployment Team
100
101
102
103LFC $Date: 2010-09-14 13:37:49 +0200 (Tue, 14 SepL2F0C1_0R)EG$ISTERFILES(3)