56 bool XrdPosixMap::Debug =
false;
73 else newflags |= S_IFREG;
92 ecMsg.
Set(EIO,
"Directory entry is missing expected stat information");
96 memset(&buf,
'\0',
sizeof(buf));
97 buf.st_mode =
Flags2Mode(
nullptr, statInfo->GetFlags());
103 if (buf.st_mode & S_IRUSR) buf.st_mode |= S_IROTH;
104 if (buf.st_mode & S_IWUSR) buf.st_mode |= S_IWOTH;
105 if (buf.st_mode & S_IXUSR) buf.st_mode |= S_IXOTH;
106 buf.st_mtime =
static_cast<time_t
>(statInfo->GetModTime());
107 buf.st_ctime = buf.st_mtime;
108 buf.st_size =
static_cast<size_t>(statInfo->GetSize());
109 buf.st_ino =
static_cast<ino_t
>(strtoll(statInfo->GetId().c_str(), 0, 10));
110 buf.st_blocks = buf.st_size/512 + buf.st_size%512;
114 if (statInfo->ExtendedFormat())
115 {buf.st_ctime =
static_cast<time_t
>(statInfo->GetChangeTime());
116 buf.st_atime =
static_cast<time_t
>(statInfo->GetAccessTime());
126 int XrdPosixMap::mapCode(
int rc)
195 if (Status.
IsOK())
return 0;
215 ecMsg = errno = eNum;
216 return (retneg1 ? -1 : -eNum);
static const dev_t XRDSFS_HASBKUP
static const dev_t XRDSFS_OFFLINE
static int toErrno(int xerr)
StatInfo * GetStatInfo()
Get the stat info object.
@ IsReadable
Read access is allowed.
@ IsDir
This is a directory.
@ Other
Neither a file nor a directory.
@ BackUpExists
Back up copy exists.
@ XBitSet
Executable/searchable bit set.
@ Offline
File is not online (ie. on disk)
@ IsWritable
Write access is allowed.
const std::string & GetErrorMessage() const
Get error message.
std::string ToStr() const
Convert to string.
void Set(int ecc, const char *ecm="")
static mode_t Flags2Mode(dev_t *rdv, uint32_t flags)
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)
const uint16_t errQueryNotSupported
const uint16_t errInvalidAddr
const uint16_t errStreamDisconnect
const uint16_t errRedirectLimit
const uint16_t errErrorResponse
const uint16_t errTlsError
const uint16_t errOperationExpired
const uint16_t errNotImplemented
Operation is not implemented.
const uint16_t errLoginFailed
const uint16_t errNoMoreFreeSIDs
const uint16_t errInProgress
const uint16_t errNotFound
const uint16_t errSocketTimeout
const uint16_t errDataError
data is corrupted
const uint16_t errInvalidOp
const uint16_t errHandShakeFailed
const uint16_t errConfig
System misconfigured.
const uint16_t errInvalidResponse
const uint16_t errInvalidArgs
const uint16_t errInvalidRedirectURL
const uint16_t errConnectionError
const uint16_t errNotSupported
const uint16_t errSocketError
const uint16_t errRetry
Try again for whatever reason.
const uint16_t errCheckSumError
const uint16_t errOperationInterrupted
const uint16_t errNoMoreReplicas
No more replicas to try.
const uint16_t errInvalidSession
const uint16_t errSocketDisconnected
const uint16_t errAuthFailed
const uint16_t errInvalidMessage
thread_local XrdOucECMsg ecMsg
@ OX
world executable/browsable
@ GX
group executable/browsable
@ UX
owner executable/browsable
uint16_t code
Error type, or additional hints on what to do.
bool IsOK() const
We're fine.
uint32_t errNo
Errno, if any.