Commit b265af99 authored by Eric Cano's avatar Eric Cano
Browse files

Moved the tape server's classes into castor::tape.

parent 53260ec4
......@@ -35,7 +35,7 @@
int main(int argc, char ** argv) {
try {
Tape::Server::Daemon daemon(argc, argv);
castor::tape::Server::Daemon daemon(argc, argv);
} catch (std::exception & e) {
std::cerr << "Uncaught standard exception in tapeserverd:" << std::endl
<< e.what() << std::endl;
......@@ -46,13 +46,13 @@ int main(int argc, char ** argv) {
}
}
Tape::Server::Daemon::Daemon(int argc, char** argv) throw (Tape::Exception) {
castor::tape::Server::Daemon::Daemon(int argc, char** argv) throw (castor::tape::Exception) {
m_options = getCommandLineOptions(argc, argv);
if (m_options.daemonize) daemonize();
}
Tape::Server::Daemon::options Tape::Server::Daemon::getCommandLineOptions(int argc, char** argv)
throw (Tape::Exception)
castor::tape::Server::Daemon::options castor::tape::Server::Daemon::getCommandLineOptions(int argc, char** argv)
throw (castor::tape::Exception)
{
options ret;
/* Expect -f or --foreground */
......@@ -68,14 +68,14 @@ throw (Tape::Exception)
break;
case ':':
{
Tape::Exceptions::InvalidArgument ex(std::string("The -") + (char) optopt + " option requires a parameter");
castor::tape::Exceptions::InvalidArgument ex(std::string("The -") + (char) optopt + " option requires a parameter");
throw ex;
}
case '?':
{
std::stringstream err("Unknown command-line option");
if (optopt) err << std::string(": -") << optopt;
Tape::Exceptions::InvalidArgument ex(err.str().c_str());
castor::tape::Exceptions::InvalidArgument ex(err.str().c_str());
throw ex;
}
default:
......@@ -83,7 +83,7 @@ throw (Tape::Exception)
std::stringstream err;
err << "getopt_long returned the following unknown value: 0x" <<
std::hex << (int) c;
Tape::Exceptions::InvalidArgument ex(err.str().c_str());
castor::tape::Exceptions::InvalidArgument ex(err.str().c_str());
throw ex;
}
}
......@@ -91,7 +91,7 @@ throw (Tape::Exception)
return ret;
}
void Tape::Server::Daemon::daemonize()
void castor::tape::Server::Daemon::daemonize()
{
pid_t pid, sid;
......@@ -101,7 +101,7 @@ void Tape::Server::Daemon::daemonize()
/* Fork off the parent process */
pid = fork();
if (pid < 0) {
Tape::Exceptions::Errnum e("Failed to fork in Tape::Server::Daemon::daemonize");
castor::tape::Exceptions::Errnum e("Failed to fork in castor::tape::Server::Daemon::daemonize");
throw e;
}
/* If we got a good PID, then we can exit the parent process. */
......@@ -115,22 +115,22 @@ void Tape::Server::Daemon::daemonize()
/* Create a new session for the child process */
sid = setsid();
if (sid < 0) {
Tape::Exceptions::Errnum e("Failed to create new session in Tape::Server::Daemon::daemonize");
castor::tape::Exceptions::Errnum e("Failed to create new session in castor::tape::Server::Daemon::daemonize");
throw e;
}
/* At this point we are executing as the child process, and parent process should be init */
if (getppid() != 1) {
Tape::Exception e("Failed to detach from parent process in Tape::Server::Daemon::daemonize");
castor::tape::Exception e("Failed to detach from parent process in castor::tape::Server::Daemon::daemonize");
throw e;
}
/* Change the current working directory. This prevents the current
directory from being locked; hence not being able to remove it. */
if ((chdir(m_options.runDirectory.c_str())) < 0) {
std::stringstream err("Failed to chdir in Tape::Server::Daemon::daemonize");
std::stringstream err("Failed to chdir in castor::tape::Server::Daemon::daemonize");
err << " ( destination directory: " << m_options.runDirectory << ")";
Tape::Exceptions::Errnum e(err.str());
castor::tape::Exceptions::Errnum e(err.str());
throw e;
}
......
......@@ -25,11 +25,12 @@
#pragma once
#include "../Exception/Exception.hpp"
namespace Tape {
namespace castor {
namespace tape {
namespace Server {
class Daemon {
public:
Daemon (int argc, char ** argv) throw (Tape::Exception);
Daemon (int argc, char ** argv) throw (castor::tape::Exception);
class options {
public:
options(): daemonize(true), runDirectory("/var/log/castor") {}
......@@ -37,9 +38,10 @@ namespace Tape {
std::string runDirectory;
};
private:
options getCommandLineOptions(int argc, char ** argv) throw (Tape::Exception);
options getCommandLineOptions(int argc, char ** argv) throw (castor::tape::Exception);
void daemonize();
options m_options;
};
}
}
}
}
*.aux
*.idx
*.out
*.toc
*converted-to.pdf
*.synctex.gz
*.log
......@@ -229,7 +229,9 @@ The SCSI commands can be found in the SCSI section of Hackipedia.org
{http://hackipedia.org/Hardware/SCSI/Stream\%20Commands/SCSI\%20Stream\%20Commands\%20-\%203.pdf} })
and the SCSI primary commands (SPC-4
\footnote{ \href{http://hackipedia.org/Hardware/SCSI/Primary\%20Commands/SCSI\%20Primary\%20Commands\%20-\%204.pdf}
{http://hackipedia.org/Hardware/SCSI/Primary\%20Commands/SCSI\%20Primary\%20Commands\%20-\%204.pdf} }).
{http://hackipedia.org/Hardware/SCSI/Primary\%20Commands/SCSI\%20Primary\%20Commands\%20-\%204.pdf} }
\footnote{ Latest drafts can be downloaded from \href{http://www.t10.org/members/w_spc4.htm}
{http://www.t10.org/members/w_spc4.htm} } ).
\subsubsection{Manufacturer's specificities}
\label{Manufacturer's specificities}
......
This diff is collapsed.
......@@ -36,7 +36,9 @@
* Class wrapping the tape server. Has to be templated (and hence fully in .hh)
* to allow unit testing against system wrapper.
*/
namespace Tape {
namespace castor {
namespace tape {
namespace drives {
/**
* Compressions statistics container, returned by Drive::getCompression()
......@@ -320,7 +322,7 @@ namespace Tape {
protected:
SCSI::DeviceInfo m_SCSIInfo;
int m_tapeFD;
Tape::System::virtualWrapper & m_sysWrapper;
castor::tape::System::virtualWrapper & m_sysWrapper;
struct mtget m_mtInfo;
private:
/**
......@@ -370,7 +372,7 @@ namespace Tape {
} else if (di.product.find("03592")) {
m_drive = new DriveIBM3592(di, sw);
} else {
throw Tape::Exception(std::string("Unsupported drive type: ")+di.product);
throw Exception(std::string("Unsupported drive type: ")+di.product);
}
}
~Drive() {
......@@ -383,4 +385,6 @@ namespace Tape {
DriveGeneric * m_drive;
};
}
} // namespace drives
} // namespace tape
} // namespace castor
......@@ -37,7 +37,7 @@ namespace UnitTests {
TEST(TapeDrive, OpensCorrectly) {
/* Prepare the test harness */
Tape::System::mockWrapper sysWrapper;
castor::tape::System::mockWrapper sysWrapper;
sysWrapper.fake.setupSLC5();
sysWrapper.delegateToFake();
......@@ -55,18 +55,18 @@ TEST(TapeDrive, OpensCorrectly) {
EXPECT_CALL(sysWrapper, stat(_,_)).Times(7);
/* Test: detect devices, then open the device files */
SCSI::DeviceVector dl(sysWrapper);
for (std::vector<SCSI::DeviceInfo>::iterator i = dl.begin();
castor::tape::SCSI::DeviceVector dl(sysWrapper);
for (std::vector<castor::tape::SCSI::DeviceInfo>::iterator i = dl.begin();
i != dl.end(); i++) {
if (SCSI::Types::tape == i->type) {
Tape::Drive drive(*i, sysWrapper);
if (castor::tape::SCSI::Types::tape == i->type) {
castor::tape::drives::Drive drive(*i, sysWrapper);
}
}
}
TEST(TapeDrive, getPositionInfoAndPositionToLogicalObject) {
/* Prepare the test harness */
Tape::System::mockWrapper sysWrapper;
castor::tape::System::mockWrapper sysWrapper;
sysWrapper.fake.setupSLC5();
sysWrapper.delegateToFake();
......@@ -84,15 +84,15 @@ TEST(TapeDrive, getPositionInfoAndPositionToLogicalObject) {
EXPECT_CALL(sysWrapper, stat(_,_)).Times(7);
/* Test: detect devices, then open the device files */
SCSI::DeviceVector dl(sysWrapper);
for (std::vector<SCSI::DeviceInfo>::iterator i = dl.begin();
castor::tape::SCSI::DeviceVector dl(sysWrapper);
for (std::vector<castor::tape::SCSI::DeviceInfo>::iterator i = dl.begin();
i != dl.end(); i++) {
if (SCSI::Types::tape == i->type) {
Tape::Drive dContainer(*i, sysWrapper);
if (castor::tape::SCSI::Types::tape == i->type) {
castor::tape::drives::Drive dContainer(*i, sysWrapper);
/* Compiler cannot implicitly use the conversion operator. Create an
* intermediate reference*/
Tape::DriveGeneric & drive = dContainer;
Tape::positionInfo posInfo;
castor::tape::drives::DriveGeneric & drive = dContainer;
castor::tape::drives::positionInfo posInfo;
EXPECT_CALL(sysWrapper, ioctl(_,_,An<sg_io_hdr_t*>())).Times(1);
posInfo = drive.getPositionInfo();
......@@ -117,7 +117,7 @@ TEST(TapeDrive, getPositionInfoAndPositionToLogicalObject) {
}
TEST(TapeDrive, setDensityAndCompression) {
/* Prepare the test harness */
Tape::System::mockWrapper sysWrapper;
castor::tape::System::mockWrapper sysWrapper;
sysWrapper.fake.setupSLC5();
sysWrapper.delegateToFake();
......@@ -135,14 +135,14 @@ TEST(TapeDrive, setDensityAndCompression) {
EXPECT_CALL(sysWrapper, stat(_,_)).Times(7);
/* Test: detect devices, then open the device files */
SCSI::DeviceVector dl(sysWrapper);
for (std::vector<SCSI::DeviceInfo>::iterator i = dl.begin();
castor::tape::SCSI::DeviceVector dl(sysWrapper);
for (std::vector<castor::tape::SCSI::DeviceInfo>::iterator i = dl.begin();
i != dl.end(); i++) {
if (SCSI::Types::tape == i->type) {
Tape::Drive dContainer(*i, sysWrapper);
if (castor::tape::SCSI::Types::tape == i->type) {
castor::tape::drives::Drive dContainer(*i, sysWrapper);
/* Compiler cannot implicitly use the conversion operator. Create an
* intermediate reference*/
Tape::DriveGeneric & drive = dContainer;
castor::tape::drives::DriveGeneric & drive = dContainer;
EXPECT_CALL(sysWrapper, ioctl(_,_,An<sg_io_hdr_t*>())).Times(2);
drive.setDensityAndCompression();
......@@ -164,7 +164,7 @@ TEST(TapeDrive, setDensityAndCompression) {
TEST(TapeDrive, setStDriverOptions) {
/* Prepare the test harness */
Tape::System::mockWrapper sysWrapper;
castor::tape::System::mockWrapper sysWrapper;
sysWrapper.fake.setupSLC5();
sysWrapper.delegateToFake();
......@@ -182,13 +182,13 @@ TEST(TapeDrive, setStDriverOptions) {
EXPECT_CALL(sysWrapper, stat(_,_)).Times(7);
/* Test: detect devices, then open the device files */
SCSI::DeviceVector dl(sysWrapper);
for (std::vector<SCSI::DeviceInfo>::iterator i = dl.begin(); i != dl.end(); i++) {
if (SCSI::Types::tape == i->type) {
Tape::Drive dContainer(*i, sysWrapper);
castor::tape::SCSI::DeviceVector dl(sysWrapper);
for (std::vector<castor::tape::SCSI::DeviceInfo>::iterator i = dl.begin(); i != dl.end(); i++) {
if (castor::tape::SCSI::Types::tape == i->type) {
castor::tape::drives::Drive dContainer(*i, sysWrapper);
/* Compiler cannot implicitly use the conversion operator. Create an
* intermediate reference*/
Tape::DriveGeneric & drive = dContainer;
castor::tape::drives::DriveGeneric & drive = dContainer;
EXPECT_CALL(sysWrapper, ioctl(_,_,An<struct mtop *>())).Times(1);
drive.setSTBufferWrite(true);
......@@ -201,7 +201,7 @@ TEST(TapeDrive, setStDriverOptions) {
TEST(TapeDrive, getDeviceInfo) {
/* Prepare the test harness */
Tape::System::mockWrapper sysWrapper;
castor::tape::System::mockWrapper sysWrapper;
sysWrapper.fake.setupSLC5();
sysWrapper.delegateToFake();
......@@ -219,15 +219,15 @@ TEST(TapeDrive, getDeviceInfo) {
EXPECT_CALL(sysWrapper, stat(_,_)).Times(7);
/* Test: detect devices, then open the device files */
SCSI::DeviceVector dl(sysWrapper);
for (std::vector<SCSI::DeviceInfo>::iterator i = dl.begin();
castor::tape::SCSI::DeviceVector dl(sysWrapper);
for (std::vector<castor::tape::SCSI::DeviceInfo>::iterator i = dl.begin();
i != dl.end(); i++) {
if (SCSI::Types::tape == i->type) {
Tape::Drive dContainer(*i, sysWrapper);
if (castor::tape::SCSI::Types::tape == i->type) {
castor::tape::drives::Drive dContainer(*i, sysWrapper);
/* Compiler cannot implicitly use the conversion operator. Create an
* intermediate reference*/
Tape::DriveGeneric & drive = dContainer;
Tape::deviceInfo devInfo;
castor::tape::drives::DriveGeneric & drive = dContainer;
castor::tape::drives::deviceInfo devInfo;
EXPECT_CALL(sysWrapper, ioctl(_,_,An<sg_io_hdr_t*>())).Times(2);
devInfo = drive.getDeviceInfo();
......@@ -242,7 +242,7 @@ TEST(TapeDrive, getDeviceInfo) {
TEST(TapeDrive, getCompressionAndClearCompressionStats) {
/* Prepare the test harness */
Tape::System::mockWrapper sysWrapper;
castor::tape::System::mockWrapper sysWrapper;
sysWrapper.fake.setupSLC5();
sysWrapper.delegateToFake();
......@@ -260,15 +260,15 @@ TEST(TapeDrive, getCompressionAndClearCompressionStats) {
EXPECT_CALL(sysWrapper, stat(_,_)).Times(7);
/* Test: detect devices, then open the device files */
SCSI::DeviceVector dl(sysWrapper);
for (std::vector<SCSI::DeviceInfo>::iterator i = dl.begin();
castor::tape::SCSI::DeviceVector dl(sysWrapper);
for (std::vector<castor::tape::SCSI::DeviceInfo>::iterator i = dl.begin();
i != dl.end(); i++) {
if (SCSI::Types::tape == i->type) {
Tape::DriveGeneric *drive;
Tape::compressionStats comp;
if (castor::tape::SCSI::Types::tape == i->type) {
castor::tape::drives::DriveGeneric *drive;
castor::tape::drives::compressionStats comp;
{
drive = new Tape::DriveT10000(*i, sysWrapper);
drive = new castor::tape::drives::DriveT10000(*i, sysWrapper);
EXPECT_CALL(sysWrapper, ioctl(_, _, An<sg_io_hdr_t*>())).Times(1);
comp = drive->getCompression();
......@@ -290,7 +290,7 @@ TEST(TapeDrive, getCompressionAndClearCompressionStats) {
delete drive;
}
{
drive = new Tape::DriveIBM3592(*i, sysWrapper);
drive = new castor::tape::drives::DriveIBM3592(*i, sysWrapper);
EXPECT_CALL(sysWrapper, ioctl(_, _, An<sg_io_hdr_t*>())).Times(1);
comp = drive->getCompression();
......@@ -312,7 +312,7 @@ TEST(TapeDrive, getCompressionAndClearCompressionStats) {
delete drive;
}
{
drive = new Tape::DriveLTO(*i, sysWrapper);
drive = new castor::tape::drives::DriveLTO(*i, sysWrapper);
EXPECT_CALL(sysWrapper, ioctl(_, _, An<sg_io_hdr_t*>())).Times(1);
comp = drive->getCompression();
......@@ -344,7 +344,7 @@ TEST(TapeDrive, getTapeAlerts) {
* SLC6).
*/
struct {
void operator() (Tape::System::mockWrapper & sysWrapper) {
void operator() (castor::tape::System::mockWrapper & sysWrapper) {
/* We expect the following calls: */
EXPECT_CALL(sysWrapper, opendir(_)).Times(AtLeast(3));
EXPECT_CALL(sysWrapper, readdir(_)).Times(AtLeast(30));
......@@ -359,14 +359,14 @@ TEST(TapeDrive, getTapeAlerts) {
EXPECT_CALL(sysWrapper, stat(_, _)).Times(AtLeast(7));
/* Test: detect devices, then open the device files */
SCSI::DeviceVector dl(sysWrapper);
for (std::vector<SCSI::DeviceInfo>::iterator i = dl.begin();
castor::tape::SCSI::DeviceVector dl(sysWrapper);
for (std::vector<castor::tape::SCSI::DeviceInfo>::iterator i = dl.begin();
i != dl.end(); i++) {
if (SCSI::Types::tape == i->type) {
Tape::Drive dContainer(*i, sysWrapper);
if (castor::tape::SCSI::Types::tape == i->type) {
castor::tape::drives::Drive dContainer(*i, sysWrapper);
/* Compiler cannot implicitly use the conversion operator. Create an
* intermediate reference*/
Tape::DriveGeneric & drive = dContainer;
castor::tape::drives::DriveGeneric & drive = dContainer;
EXPECT_CALL(sysWrapper, ioctl(_, _, An<sg_io_hdr_t*>())).Times(1);
std::vector<std::string> alerts = drive.getTapeAlerts();
ASSERT_EQ(3U, alerts.size());
......@@ -384,8 +384,8 @@ TEST(TapeDrive, getTapeAlerts) {
/* Prepare the test harness */
Tape::System::mockWrapper sysWrapperSLC5;
Tape::System::mockWrapper sysWrapperSLC6;
castor::tape::System::mockWrapper sysWrapperSLC5;
castor::tape::System::mockWrapper sysWrapperSLC6;
sysWrapperSLC5.fake.setupSLC5();
sysWrapperSLC6.fake.setupSLC6();
sysWrapperSLC5.delegateToFake();
......
......@@ -38,7 +38,7 @@
* assertion and exits.
* @param expected_position expected position
*/
void print_and_assert_position(Tape::DriveGeneric &drive, int expected_position)
void print_and_assert_position(castor::tape::drives::DriveGeneric &drive, int expected_position)
{
int curPos = (int)drive.getPositionInfo().currentPosition;
std::cout << "CurrentPosition: " << curPos << " (Expected: " << expected_position << ")" << std::endl;
......@@ -62,19 +62,19 @@ void print_and_assert_data(const char * expected_data, const char * actual_data)
int main ()
{
int fail = 0;
Tape::System::realWrapper sWrapper;
SCSI::DeviceVector dl(sWrapper);
for(SCSI::DeviceVector::iterator i = dl.begin();
castor::tape::System::realWrapper sWrapper;
castor::tape::SCSI::DeviceVector dl(sWrapper);
for(castor::tape::SCSI::DeviceVector::iterator i = dl.begin();
i != dl.end(); i++) {
SCSI::DeviceInfo & dev = (*i);
castor::tape::SCSI::DeviceInfo & dev = (*i);
std::cout << std::endl << "-- SCSI device: "
<< dev.sg_dev << " (" << dev.nst_dev << ")" << std::endl;
if (dev.type == SCSI::Types::tape) {
Tape::Drive dContainer(dev, sWrapper);
if (dev.type == castor::tape::SCSI::Types::tape) {
castor::tape::drives::Drive dContainer(dev, sWrapper);
/* Compiler cannot implicitly use the conversion operator. Create an
* intermediate reference*/
Tape::DriveGeneric & drive = dContainer;
Tape::deviceInfo devInfo;
castor::tape::drives::DriveGeneric & drive = dContainer;
castor::tape::drives::deviceInfo devInfo;
try {
devInfo = drive.getDeviceInfo();
......@@ -115,7 +115,7 @@ int main ()
}
try {
Tape::positionInfo posInfo = drive.getPositionInfo();
castor::tape::drives::positionInfo posInfo = drive.getPositionInfo();
std::cout << "-- INFO --------------------------------------" << std::endl
<< " posInfo.currentPosition : " << posInfo.currentPosition <<std::endl
<< " posInfo.oldestDirtyObject : "<< posInfo.oldestDirtyObject <<std::endl
......@@ -146,7 +146,7 @@ int main ()
* Trying to get compression from the drive. Read or write should be
* done before to have something in the data fields.
*/
Tape::compressionStats comp = drive.getCompression();
castor::tape::drives::compressionStats comp = drive.getCompression();
std::cout << "-- INFO --------------------------------------" << std::endl
<< " fromHost : " << comp.fromHost << std::endl
<< " toHost : " << comp.toHost << std::endl
......
......@@ -38,22 +38,24 @@
/* TODO remove me: it should be temporary */
#include <iostream>
const char * Tape::Exception::what() const throw () {
using namespace castor::tape;
const char * Exception::what() const throw () {
return m_what.c_str();
}
const char * Tape::Exception::shortWhat() const throw () {
const char * Exception::shortWhat() const throw () {
return m_shortWhat.c_str();
}
void Tape::Exception::setWhat(const std::string& what) {
void Exception::setWhat(const std::string& what) {
std::stringstream w;
w << what << std::endl << std::string(backtrace);
m_what = w.str();
m_shortWhat = what;
}
Tape::Exceptions::Errnum::Errnum(std::string what):Exception("") {
Exceptions::Errnum::Errnum(std::string what):Exception("") {
m_errnum = errno;
char s[1000];
/* _XOPEN_SOURCE seems not to work. */
......@@ -74,7 +76,7 @@ Tape::Exceptions::Errnum::Errnum(std::string what):Exception("") {
setWhat(w2.str());
}
Tape::Exceptions::Backtrace::Backtrace() {
Exceptions::Backtrace::Backtrace() {
void * array[200];
size_t depth = ::backtrace(array, sizeof(array)/sizeof(void*));
char ** strings = ::backtrace_symbols(array, depth);
......
......@@ -26,7 +26,8 @@
#include <exception>
#include <string>
namespace Tape {
namespace castor {
namespace tape {
namespace Exceptions {
class Backtrace {
......@@ -44,7 +45,7 @@ namespace Tape {
virtual ~Exception() throw() {};
virtual const char * what() const throw();
virtual const char * shortWhat() const throw();
Tape::Exceptions::Backtrace backtrace;
Exceptions::Backtrace backtrace;
protected:
void setWhat(const std::string &w);
private:
......@@ -53,7 +54,7 @@ namespace Tape {
};
namespace Exceptions {
class Errnum: public Tape::Exception {
class Errnum: public Exception {
public:
Errnum(std::string what = "");
virtual ~Errnum() throw() {};
......@@ -66,8 +67,9 @@ namespace Tape {
std::string m_strerror;
};
class InvalidArgument: public Tape::Exception {
public: InvalidArgument(std::string what = ""): Tape::Exception(what) {};
class InvalidArgument: public Exception {
public: InvalidArgument(std::string what = ""): Exception(what) {};
};
}
}
} //namespace tape
} //namespace castor
......@@ -38,7 +38,7 @@ namespace UnitTests {
/* Prevent inlining: it makes this test fail! */
void __attribute__((noinline)) Nested::f1() {
throw Tape::Exception("");
throw castor::tape::Exception("");
}
/* Prevent inlining: it makes this test fail!
......@@ -55,10 +55,10 @@ namespace UnitTests {
TEST(Exceptions, stacktrace_with_demangling) {
try {
Nested x;
} catch (Tape::Exception & e) {
} catch (castor::tape::Exception & e) {
std::string bt = e.backtrace;
ASSERT_NE(std::string::npos, bt.find("Nested::f1"));
ASSERT_NE(std::string::npos, bt.find("Tape::Exceptions::Backtrace::Backtrace"));
ASSERT_NE(std::string::npos, bt.find("castor::tape::Exceptions::Backtrace::Backtrace"));
ASSERT_EQ("", std::string(e.shortWhat()));
std::string fullWhat(e.what());
ASSERT_NE(std::string::npos, fullWhat.find("Nested::f1"));
......@@ -69,7 +69,7 @@ namespace UnitTests {
/* Mickey Mouse test as we had trouble which throwing Errnum (with errno=ENOENT)*/
errno = ENOENT;
try {
throw Tape::Exceptions::Errnum("Test ENOENT");
throw castor::tape::Exceptions::Errnum("Test ENOENT");
} catch (std::exception & e) {
std::string temp = e.what();
temp += " ";
......
......@@ -27,41 +27,43 @@
#include <time.h>
#include <stdio.h>
void Tape::AULFile::VOL1::fill(std::string vsn) {
using namespace castor::tape;
void AULFile::VOL1::fill(std::string vsn) {
setString(label, "VOL1");