XRootD
Loading...
Searching...
No Matches
XrdPosixMap.hh
Go to the documentation of this file.
1#ifndef __XRDPOSIXMAP_H__
2#define __XRDPOSIXMAP_H__
3/******************************************************************************/
4/* */
5/* X r d P o s i x M a p . h h */
6/* */
7/* (c) 2013 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* All Rights Reserved */
9/* Produced by Andrew Hanushevsky for Stanford University under contract */
10/* DE-AC02-76-SFO0515 with the Department of Energy */
11/* */
12/* This file is part of the XRootD software suite. */
13/* */
14/* XRootD is free software: you can redistribute it and/or modify it under */
15/* the terms of the GNU Lesser General Public License as published by the */
16/* Free Software Foundation, either version 3 of the License, or (at your */
17/* option) any later version. */
18/* */
19/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22/* License for more details. */
23/* */
24/* You should have received a copy of the GNU Lesser General Public License */
25/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27/* */
28/* The copyright holder's institutional names and contributor's names may not */
29/* be used to endorse or promote products derived from this software without */
30/* specific prior written permission of the institution or contributor. */
31/* Modified by Frank Winklmeier to add the full Posix file system definition. */
32/******************************************************************************/
33
36
37#include <cstdint>
38#include <sys/types.h>
39
40// Forward declarations
41class XrdOucECMsg;
42
43struct stat;
44
46{
47public:
48
49static mode_t Flags2Mode(dev_t *rdv, uint32_t flags);
50
51// Convert a directory entry from the XrdCl to the OS's stat.
52// Will return non-zero (EIO) if the directory entry does not include any StatInfo.
53static int Entry2Buf(const XrdCl::DirectoryList::ListEntry &dirEnt, struct stat &buf, XrdOucECMsg &ecMsg);
54
55static XrdCl::Access::Mode Mode2Access(mode_t mode);
56
57static int Result(const XrdCl::XRootDStatus &Status,
58 XrdOucECMsg& ecMsg, bool retneg1=false);
59
60static void SetDebug(bool dbg) {Debug = dbg;}
61
64
65private:
66static int mapCode(int rc);
67static int mapError(int rc);
68static bool Debug;
69};
70#endif
#define stat(a, b)
Definition XrdPosix.hh:101
static mode_t Flags2Mode(dev_t *rdv, uint32_t flags)
static void SetDebug(bool dbg)
static int Entry2Buf(const XrdCl::DirectoryList::ListEntry &dirEnt, struct stat &buf, XrdOucECMsg &ecMsg)
static int Result(const XrdCl::XRootDStatus &Status, XrdOucECMsg &ecMsg, bool retneg1=false)
static XrdCl::Access::Mode Mode2Access(mode_t mode)