Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
1051b827
Commit
1051b827
authored
Oct 19, 2015
by
Daniele Kruse
Browse files
Removed the tmp part of the path in the mock namespace error messages
parent
22af2a81
Changes
2
Hide whitespace changes
Inline
Side-by-side
nameserver/mockNS/MockNameServer.cpp
View file @
1051b827
...
...
@@ -42,14 +42,14 @@ void cta::MockNameServer::assertFsDirExists(const std::string &path) const {
if
(
::
stat
(
path
.
c_str
(),
&
statResult
))
{
const
int
savedErrno
=
errno
;
std
::
ostringstream
msg
;
msg
<<
__FUNCTION__
<<
" - "
<<
path
<<
" stat error. Reason: "
<<
msg
<<
__FUNCTION__
<<
" - "
<<
path
.
substr
(
m_fsDir
.
size
())
<<
" stat error. Reason: "
<<
Utils
::
errnoToString
(
savedErrno
);
throw
(
exception
::
Exception
(
msg
.
str
()));
}
if
(
!
S_ISDIR
(
statResult
.
st_mode
))
{
std
::
ostringstream
msg
;
msg
<<
"assertFsDirExists() - "
<<
path
<<
" is not a directory"
;
msg
<<
__FUNCTION__
<<
" - "
<<
path
.
substr
(
m_fsDir
.
size
())
<<
" is not a directory"
;
throw
(
exception
::
Exception
(
msg
.
str
()));
}
}
...
...
@@ -63,14 +63,14 @@ void cta::MockNameServer::assertFsFileExists(const std::string &path) const {
if
(
::
stat
(
path
.
c_str
(),
&
statResult
))
{
const
int
savedErrno
=
errno
;
std
::
ostringstream
msg
;
msg
<<
__FUNCTION__
<<
" - "
<<
path
<<
" stat error. Reason: "
<<
msg
<<
__FUNCTION__
<<
" - "
<<
path
.
substr
(
m_fsDir
.
size
())
<<
" stat error. Reason: "
<<
Utils
::
errnoToString
(
savedErrno
);
throw
(
exception
::
Exception
(
msg
.
str
()));
}
if
(
!
S_ISREG
(
statResult
.
st_mode
))
{
std
::
ostringstream
msg
;
msg
<<
"assertFsFileExists() - "
<<
path
<<
" is not a regular file"
;
msg
<<
__FUNCTION__
<<
" - "
<<
path
.
substr
(
m_fsDir
.
size
())
<<
" is not a regular file"
;
throw
(
exception
::
Exception
(
msg
.
str
()));
}
}
...
...
@@ -84,7 +84,7 @@ void cta::MockNameServer::assertFsPathDoesNotExist(const std::string &path)
if
(
::
stat
(
path
.
c_str
(),
&
statResult
)
==
0
)
{
std
::
ostringstream
msg
;
msg
<<
"assertFsPathExist() - "
<<
path
<<
" exists."
;
msg
<<
__FUNCTION__
<<
" - "
<<
path
.
substr
(
m_fsDir
.
size
())
<<
" exists."
;
throw
(
exception
::
Exception
(
msg
.
str
()));
}
}
...
...
@@ -489,7 +489,7 @@ void cta::MockNameServer::createDir(const SecurityIdentity &requester,
if
(
mkdir
(
fsPath
.
c_str
(),
0755
))
{
const
int
savedErrno
=
errno
;
std
::
ostringstream
msg
;
msg
<<
__FUNCTION__
<<
" - mkdir "
<<
fsP
ath
<<
" error. Reason:
\n
"
<<
msg
<<
__FUNCTION__
<<
" - mkdir "
<<
p
ath
<<
" error. Reason:
\n
"
<<
Utils
::
errnoToString
(
savedErrno
);
throw
(
exception
::
Exception
(
msg
.
str
()));
}
...
...
@@ -515,7 +515,7 @@ void cta::MockNameServer::deleteFile(const SecurityIdentity &requester, const st
if
(
unlink
(
fsPath
.
c_str
()))
{
const
int
savedErrno
=
errno
;
std
::
ostringstream
msg
;
msg
<<
__FUNCTION__
<<
" - unlink "
<<
fsP
ath
<<
" error. Reason:
\n
"
<<
msg
<<
__FUNCTION__
<<
" - unlink "
<<
p
ath
<<
" error. Reason:
\n
"
<<
Utils
::
errnoToString
(
savedErrno
);
throw
(
exception
::
Exception
(
msg
.
str
()));
}
...
...
@@ -538,7 +538,7 @@ void cta::MockNameServer::deleteDir(const SecurityIdentity &requester,
if
(
rmdir
(
fsPath
.
c_str
()))
{
const
int
savedErrno
=
errno
;
std
::
ostringstream
msg
;
msg
<<
__FUNCTION__
<<
" - rmdir "
<<
fsP
ath
<<
" error. Reason:
\n
"
<<
msg
<<
__FUNCTION__
<<
" - rmdir "
<<
p
ath
<<
" error. Reason:
\n
"
<<
Utils
::
errnoToString
(
savedErrno
);
throw
(
exception
::
Exception
(
msg
.
str
()));
}
...
...
@@ -563,7 +563,7 @@ std::unique_ptr<cta::ArchiveFileStatus> cta::MockNameServer::statFile(
}
std
::
ostringstream
msg
;
msg
<<
__FUNCTION__
<<
" - "
<<
fsP
ath
<<
" stat error. Reason: "
<<
msg
<<
__FUNCTION__
<<
" - "
<<
p
ath
<<
" stat error. Reason: "
<<
Utils
::
errnoToString
(
savedErrno
);
throw
(
exception
::
Exception
(
msg
.
str
()));
}
...
...
@@ -585,7 +585,7 @@ std::list<cta::ArchiveDirEntry> cta::MockNameServer::getDirEntries(
if
(
dp
==
NULL
)
{
const
int
savedErrno
=
errno
;
std
::
ostringstream
msg
;
msg
<<
__FUNCTION__
<<
" - opendir "
<<
fsP
ath
<<
" error. Reason:
\n
"
msg
<<
__FUNCTION__
<<
" - opendir "
<<
p
ath
<<
" error. Reason:
\n
"
<<
Utils
::
errnoToString
(
savedErrno
);
throw
(
exception
::
Exception
(
msg
.
str
()));
}
...
...
@@ -620,7 +620,7 @@ cta::ArchiveDirEntry cta::MockNameServer::getArchiveDirEntry(
if
(
::
stat
(
fsPath
.
c_str
(),
&
statResult
))
{
const
int
savedErrno
=
errno
;
std
::
ostringstream
msg
;
msg
<<
__FUNCTION__
<<
" - "
<<
fsP
ath
<<
" stat error. Reason: "
<<
msg
<<
__FUNCTION__
<<
" - "
<<
p
ath
<<
" stat error. Reason: "
<<
Utils
::
errnoToString
(
savedErrno
);
throw
(
exception
::
Exception
(
msg
.
str
()));
}
...
...
@@ -651,7 +651,7 @@ cta::ArchiveDirEntry cta::MockNameServer::getArchiveDirEntry(
tapeCopies
=
getTapeFiles
(
requester
,
path
);
}
else
{
std
::
ostringstream
msg
;
msg
<<
"statFile() - "
<<
m_fsDir
+
path
<<
msg
<<
"statFile() - "
<<
path
<<
" is neither a directory nor a regular file"
;
throw
(
exception
::
Exception
(
msg
.
str
()));
}
...
...
xroot_plugins/XrdCtaFile.cpp
View file @
1051b827
...
...
@@ -1089,7 +1089,7 @@ std::string fromDriveStatusToString(cta::DriveStatus status) {
case
cta
::
DriveStatus
::
Starting
:
return
"Starting"
;
case
cta
::
DriveStatus
::
Transfering
:
return
"Transfering"
;
return
"Transfer
r
ing"
;
case
cta
::
DriveStatus
::
Unloading
:
return
"Unloading"
;
case
cta
::
DriveStatus
::
Unmounting
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment