XRootD
Loading...
Searching...
No Matches
XrdXrootdLoadLib.cc File Reference
#include <cstdio>
#include "XrdVersion.hh"
#include "XrdOuc/XrdOucEnv.hh"
#include "XrdOuc/XrdOucPinLoader.hh"
#include "XrdSfs/XrdSfsInterface.hh"
#include "XrdSys/XrdSysError.hh"
#include "XrdXrootd/XrdXrootdRedirPI.hh"
+ Include dependency graph for XrdXrootdLoadLib.cc:

Go to the source code of this file.

Functions

XrdSfsFileSystemXrdXrootdloadFileSystem (XrdSysError *eDest, XrdSfsFileSystem *prevFS, const char *fslib, const char *cfn, XrdOucEnv *envP)
 
XrdXrootdRedirPIXrdXrootdloadRedirLib (XrdSysError *eDest, XrdXrootdRedirPI *prevPI, const char *rdrlib, const char *parms, const char *cfn, XrdOucEnv *envP)
 

Function Documentation

◆ XrdXrootdloadFileSystem()

XrdSfsFileSystem * XrdXrootdloadFileSystem ( XrdSysError * eDest,
XrdSfsFileSystem * prevFS,
const char * fslib,
const char * cfn,
XrdOucEnv * envP )

Definition at line 44 of file XrdXrootdLoadLib.cc.

48{
49 static XrdVERSIONINFODEF(myVersion, XrdOfsLoader, XrdVNUMBER, XrdVERSION);
50 XrdOucPinLoader ofsLib(eDest, &myVersion, "fslib", fslib);
53 XrdSfsFileSystem *FS = 0;
54
55// Record the library path in the environment
56//
57 if (!prevFS) XrdOucEnv::Export("XRDOFSLIB", fslib);
58
59// Get the file system object creator and the object (we preferntially try
60// to find the version 2 of the plugin).
61//
62 if ((ep2 = (XrdSfsFileSystem2_t)ofsLib.Resolve("?XrdSfsGetFileSystem2")))
63 { FS = (*ep2)(prevFS, eDest->logger(), cfn, envP);
64 } else {
65 if ((ep = (XrdSfsFileSystem_t )ofsLib.Resolve("XrdSfsGetFileSystem")))
66 FS = (*ep) (prevFS, eDest->logger(), cfn);
67 }
68
69// Issue message if we could not load it
70//
71 if (!FS) eDest->Emsg("Config", "Unable to load file system via", fslib);
72
73// All done
74//
75 return FS;
76}
static XrdSysError eDest(0,"crypto_")
static XrdVERSIONINFODEF(compiledVer, XrdHttpProtocolTest, XrdVNUMBER, XrdVERSION)
XrdSfsFileSystem *(* XrdSfsFileSystem2_t)(XrdSfsFileSystem *nativeFS, XrdSysLogger *Logger, const char *configFn, XrdOucEnv *envP)
XrdSfsFileSystem *(* XrdSfsFileSystem_t)(XrdSfsFileSystem *nativeFS, XrdSysLogger *Logger, const char *configFn)
static int Export(const char *Var, const char *Val)
Definition XrdOucEnv.cc:170

References eDest, XrdOucEnv::Export(), XrdOucPinLoader::Resolve(), and XrdVERSIONINFODEF().

+ Here is the call graph for this function:

◆ XrdXrootdloadRedirLib()

XrdXrootdRedirPI * XrdXrootdloadRedirLib ( XrdSysError * eDest,
XrdXrootdRedirPI * prevPI,
const char * rdrlib,
const char * parms,
const char * cfn,
XrdOucEnv * envP )

Definition at line 82 of file XrdXrootdLoadLib.cc.

87{
88 static XrdVERSIONINFODEF(myVersion, XrdRdrLoader, XrdVNUMBER, XrdVERSION);
89 XrdOucPinLoader rdrLib(eDest, &myVersion, "redirlib", rdrlib);
91 XrdXrootdRedirPI *rdrPI = 0;
92
93// Get the plugin object creator and the resulting plugin
94//
95 if ((ep = (XrdXrootdRedirPI_t)rdrLib.Resolve("XrdXrootGetdRedirPI")))
96 rdrPI = (*ep)(prevPI, eDest->logger(), parms, cfn, envP);
97
98// Issue message if we could not load it
99//
100 if (!rdrPI) eDest->Emsg("Config","Unable to load redirect plugin via",rdrlib);
101
102// All done
103//
104 return rdrPI;
105}
XrdXrootdRedirPI *(* XrdXrootdRedirPI_t)(XrdXrootdRedirPI_Args)

References eDest, XrdOucPinLoader::Resolve(), and XrdVERSIONINFODEF().

+ Here is the call graph for this function: