XRootD
XrdOssStatsConfig.cc File Reference
#include "XrdVersion.hh"
#include "XrdOssStatsConfig.hh"
#include "XrdOssStatsFileSystem.hh"
#include "XrdSys/XrdSysError.hh"
#include <sstream>
+ Include dependency graph for XrdOssStatsConfig.cc:

Go to the source code of this file.

Functions

XrdOssXrdOssAddStorageSystem2 (XrdOss *curr_oss, XrdSysLogger *logger, const char *config_fn, const char *parms, XrdOucEnv *envP)
 
 XrdVERSIONINFO (XrdOssAddStorageSystem2, fsstats)
 

Function Documentation

◆ XrdOssAddStorageSystem2()

XrdOss* XrdOssAddStorageSystem2 ( XrdOss curr_oss,
XrdSysLogger logger,
const char *  config_fn,
const char *  parms,
XrdOucEnv envP 
)

Definition at line 107 of file XrdOssStatsConfig.cc.

112 {
113 
114  XrdSysError log(logger, "fsstats_");
115  std::unique_ptr<XrdOssStats::FileSystem> new_oss(new XrdOssStats::FileSystem(curr_oss, logger, config_fn, envP));
116  if (!new_oss) {
117  return nullptr;
118  }
119  std::string errMsg;
120  if (!new_oss->InitSuccessful(errMsg)) {
121  if (errMsg.empty()) { // Initialization failure was non-fatal; just bypass this module.
122  return curr_oss;
123  } else {
124  log.Emsg("Initialize", "Encountered a fatal XrdOssStats initialization failure:", errMsg.c_str());
125  return nullptr;
126  }
127  }
128  return new_oss.release();
129 }
XrdOucEnv * envP
Definition: XrdPss.cc:109

References XrdSysError::Emsg(), and XrdProxy::envP.

+ Here is the call graph for this function:

◆ XrdVERSIONINFO()

XrdVERSIONINFO ( XrdOssAddStorageSystem2  ,
fsstats   
)