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
53260ec4
Commit
53260ec4
authored
Dec 05, 2013
by
Eric Cano
Browse files
Moved the tape server's files into castor-style names.
parent
da1fbc3f
Changes
42
Hide whitespace changes
Inline
Side-by-side
castor/tape/tapeserver/AUTHORS
View file @
53260ec4
Th
is project
has been actively developed by (ordered by first contribution):
Th
e tape server
has been actively developed by (ordered by first contribution):
Eric Cano <Eric.Cano@cern.ch>
Daniele Francesco Kruse <daniele.francesco.kruse@cern.ch>
Victor Kotlyar' <Victor.Kotlyar@ihep.ru>
\ No newline at end of file
Victor Kotlyar' <Victor.Kotlyar@ihep.ru>
Steven Murray <Steven.Murray@cern.ch>
\ No newline at end of file
castor/tape/tapeserver/Daemon/CMakeLists.txt
View file @
53260ec4
add_executable
(
tapeserverd tapeserverd.c
c
)
add_executable
(
tapeserverd tapeserverd.c
pp
)
target_link_libraries
(
tapeserverd Exception SCSI System Utils File
)
\ No newline at end of file
castor/tape/tapeserver/Daemon/tapeserverd.c
c
→
castor/tape/tapeserver/Daemon/tapeserverd.c
pp
View file @
53260ec4
// ----------------------------------------------------------------------
// File: Daemon/tapeserverd.cc
// ----------------------------------------------------------------------
/************************************************************************
* Tape Server *
* Copyright (C) 2013 CERN/Switzerland *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
************************************************************************/
/******************************************************************************
* tapeserverd.cpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include
<iostream>
#include
<exception>
...
...
@@ -29,7 +31,7 @@
#include
<sys/stat.h>
#include
<sstream>
#include
"tapeserverd.h
h
"
#include
"tapeserverd.h
pp
"
int
main
(
int
argc
,
char
**
argv
)
{
try
{
...
...
castor/tape/tapeserver/Daemon/tapeserverd.h
h
→
castor/tape/tapeserver/Daemon/tapeserverd.h
pp
View file @
53260ec4
// ----------------------------------------------------------------------
// File: Daemon/tapeserverd.hh
// ----------------------------------------------------------------------
/************************************************************************
* Tape Server *
* Copyright (C) 2013 CERN/Switzerland *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
************************************************************************/
/******************************************************************************
* tapeserverd.hpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
#include
"../Exception/Exception.h
h
"
#include
"../Exception/Exception.h
pp
"
namespace
Tape
{
namespace
Server
{
...
...
castor/tape/tapeserver/Drive/CMakeLists.txt
View file @
53260ec4
add_library
(
TapeDrive Drive.c
c
)
set_property
(
SOURCE Drive.c
c
add_library
(
TapeDrive Drive.c
pp
)
set_property
(
SOURCE Drive.c
pp
PROPERTY COMPILE_FLAGS -fno-strict-aliasing
)
add_executable
(
TapeDriveReadWriteTest TapeDriveReadWriteTest.c
c
)
add_executable
(
TapeDriveReadWriteTest TapeDriveReadWriteTest.c
pp
)
target_link_libraries
(
TapeDriveReadWriteTest TapeDrive Exception SCSI System Utils
${
GTEST_LIBRARY
}
gmock pthread
)
install
(
TARGETS TapeDriveReadWriteTest
...
...
castor/tape/tapeserver/Drive/Drive.c
c
→
castor/tape/tapeserver/Drive/Drive.c
pp
View file @
53260ec4
// ----------------------------------------------------------------------
// File: Drive/Drive.cc
// ----------------------------------------------------------------------
/************************************************************************
* Tape Server *
* Copyright (C) 2013 CERN/Switzerland *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
************************************************************************/
#include
"Drive.hh"
/******************************************************************************
* Drive.cpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include
"Drive.hpp"
Tape
::
DriveGeneric
::
DriveGeneric
(
SCSI
::
DeviceInfo
di
,
System
::
virtualWrapper
&
sw
)
:
m_SCSIInfo
(
di
),
m_tapeFD
(
-
1
),
m_sysWrapper
(
sw
)
{
...
...
castor/tape/tapeserver/Drive/Drive.h
h
→
castor/tape/tapeserver/Drive/Drive.h
pp
View file @
53260ec4
// ----------------------------------------------------------------------
// File: Drive/Drive.hh
// ----------------------------------------------------------------------
/************************************************************************
* Tape Server *
* Copyright (C) 2013 CERN/Switzerland *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
************************************************************************/
/******************************************************************************
* Drive.hpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
#include
"../SCSI/Device.h
h
"
#include
"../SCSI/Structures.h
h
"
#include
"../SCSI/Exception.h
h
"
#include
"../System/Wrapper.h
h
"
#include
"../Exception/Exception.h
h
"
#include
"../SCSI/Device.h
pp
"
#include
"../SCSI/Structures.h
pp
"
#include
"../SCSI/Exception.h
pp
"
#include
"../System/Wrapper.h
pp
"
#include
"../Exception/Exception.h
pp
"
#include
"mtio_add.h
h
"
#include
"mtio_add.h
pp
"
/**
* Class wrapping the tape server. Has to be templated (and hence fully in .hh)
...
...
castor/tape/tapeserver/Drive/DriveTest.c
c
→
castor/tape/tapeserver/Drive/DriveTest.c
pp
View file @
53260ec4
// ----------------------------------------------------------------------
// File: SCSI/DriveTest.cc
// ----------------------------------------------------------------------
/************************************************************************
* Tape Server *
* Copyright (C) 2013 CERN/Switzerland *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
************************************************************************/
/******************************************************************************
* DriveTest.cpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include
<gtest/gtest.h>
#include
<gmock/gmock-cardinalities.h>
#include
"../SCSI/Device.h
h
"
#include
"../System/Wrapper.h
h
"
#include
"Drive.h
h
"
#include
"../SCSI/Device.h
pp
"
#include
"../System/Wrapper.h
pp
"
#include
"Drive.h
pp
"
using
::
testing
::
AtLeast
;
using
::
testing
::
Return
;
...
...
castor/tape/tapeserver/Drive/TapeDriveReadWriteTest.c
c
→
castor/tape/tapeserver/Drive/TapeDriveReadWriteTest.c
pp
View file @
53260ec4
// ----------------------------------------------------------------------
// File: SCSI/TapeDriveInfo.cc
// ----------------------------------------------------------------------
/************************************************************************
* Tape Server *
* Copyright (C) 2013 CERN/Switzerland *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
************************************************************************/
/******************************************************************************
* TapeDriveReadWriteTest.cpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
/**
* Test main program. For development use.
*/
#include
"../System/Wrapper.h
h
"
#include
"../SCSI/Device.h
h
"
#include
"Drive.h
h
"
#include
"../System/Wrapper.h
pp
"
#include
"../SCSI/Device.h
pp
"
#include
"Drive.h
pp
"
#include
<iostream>
#include
<assert.h>
...
...
castor/tape/tapeserver/Drive/mtio_add.h
h
→
castor/tape/tapeserver/Drive/mtio_add.h
pp
View file @
53260ec4
File moved
castor/tape/tapeserver/Exception/CMakeLists.txt
View file @
53260ec4
add_library
(
Exception Exception.c
c
)
add_library
(
Exception Exception.c
pp
)
castor/tape/tapeserver/Exception/Exception.c
c
→
castor/tape/tapeserver/Exception/Exception.c
pp
View file @
53260ec4
// ----------------------------------------------------------------------
// File: Exception/Exception.cc
// ----------------------------------------------------------------------
/******************************************************************************
* Exception.cpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
/************************************************************************
* Tape Server *
* Copyright (C) 2013 CERN/Switzerland *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
************************************************************************/
#define _XOPEN_SOURCE 600
#include
"Exception.h
h
"
#include
"Exception.h
pp
"
#include
<stdlib.h>
#include
<errno.h>
/* We want the thread safe (and portable) version of strerror */
...
...
castor/tape/tapeserver/Exception/Exception.h
h
→
castor/tape/tapeserver/Exception/Exception.h
pp
View file @
53260ec4
// ----------------------------------------------------------------------
// File: Exception/Exception.hh
// ----------------------------------------------------------------------
/************************************************************************
* Tape Server *
* Copyright (C) 2013 CERN/Switzerland *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
************************************************************************/
/******************************************************************************
* Exception.hpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
#include
<exception>
...
...
castor/tape/tapeserver/Exception/ExceptionTest.c
c
→
castor/tape/tapeserver/Exception/ExceptionTest.c
pp
View file @
53260ec4
// ----------------------------------------------------------------------
// File: Exception/ExceptionTest.cc
// ----------------------------------------------------------------------
/******************************************************************************
* ExceptionTest.cpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
/************************************************************************
* Tape Server *
* Copyright (C) 2013 CERN/Switzerland *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
************************************************************************/
#include
"Exception.hh"
#include
"Exception.hpp"
#include
<errno.h>
#include
<gtest/gtest.h>
...
...
castor/tape/tapeserver/File/CMakeLists.txt
View file @
53260ec4
add_library
(
File Structures.c
c
)
add_library
(
File Structures.c
pp
)
castor/tape/tapeserver/File/File.h
h
→
castor/tape/tapeserver/File/File.h
pp
View file @
53260ec4
// ----------------------------------------------------------------------
// File: File/File.hh
// ----------------------------------------------------------------------
/************************************************************************
* Tape Server *
* Copyright (C) 2013 CERN/Switzerland *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
************************************************************************/
/******************************************************************************
* File.hpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
#include
<string>
#include
"Structures.h
h
"
#include
"Structures.h
pp
"
namespace
Tape
{
/**
...
...
castor/tape/tapeserver/File/Structures.c
c
→
castor/tape/tapeserver/File/Structures.c
pp
View file @
53260ec4
// ----------------------------------------------------------------------
// File: File/Structures.cc
// ----------------------------------------------------------------------
/************************************************************************
* Tape Server *
* Copyright (C) 2013 CERN/Switzerland *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
************************************************************************/
#include
"Structures.hh"
#include
"../Exception/Exception.hh"