#include <XrdFrmCns.hh>
|
static void | Add (const char *tID, const char *Path, long long Size, mode_t Mode) |
|
static int | Init (const char *aPath, int Opts) |
|
static int | Init (const char *myID, const char *aPath, const char *iName) |
|
static void | Rm (const char *Path, int islfn=0) |
|
static void | Rmd (const char *Path, int islfn=0) |
|
Definition at line 36 of file XrdFrmCns.hh.
◆ XrdFrmCns()
◆ ~XrdFrmCns()
XrdFrmCns::~XrdFrmCns |
( |
| ) |
|
|
inline |
◆ Add()
void XrdFrmCns::Add |
( |
const char * |
tID, |
|
|
const char * |
Path, |
|
|
long long |
Size, |
|
|
mode_t |
Mode |
|
) |
| |
|
static |
Definition at line 67 of file XrdFrmCns.cc.
69{
70 static const int mMask = S_IRWXU|S_IRWXG|S_IRWXO;
71 static char NewLine = '\n';
73 char mBuff[8], sBuff[24];
74
75
76
77 if (!cnsMode) return;
78 if (cnsInit && !
Init())
79 {
Say.Emsg(
"FrmCns",
"Auto-ignore cnsd create",
Path);
return;}
80
81
82
83 iov[0].iov_base = (
char *)tID;
84 iov[0].iov_len = strlen(tID);
85 iov[1].iov_base = (
char *)
" create ";
87 iov[2].iov_base = mBuff;
88 iov[2].iov_len = sprintf(mBuff,
"%3o ",
Mode&mMask);
91 iov[4].iov_base = 

94 iov[6].iov_base = (
char *)
" closew ";
97 iov[8].iov_base = sBuff;
98 iov[8].iov_len = sprintf(sBuff,
" %lld\n", Size);
99
100
101
102 if (!Send2Cnsd(
iov, 9))
Say.Emsg(
"FrmCns",
"Auto-ignore cnsd create",
Path);
103}
XrdOucPup XrdCmsParser::Pup & Say
static int Init(const char *aPath, int Opts)
References Init(), Mode, Path, and Say.
◆ Init() [1/2]
int XrdFrmCns::Init |
( |
const char * |
aPath, |
|
|
int |
Opts |
|
) |
| |
|
static |
Definition at line 167 of file XrdFrmCns.cc.
168{
169 int rc;
170
171 if (aPath && (rc = setPath(aPath, 0))) return rc;
173 return 0;
174}
References Init().
Referenced by Add(), Init(), and Init().
◆ Init() [2/2]
int XrdFrmCns::Init |
( |
const char * |
myID, |
|
|
const char * |
aPath, |
|
|
const char * |
iName |
|
) |
| |
|
static |
Definition at line 178 of file XrdFrmCns.cc.
179{
180 char buff[2048];
181 int rc;
182
183
184
185 if (!cnsMode) return 0;
186
187
188
189 if (!cnsPath && (rc = setPath(aPath, iName))) return rc;
190
191
192
193 cnsHdrLen = sprintf(buff, "%s.%d.0@localhost rmdir ", myID, getpid());
194 cnsHdr[HdrRmd] = strdup(buff);
195 sprintf(buff, "%s.%d.0@localhost rm ", myID, getpid());
196 cnsHdr[HdrRmf] = strdup(buff);
197
198
199
200 return 0;
201}
References Init().
◆ Rm()
static void XrdFrmCns::Rm |
( |
const char * |
Path, |
|
|
int |
islfn = 0 |
|
) |
| |
|
inlinestatic |
◆ Rmd()
static void XrdFrmCns::Rmd |
( |
const char * |
Path, |
|
|
int |
islfn = 0 |
|
) |
| |
|
inlinestatic |
◆ cnsAuto
const int XrdFrmCns::cnsAuto = -1 |
|
static |
◆ cnsIgnore
const int XrdFrmCns::cnsIgnore = 0 |
|
static |
◆ cnsRequire
const int XrdFrmCns::cnsRequire = 1 |
|
static |
The documentation for this class was generated from the following files: