1LFC_DELREPLICASBYSFN(3) LFC Library Functions LFC_DELREPLICASBYSFN(3)
2
3
4
6 lfc_delreplicasbysfn - delete entries associated with a list of sfns
7 and corresponding lfn if last replica
8
10 #include <sys/types.h>
11 #include "lfc_api.h"
12
13 int lfc_delreplicasbysfn (int nbfiles, const char **sfns, const char
14 **guids, int *nbstatuses, int **statuses)
15
17 lfc_delreplicasbysfn deletes entries associated with a list of sfns and
18 corresponding lfn if last replica. An extra check may be obtained by
19 specifying a list of guids.
20
21 nbfiles
22 specifies the number of file names in the array sfns.
23
24 sfns specifies either the Site URLs or the Physical File Names for
25 the list of replicas.
26
27 guids specifies the list of Grid Unique IDentifiers (optional). Can be
28 NULL.
29
30 nbstatuses
31 will be set to the number of replies in the array of statuses.
32
33 statuses
34 will be set to the address of an array of integer statuses allo‐
35 cated by the API. The client application is responsible for
36 freeing the array when not needed anymore. Individual statuses
37 are 0 if the operation was successful or set to the serrno value
38 in case of error.
39
41 This routine returns 0 if the operation was successful or -1 if the
42 operation failed. In the latter case, serrno is set appropriately.
43
45 ENOENT The named file or replica does not exist.
46
47 E2BIG Request too large (max 1 MB).
48
49 ENOMEM Memory could not be allocated for marshalling the request
50 or unmarshalling the reply.
51
52 EACCES Search permission is denied on a component of the parent
53 directory or write permission is denied on the parent
54 directory or the parent has the sticky bit S_ISVTX set and
55
56 the effective user ID of the requestor does not match
57 the owner ID of the file and
58
59 the effective user ID of the requestor does not match
60 the owner ID of the directory and
61
62 the file is not writable by the requestor and
63
64 the requestor does not have ADMIN privilege in the Cupv
65 database.
66
67 ENOMEM Memory could not be allocated for marshalling the request
68 or unmarshalling the reply.
69
70 EFAULT sfns, nbstatuses or statuses is a NULL pointer.
71
72 EINVAL nbfiles is not strictly positive or the length of one of
73 the guids exceeds CA_MAXGUIDLEN.
74
75 ENAMETOOLONG The length of sfn exceeds CA_MAXSFNLEN.
76
77 SENOSSERV Service unknown.
78
79 SEINTERNAL Database error.
80
81 SECOMERR Communication error.
82
83 ENSNACT Name server is not running or is being shutdown.
84
86 Castor_limits(4), lfc_delreplica(3), lfc_unlink(3)
87
89 LCG Grid Deployment Team
90
91
92
93LFC $Date: 2009/04/06 08:30:13 $ LFC_DELREPLICASBYSFN(3)