xrootd
|
#include <XrdOucUtils.hh>
Public Member Functions | |
XrdOucUtils () | |
~XrdOucUtils () | |
Static Public Member Functions | |
static char * | eText (int rc, char *eBuff, int eBlen, int AsIs=0) |
static int | doIf (XrdSysError *eDest, XrdOucStream &Config, const char *what, const char *hname, const char *nname, const char *pname) |
static int | fmtBytes (long long val, char *buff, int bsz) |
static char * | genPath (const char *path, const char *inst, const char *psfx=0) |
static int | genPath (char *buff, int blen, const char *path, const char *psfx=0) |
static const char * | InstName (int TranOpt=0) |
static const char * | InstName (const char *name, int Fillit=1) |
static int | is1of (char *val, const char **clist) |
static void | makeHome (XrdSysError &eDest, const char *inst) |
static int | makePath (char *path, mode_t mode) |
static char * | subLogfn (XrdSysError &eDest, const char *inst, char *logfn) |
static void | Undercover (XrdSysError &eDest, int noLog) |
Static Public Attributes | |
static const mode_t | pathMode = S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH |
XrdOucUtils::XrdOucUtils | ( | ) | [inline] |
XrdOucUtils::~XrdOucUtils | ( | ) | [inline] |
int XrdOucUtils::doIf | ( | XrdSysError * | eDest, |
XrdOucStream & | Config, | ||
const char * | what, | ||
const char * | hname, | ||
const char * | nname, | ||
const char * | pname | ||
) | [static] |
References XrdSysError::Emsg(), XrdOucStream::GetWord(), is1of(), and XrdNetDNS::isMatch().
Referenced by XrdOucStream::doif(), main(), XrdCmsConfig::xmang(), XrdCmsClientConfig::xmang(), XrdConfig::xport(), XrdOfs::xred(), XrdOfs::xrole(), and XrdCmsConfig::xrole().
char * XrdOucUtils::eText | ( | int | rc, |
char * | eBuff, | ||
int | eBlen, | ||
int | AsIs = 0 |
||
) | [static] |
References strlcpy().
Referenced by XrdCnsSsi::ApplyLog(), XrdCnsSsiCfg::Configure(), XrdCnsSsi::List(), XrdCnsSsi::Updt(), and XrdCnsSsi::Write().
int XrdOucUtils::fmtBytes | ( | long long | val, |
char * | buff, | ||
int | bsz | ||
) | [static] |
References snprintf.
Referenced by XrdFrmPurge::Display(), XrdFrmPurge::Stats(), and XrdFrmPurge::Track().
char * XrdOucUtils::genPath | ( | const char * | path, |
const char * | inst, | ||
const char * | psfx = 0 |
||
) | [static] |
References strlcpy().
Referenced by XrdOfs::ConfigPosc(), XrdXrootdProtocol::Configure(), XrdCmsClientConfig::Configure(), XrdCmsConfig::Configure2(), XrdFrmUtils::makePath(), XrdXrootdProtocol::PidFile(), XrdCmsConfig::PidFile(), XrdConfig::Setup(), XrdXrootdProtocol::xprep(), and XrdNetCmsNotify::XrdNetCmsNotify().
int XrdOucUtils::genPath | ( | char * | buff, |
int | blen, | ||
const char * | path, | ||
const char * | psfx = 0 |
||
) | [static] |
const char * XrdOucUtils::InstName | ( | int | TranOpt = 0 | ) | [static] |
Referenced by XrdOfs::ConfigPosc(), XrdOssSys::ConfigStage(), XrdPssSys::Configure(), XrdFrmConfig::Configure(), XrdConfig::Configure(), XrdCnsConfig::Configure(), XrdCmsClientConfig::Configure(), XrdCmsConfig::Configure1(), XrdCmsConfig::Configure2(), XrdOssSpace::Init(), main(), XrdXrootdProtocol::PidFile(), XrdCmsConfig::PidFile(), XrdFrmReqAgent::Start(), XrdFrmConfig::XrdFrmConfig(), XrdFrmProxy::XrdFrmProxy(), XrdNetCmsNotify::XrdNetCmsNotify(), XrdOfs::xred(), and XrdOfs::xrole().
const char * XrdOucUtils::InstName | ( | const char * | name, |
int | Fillit = 1 |
||
) | [static] |
int XrdOucUtils::is1of | ( | char * | val, |
const char ** | clist | ||
) | [static] |
Referenced by doIf().
void XrdOucUtils::makeHome | ( | XrdSysError & | eDest, |
const char * | inst | ||
) | [static] |
References chdir(), XrdSysError::Emsg(), MAKEDIR, and pathMode.
Referenced by XrdFrmConfig::Configure(), and XrdConfig::Configure().
int XrdOucUtils::makePath | ( | char * | path, |
mode_t | mode | ||
) | [static] |
References index(), MAKEDIR, and stat().
Referenced by XrdConfig::ASocket(), XrdOfs::ConfigPosc(), XrdCnsConfig::Configure(), XrdOssSys::Create(), XrdCnsLogClient::Init(), XrdFrmUtils::makePath(), XrdFrmUtils::makeQDir(), XrdXrootdProtocol::PidFile(), XrdCmsConfig::PidFile(), XrdOssSys::Reloc(), XrdOssSys::Rename(), XrdSecsssKT::Rewrite(), XrdNetSocket::socketPath(), subLogfn(), and XrdXrootdProtocol::xprep().
char * XrdOucUtils::subLogfn | ( | XrdSysError & | eDest, |
const char * | inst, | ||
char * | logfn | ||
) | [static] |
References XrdSysError::Emsg(), makePath(), rindex, S_IROTH, S_IRWXG, S_IRWXU, and S_IXOTH.
Referenced by XrdFrmConfig::Configure(), and XrdConfig::Configure().
void XrdOucUtils::Undercover | ( | XrdSysError & | eDest, |
int | noLog | ||
) | [static] |
References close, XrdSysError::Emsg(), fork(), and open().
Referenced by XrdFrmConfig::Configure(), and XrdConfig::Configure().
const mode_t XrdOucUtils::pathMode = S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH [static] |
Referenced by makeHome(), XrdXrootdProtocol::PidFile(), XrdCmsConfig::PidFile(), and XrdXrootdProtocol::xprep().