Skip to content

Commit

Permalink
Provide full error mapping for POSIX interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed Jun 9, 2014
1 parent 7317cd7 commit 27b18b2
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/XrdPosix/XrdPosixMap.cc
Expand Up @@ -104,17 +104,28 @@ int XrdPosixMap::mapCode(int rc)
int XrdPosixMap::mapError(int rc)
{
switch(rc)
{case kXR_NotFound: return ENOENT;
case kXR_NotAuthorized: return EACCES;
{case kXR_ArgInvalid: return EINVAL;
case kXR_ArgMissing: return EINVAL;
case kXR_ArgTooLong: return ENAMETOOLONG;
case kXR_FileLocked: return EDEADLK;
case kXR_FileNotOpen: return EBADF;
case kXR_FSError: return EIO;
case kXR_InvalidRequest:return EEXIST;
case kXR_IOError: return EIO;
case kXR_NoMemory: return ENOMEM;
case kXR_NoSpace: return ENOSPC;
case kXR_ArgTooLong: return ENAMETOOLONG;
case kXR_NotAuthorized: return EACCES;
case kXR_NotFound: return ENOENT;
case kXR_ServerError: return ENOMSG;
case kXR_Unsupported: return ENOSYS;
case kXR_noserver: return EHOSTUNREACH;
case kXR_NotFile: return ENOTBLK;
case kXR_isDirectory: return EISDIR;
case kXR_FSError: return ENOSYS;
default: return ECANCELED;
case kXR_Cancelled: return ECANCELED;
case kXR_ChkLenErr: return EDOM;
case kXR_ChkSumErr: return EDOM;
case kXR_inProgress: return EINPROGRESS;
default: return ENOMSG;
}
}

Expand Down

0 comments on commit 27b18b2

Please sign in to comment.