XrdOfsFS.cc

Go to the documentation of this file.
00001 /******************************************************************************/
00002 /*                                                                            */
00003 /*            X r d S f s G e t D e f a u l t F i l e S y s t e m             */
00004 /*                                                                            */
00005 /* (c) 2010 by the Board of Trustees of the Leland Stanford, Jr., University  */
00006 /*                            All Rights Reserved                             */
00007 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00008 /*              DE-AC02-76-SFO0515 with the Department of Energy              */
00009 /******************************************************************************/
00010 
00011 #include "XrdOfs/XrdOfs.hh"
00012 #include "XrdSys/XrdSysError.hh"
00013 #include "XrdSys/XrdSysPthread.hh"
00014 
00015 // If you are replacing the standard definition of the file system interface,
00016 // with a derived class to perform additional or enhanced functions, you MUST
00017 // define XrdOfsFS to be an instance of your derived class definition. You
00018 // would then create a shared library linking against libXrdOfs.a and manually
00019 // include your definition of XrdOfsFS (obviously upcast to XrdOfs). This
00020 // is how the standard libXrdOfs.so is built.
00021 
00022 // If additional configuration is needed, over-ride the Config() method. At the
00023 // the end of your config, return the result of the XrdOfs::Config().
00024 
00025 XrdOfs XrdOfsFS;
00026   
00027 XrdSfsFileSystem *XrdSfsGetDefaultFileSystem(XrdSfsFileSystem *native_fs,
00028                                              XrdSysLogger     *lp,
00029                                              const char       *configfn)
00030 {
00031    extern XrdSysError OfsEroute;
00032 
00033 // No need to herald this as it's now the default filesystem
00034 //
00035    OfsEroute.SetPrefix("ofs_");
00036    OfsEroute.logger(lp);
00037 
00038 // Initialize the subsystems
00039 //
00040    XrdOfsFS.ConfigFN = (configfn && *configfn ? strdup(configfn) : 0);
00041    if ( XrdOfsFS.Configure(OfsEroute) ) return 0;
00042 
00043 // All done, we can return the callout vector to these routines.
00044 //
00045    return &XrdOfsFS;
00046 }

Generated on Tue Jul 5 14:46:44 2011 for ROOT_528-00b_version by  doxygen 1.5.1