\n"
67 | " Data key and data key identifier pairs' list\n\n" }
68 | }
69 | }
70 |
71 |
--------------------------------------------------------------------------------
/ltfs/messages/libltfs/en.txt:
--------------------------------------------------------------------------------
1 | //
2 | // %Z% %I% %W% %G% %U%
3 | //
4 | // ZZ_Copyright_BEGIN
5 | //
6 | //
7 | // Licensed Materials - Property of IBM
8 | //
9 | // IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | //
11 | // Copyright IBM Corp. 2010, 2014
12 | //
13 | // This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | // (formally known as IBM Linear Tape File System)
15 | //
16 | // The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | // you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | // General Public License as published by the Free Software Foundation,
19 | // version 2.1 of the License.
20 | //
21 | // The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | // hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | // See the GNU Lesser General Public License for more details.
25 | //
26 | // You should have received a copy of the GNU Lesser General Public
27 | // License along with this library; if not, write to the Free Software
28 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | // or download the license from .
30 | //
31 | //
32 | // ZZ_Copyright_END
33 | //
34 |
35 | en:table {
36 | // This resource intentionally left blank.
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/ltfs/messages/libltfs/en_US.txt:
--------------------------------------------------------------------------------
1 | //
2 | // %Z% %I% %W% %G% %U%
3 | //
4 | // ZZ_Copyright_BEGIN
5 | //
6 | //
7 | // Licensed Materials - Property of IBM
8 | //
9 | // IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | //
11 | // Copyright IBM Corp. 2010, 2014
12 | //
13 | // This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | // (formally known as IBM Linear Tape File System)
15 | //
16 | // The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | // you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | // General Public License as published by the Free Software Foundation,
19 | // version 2.1 of the License.
20 | //
21 | // The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | // hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | // See the GNU Lesser General Public License for more details.
25 | //
26 | // You should have received a copy of the GNU Lesser General Public
27 | // License along with this library; if not, write to the Free Software
28 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | // or download the license from .
30 | //
31 | //
32 | // ZZ_Copyright_END
33 | //
34 |
35 | en_US:table {
36 | // This resource intentionally left blank.
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/ltfs/messages/make_message_src.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | set -e
4 |
5 | KERNEL_NAME=`uname -s`
6 | if [ "$KERNEL_NAME" = "Darwin" ]; then
7 | ICU_FRAMEWORK=/Library/Frameworks/ICU.framework
8 | export PATH=${PATH}:${ICU_FRAMEWORK}/Versions/Current/usr/bin
9 | export DYLD_LIBRARY_PATH=${ICU_FRAMEWORK}/Versions/Current/usr/lib
10 | GENRB=${ICU_FRAMEWORK}/Versions/Current/usr/bin/genrb
11 | PKGDATA=${ICU_FRAMEWORK}/Versions/Current/usr/bin/pkgdata
12 | else
13 | GENRB=genrb
14 | PKGDATA=pkgdata
15 | fi
16 |
17 | if [ "$#" -ne "1" ]; then
18 | echo "Usage: $0 object_file"
19 | exit 1
20 | fi
21 |
22 | BASENAME=`echo $1 | sed -e 's/_dat\.o$//'`
23 |
24 | cd ${BASENAME}
25 |
26 | make_obj() {
27 | # Create a fresh work directory
28 | if [ -d work ]; then
29 | rm -rf work
30 | fi
31 | mkdir work
32 |
33 | # Generate files
34 | ${GENRB} -d work -q *.txt
35 | cd work
36 | ls *.res >packagelist.txt
37 | ${PKGDATA} -p ${BASENAME} -m static -q packagelist.txt >/dev/null
38 |
39 | case $KERNEL_NAME in
40 | MINGW32_NT*)
41 | #
42 | # HPE_mingw_BUILD
43 | #
44 | # We use dynamic libraries for the package data, so use the
45 | # -m dll switch
46 | #
47 | ${PKGDATA} -p ${BASENAME} -m dll -q packagelist.txt >/dev/null
48 |
49 | # Copy the resulting DLL as both a link library
50 | # (lib*.a) and the DLL with the package data
51 | # (*.dll). Libtool will happily use the copy of
52 | # the DLL to link
53 | #
54 | cp ${BASENAME}.dll ../../lib${BASENAME}.a
55 | cp ${BASENAME}.dll ../../${BASENAME}.dll
56 | ;;
57 | *)
58 | mv ${BASENAME}_dat.o ../../
59 | ;;
60 | esac
61 |
62 | # Clean up
63 | cd ..
64 | rm -rf work
65 | }
66 |
67 | # Check whether we need to do anything
68 | if [ -f "../$1" ]; then
69 | for file in *; do
70 | if [ "$file" -nt "../$1" ]; then
71 | make_obj
72 | exit 0
73 | fi
74 | done
75 | else
76 | make_obj
77 | fi
78 |
--------------------------------------------------------------------------------
/ltfs/osx_installer/LTFS.pmdoc/01ltfs-contents.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ltfs/osx_installer/LTFS.pmdoc/01ltfs.xml:
--------------------------------------------------------------------------------
1 | com.hpe.ltfs.pkg1.2../distribution/LTFS.framework/Library/FrameworksinstallFrom.isRelativeTypeversioninstallFrom.pathidentifierscripts.postinstall.isRelativeTypeparentpost_install.sh/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$
--------------------------------------------------------------------------------
/ltfs/osx_installer/LTFS.pmdoc/index.xml:
--------------------------------------------------------------------------------
1 | HPE StoreOpen Software 3.4.2/Users/chrism/Documents/HPE StoreOpen Software.pkgcom.hpe.ltfsThis package installs HPE StoreOpen Software.LTFSicon.jpgLTFS_Installer_License.txtLTFS_Installer_Introduction.htmlUnable to install HPE StoreOpen SoftwareThe ICU libraries have not been tested with versions of OS X earlier than 10.5.6./Library/Frameworks/OSXFUSE.frameworkUnable to install HPE StoreOpen SoftwareThe MacFuse package for 10.6/OSXFUSE package for 10.7 and above is not installed on this system. Please install it before attempting to install HPE StoreOpen Software./Library/Frameworks/ICU.frameworkUnable to install HPE StoreOpen SoftwareThe ICU framework version 50.1.2 is not installed on this system. The ICU framework version 50.1.2 is bundled with the HPE StoreOpen Software installer image file.- 01ltfs.xml
properties.titledescriptionproperties.anywhereDomainproperties.systemDomain
2 |
--------------------------------------------------------------------------------
/ltfs/osx_installer/LTFS_Installer_Introduction.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
18 |
19 |
20 | This is the installation package for
21 | HPE StoreOpen Software version 3.4.2.
22 | This will install the HPE StoreOpen Software and associated utilities onto your system. Note that to use HPE StoreOpen Software, you should also have already installed the following packages:
23 |
24 | - OSXFUSE (bundled with this distribution package)
25 | - Refer to the HPE DAPR Compatibility Matrix for compatibility of versions of OSXFUSE with corresponding Mac OS X versions
26 | - icu version 50.1.2 (attached to this distribution package)
27 |
28 |
29 | This installer will not allow you to proceed until you have installed these two packages.
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/ltfs/osx_installer/LTFSicon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nix-community/hpe-ltfs/f909474d71deb0e6a7abc71fd47c16a78b9c1eb0/ltfs/osx_installer/LTFSicon.jpg
--------------------------------------------------------------------------------
/ltfs/osx_installer/post_install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | LOG_FILE=/tmp/LTFS_postinstall.log
4 |
5 | FRAMEWORK_NAME=LTFS.framework
6 | VERSION=3.4.2
7 |
8 | echo "" >> ${LOG_FILE}
9 | echo "Starting post-install for ${FRAMEWORK_NAME} at `date`" >> ${LOG_FILE}
10 |
11 | echo "User: "`who am i` >> ${LOG_FILE}
12 | echo "PWD: "`pwd` >> ${LOG_FILE}
13 | echo "args: "$@ >> ${LOG_FILE}
14 |
15 | PACKAGE_LOCATION=${1}
16 | INSTALL_DEST=${2}
17 | DEST_VOL=${3}
18 | INSTALL_TYPE=${4}
19 |
20 | echo "PACKAGE_LOC: ${PACKAGE_LOCATION}" >> ${LOG_FILE}
21 | echo "INSTALL_DEST: ${INSTALL_DEST}" >> ${LOG_FILE}
22 | echo "DEST_VOL: ${DEST_VOL}" >> ${LOG_FILE}
23 | echo "INSTALL_TYPE: ${INSTALL_TYPE}" >> ${LOG_FILE}
24 |
25 | echo "PWD: "`pwd` >> ${LOG_FILE}
26 |
27 |
28 | # Change owner...
29 | echo "Changing owner and group..." >> ${LOG_FILE}
30 | cd ${INSTALL_DEST}/${FRAMEWORK_NAME}
31 | chown -R root:admin .
32 | echo " owner and group changed" >> ${LOG_FILE}
33 |
34 |
35 | # Change permissions...
36 | echo "Changing Permissions..." >> ${LOG_FILE}
37 | # set directory permissions
38 | cd ${INSTALL_DEST}/${FRAMEWORK_NAME}
39 | find . -type d | xargs chmod u=rwx,go=rx
40 | echo " set directory permissions" >> ${LOG_FILE}
41 |
42 | # set read file permissions
43 | #cd ${INSTALL_DEST}/${FRAMEWORK_NAME}/Versions/Current/usr/include
44 | #find . -type f | xargs chmod u=rw,go=r
45 | #cd ${INSTALL_DEST}/${FRAMEWORK_NAME}/Versions/Current/usr/man
46 | #find . -type f | xargs chmod u=rw,go=r
47 | cd ${INSTALL_DEST}/${FRAMEWORK_NAME}/Versions/Current/usr/share
48 | find . -type f | xargs chmod u=rw,go=r
49 | echo " set read file permissions" >> ${LOG_FILE}
50 |
51 | # set executable file permissions
52 | cd ${INSTALL_DEST}/${FRAMEWORK_NAME}/Versions/Current/usr/bin
53 | find . -type f | xargs chmod u+rwx,go=rx
54 | cd ${INSTALL_DEST}/${FRAMEWORK_NAME}/Versions/Current/usr/lib
55 | find . -type f | xargs chmod u+rwx,go=rx
56 | echo " set executable file permissions" >> ${LOG_FILE}
57 |
58 | # Create symlinks to save cumbersome path manipulation for users
59 | echo "Linking executables..." >> ${LOG_FILE}
60 | if [ ! -d /usr/local/bin/ ]
61 | then
62 | mkdir /usr/local/bin/
63 | echo " created directory /usr/local/bin/" >> ${LOG_FILE}
64 | fi
65 | proglist=`find ${INSTALL_DEST}/${FRAMEWORK_NAME}/Versions/Current/usr/bin -type f`
66 | for prog in $proglist
67 | do
68 | ln -s $prog /usr/local/bin/`basename $prog`
69 | done
70 | echo " symlinked executables to /usr/local/bin/" >> ${LOG_FILE}
71 |
72 | # Create a log directory if it doesn't already exist
73 | DUMPDIR=${HOME}/Library/Logs/LTFS
74 | if [ ! -d $DUMPDIR ]
75 | then
76 | echo "Creating log directory...">> ${LOG_FILE}
77 | mkdir $DUMPDIR
78 | echo " created directory $DUMPDIR for drive log snapshot dumps" >> ${LOG_FILE}
79 | ls -ld ${HOME}/Library/Logs | awk '{ printf "%s:%s %s/LTFS",$3,$4,$9 }' | xargs chown
80 | echo " set directory permissions" >> ${LOG_FILE}
81 | fi
82 |
83 | echo "Finished post-install for ${FRAMEWORK_NAME} at `date`" >> ${LOG_FILE}
84 |
--------------------------------------------------------------------------------
/ltfs/src/MSG00001.bin:
--------------------------------------------------------------------------------
1 | d d \ T h e L T F S f i l e s y s t e m e n c o u n t e r e d a n e r r o r
2 |
--------------------------------------------------------------------------------
/ltfs/src/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # %Z% %I% %W% %G% %U%
3 | #
4 | # ZZ_Copyright_BEGIN
5 | #
6 | #
7 | # Licensed Materials - Property of IBM
8 | #
9 | # IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | #
11 | # Copyright IBM Corp. 2010, 2014
12 | #
13 | # This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | # (formally known as IBM Linear Tape File System)
15 | #
16 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | # you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | # General Public License as published by the Free Software Foundation,
19 | # version 2.1 of the License.
20 | #
21 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | # hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | # See the GNU Lesser General Public License for more details.
25 | #
26 | # You should have received a copy of the GNU Lesser General Public
27 | # License along with this library; if not, write to the Free Software
28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | # or download the license from .
30 | #
31 | #
32 | # ZZ_Copyright_END
33 | #
34 | #
35 | # (C) Copyright 2015, 2016 Hewlett Packard Enterprise Development LP
36 | # 05/28/10 Add hptape backend to list of platform drivers
37 | # 09/23/10 Rename hptape to more generic ltotape
38 | #
39 | #
40 |
41 | bin_PROGRAMS = ltfs
42 |
43 | ltfs_SOURCES = main.c ltfs_fuse.c
44 | ltfs_DEPENDENCIES = libltfs/libltfs.la ../messages/bin_ltfs_dat.o
45 | ltfs_CPPFLAGS = @AM_CPPFLAGS@ -I ../ltfs-sde/src
46 | ltfs_LDADD = libltfs/libltfs.la ../messages/bin_ltfs_dat.o
47 |
48 | # platform_drivers = tape_drivers/linux/ibmtape
49 | # generic_drivers = tape_drivers/generic/file tape_drivers/generic/itdtimg
50 | # SUBDIRS = $(generic_drivers) $(platform_drivers) iosched kmi libltfs utils
51 | platform_drivers = tape_drivers/linux/ltotape
52 | SUBDIRS = $(platform_drivers) iosched kmi libltfs utils
53 |
--------------------------------------------------------------------------------
/ltfs/src/Makefile.am_Windows:
--------------------------------------------------------------------------------
1 | #
2 | # %Z% %I% %W% %G% %U%
3 | #
4 | # ZZ_Copyright_BEGIN
5 | #
6 | #
7 | # Licensed Materials - Property of IBM
8 | #
9 | # IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | #
11 | # Copyright IBM Corp. 2010, 2014
12 | #
13 | # This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | # (formally known as IBM Linear Tape File System)
15 | #
16 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | # you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | # General Public License as published by the Free Software Foundation,
19 | # version 2.1 of the License.
20 | #
21 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | # hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | # See the GNU Lesser General Public License for more details.
25 | #
26 | # You should have received a copy of the GNU Lesser General Public
27 | # License along with this library; if not, write to the Free Software
28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | # or download the license from .
30 | #
31 | #
32 | # ZZ_Copyright_END
33 | #
34 | #
35 | # (C) Copyright 2015, 2016 Hewlett Packard Enterprise Development LP
36 | # 05/28/10 Add hptape backend to list of platform drivers
37 | # 09/23/10 Rename hptape to more generic ltotape
38 | #
39 | #
40 | ###############################################################################
41 | #
42 | # Copyright (C) 2012 OSR Open Systems Resources, Inc.
43 | #
44 | ###############################################################################
45 |
46 | bin_PROGRAMS = ltfs
47 |
48 | #
49 | # RC file linked to provides message data for the Event Log
50 | #
51 | ltfs_SOURCES = main.c ltfs_fuse.c ltfs_msgs.rc
52 | ltfs_DEPENDENCIES = ../src/libltfs/libltfs.la ../messages/libbin_ltfs.a
53 | ltfs_LDADD = ../src/libltfs/libltfs.la -L../messages -lbin_ltfs -lbin_libltfs
54 |
55 | #
56 | # Provide support for building the RC file with the Resource Compiler (RC/windres)
57 | #
58 | .rc.o:
59 | $(RC) -o $@ $<
60 |
61 | #
62 | # Platform driver is the Windows driver
63 | #
64 | platform_drivers = tape_drivers/windows/ltotape
65 |
66 | SUBDIRS = libltfs kmi . iosched utils $(platform_drivers)
67 |
--------------------------------------------------------------------------------
/ltfs/src/iosched/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # %Z% %I% %W% %G% %U%
3 | #
4 | # ZZ_Copyright_BEGIN
5 | #
6 | #
7 | # Licensed Materials - Property of IBM
8 | #
9 | # IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | #
11 | # Copyright IBM Corp. 2010, 2014
12 | #
13 | # This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | # (formally known as IBM Linear Tape File System)
15 | #
16 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | # you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | # General Public License as published by the Free Software Foundation,
19 | # version 2.1 of the License.
20 | #
21 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | # hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | # See the GNU Lesser General Public License for more details.
25 | #
26 | # You should have received a copy of the GNU Lesser General Public
27 | # License along with this library; if not, write to the Free Software
28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | # or download the license from .
30 | #
31 | #
32 | # ZZ_Copyright_END
33 | #
34 |
35 | lib_LTLIBRARIES = libiosched-fcfs.la libiosched-unified.la
36 | libdir = @libdir@/ltfs
37 |
38 | AM_LIBTOOLFLAGS = --tag=disable-static
39 |
40 | libiosched_fcfs_la_SOURCES = fcfs.c
41 | libiosched_fcfs_la_LDFLAGS = -avoid-version -module @AM_LDFLAGS@
42 | libiosched_fcfs_la_DEPENDENCIES = ../../messages/iosched_fcfs_dat.o
43 | libiosched_fcfs_la_LIBADD = ../../messages/iosched_fcfs_dat.o
44 | libiosched_fcfs_la_CPPFLAGS = @AM_CPPFLAGS@ -I ..
45 |
46 | libiosched_unified_la_SOURCES = unified.c cache_manager.c
47 | libiosched_unified_la_LDFLAGS = -avoid-version -module @AM_LDFLAGS@
48 | libiosched_unified_la_DEPENDENCIES = ../../messages/iosched_unified_dat.o
49 | libiosched_unified_la_LIBADD = ../../messages/iosched_unified_dat.o
50 | libiosched_unified_la_CPPFLAGS = @AM_CPPFLAGS@ -I ..
51 |
52 | install-exec-hook:
53 | for f in $(lib_LTLIBRARIES); do rm -f $(libdir)/$$f; done
54 |
--------------------------------------------------------------------------------
/ltfs/src/iosched/Makefile.am_Windows:
--------------------------------------------------------------------------------
1 | #
2 | # %Z% %I% %W% %G% %U%
3 | #
4 | # ZZ_Copyright_BEGIN
5 | #
6 | #
7 | # Licensed Materials - Property of IBM
8 | #
9 | # IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | #
11 | # Copyright IBM Corp. 2010, 2014
12 | #
13 | # This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | # (formally known as IBM Linear Tape File System)
15 | #
16 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | # you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | # General Public License as published by the Free Software Foundation,
19 | # version 2.1 of the License.
20 | #
21 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | # hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | # See the GNU Lesser General Public License for more details.
25 | #
26 | # You should have received a copy of the GNU Lesser General Public
27 | # License along with this library; if not, write to the Free Software
28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | # or download the license from .
30 | #
31 | #
32 | # ZZ_Copyright_END
33 | #
34 | ###############################################################################
35 | #
36 | # Copyright (C) 2012 OSR Open Systems Resources, Inc.
37 | #
38 | ###############################################################################
39 |
40 | lib_LTLIBRARIES = libiosched-fcfs.la libiosched-unified.la
41 | libdir = @libdir@/ltfs
42 |
43 | AM_LIBTOOLFLAGS = --tag=disable-static
44 |
45 | libiosched_fcfs_la_SOURCES = fcfs.c
46 | #
47 | # OSR/HPE_mingw_BUILD
48 | #
49 | # In our MinGW environment, we dynamically link to the package
50 | # data.
51 | #
52 | libiosched_fcfs_la_LDFLAGS = -avoid-version -no-undefined @AM_LDFLAGS@
53 | libiosched_fcfs_la_DEPENDENCIES = ../../messages/libiosched_fcfs.a
54 | libiosched_fcfs_la_LIBADD = -L../../messages -liosched_fcfs ../libltfs/libltfs.la
55 | libiosched_fcfs_la_CPPFLAGS = @AM_CPPFLAGS@ -I../src
56 |
57 | libiosched_unified_la_SOURCES = unified.c cache_manager.c
58 |
59 | #
60 | # OSR/HPE_mingw_BUILD
61 | #
62 | # In our MinGW environment, we dynamically link to the package
63 | # data.
64 | #
65 | libiosched_unified_la_LDFLAGS = -avoid-version -no-undefined @AM_LDFLAGS@
66 | libiosched_unified_la_DEPENDENCIES = ../../messages/libiosched_unified.a
67 | libiosched_unified_la_LIBADD = -L../../messages -liosched_unified ../libltfs/libltfs.la
68 | libiosched_unified_la_CPPFLAGS = @AM_CPPFLAGS@ -I ..
69 |
70 | install-exec-hook:
71 | for f in $(lib_LTLIBRARIES); do rm -f $(libdir)/$$f; done
72 |
--------------------------------------------------------------------------------
/ltfs/src/iosched/cache_manager.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: cache_manager.h
39 | **
40 | ** DESCRIPTION: Header file for the generic cache manager.
41 | **
42 | ** AUTHOR: Lucas C. Villa Real
43 | ** IBM Almaden Research Center
44 | ** lucasvr@us.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 | #ifndef __cache_manager_h
49 | #define __cache_manager_h
50 |
51 | void *cache_manager_init(size_t object_size, size_t initial_capacity, size_t max_capacity);
52 | void cache_manager_destroy(void *cache);
53 | bool cache_manager_has_room(void *cache);
54 | void *cache_manager_allocate_object(void *cache);
55 | void *cache_manager_get_object(void *object);
56 | void cache_manager_free_object(void *cache_object, size_t count);
57 | void *cache_manager_get_object_data(void *cache_object);
58 | size_t cache_manager_get_object_size(void *cache_object);
59 |
60 | #endif /* __cache_manager_h */
61 |
--------------------------------------------------------------------------------
/ltfs/src/kmi/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # %Z% %I% %W% %G% %U%
3 | #
4 | # ZZ_Copyright_BEGIN
5 | #
6 | #
7 | # Licensed Materials - Property of IBM
8 | #
9 | # IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | #
11 | # Copyright IBM Corp. 2010, 2014
12 | #
13 | # This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | # (formally known as IBM Linear Tape File System)
15 | #
16 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | # you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | # General Public License as published by the Free Software Foundation,
19 | # version 2.1 of the License.
20 | #
21 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | # hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | # See the GNU Lesser General Public License for more details.
25 | #
26 | # You should have received a copy of the GNU Lesser General Public
27 | # License along with this library; if not, write to the Free Software
28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | # or download the license from .
30 | #
31 | #
32 | # ZZ_Copyright_END
33 | #
34 |
35 | lib_LTLIBRARIES = libkmi-simple.la libkmi-flatfile.la
36 | libdir = @libdir@/ltfs
37 |
38 | AM_LIBTOOLFLAGS = --tag=disable-static
39 |
40 | libkmi_simple_la_SOURCES = simple.c key_format_ltfs.c
41 | libkmi_simple_la_LDFLAGS = -avoid-version -module @AM_LDFLAGS@
42 | libkmi_simple_la_DEPENDENCIES = ../../messages/kmi_simple_dat.o
43 | libkmi_simple_la_LIBADD = ../../messages/kmi_simple_dat.o
44 | libkmi_simple_la_CPPFLAGS = @AM_CPPFLAGS@ -I ..
45 |
46 | libkmi_flatfile_la_SOURCES = flatfile.c key_format_ltfs.c
47 | libkmi_flatfile_la_LDFLAGS = -avoid-version -module @AM_LDFLAGS@
48 | libkmi_flatfile_la_DEPENDENCIES = ../../messages/kmi_flatfile_dat.o
49 | libkmi_flatfile_la_LIBADD = ../../messages/kmi_flatfile_dat.o
50 | libkmi_flatfile_la_CPPFLAGS = @AM_CPPFLAGS@ -I ..
51 |
52 | install-exec-hook:
53 | for f in $(lib_LTLIBRARIES); do rm -f $(libdir)/$$f; done
54 |
--------------------------------------------------------------------------------
/ltfs/src/kmi/Makefile.am_Windows:
--------------------------------------------------------------------------------
1 | #
2 | # %Z% %I% %W% %G% %U%
3 | #
4 | # ZZ_Copyright_BEGIN
5 | #
6 | #
7 | # Licensed Materials - Property of IBM
8 | #
9 | # IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | #
11 | # Copyright IBM Corp. 2010, 2014
12 | #
13 | # This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | # (formally known as IBM Linear Tape File System)
15 | #
16 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | # you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | # General Public License as published by the Free Software Foundation,
19 | # version 2.1 of the License.
20 | #
21 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | # hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | # See the GNU Lesser General Public License for more details.
25 | #
26 | # You should have received a copy of the GNU Lesser General Public
27 | # License along with this library; if not, write to the Free Software
28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | # or download the license from .
30 | #
31 | #
32 | # ZZ_Copyright_END
33 | #
34 | ###############################################################################
35 | #
36 | # Copyright (C) 2012 OSR Open Systems Resources, Inc.
37 | #
38 | ###############################################################################
39 |
40 | lib_LTLIBRARIES = libkmi-simple.la libkmi-flatfile.la
41 | libdir = @libdir@/ltfs
42 |
43 | AM_LIBTOOLFLAGS = --tag=disable-static
44 |
45 | libkmi_simple_la_SOURCES = simple.c key_format_ltfs.c
46 | #
47 | # OSR/HPE_mingw_BUILD
48 | #
49 | # In our MinGW environment, we dynamically link to the package
50 | # data.
51 | #
52 | libkmi_simple_la_LDFLAGS = -avoid-version -no-undefined @AM_LDFLAGS@
53 | libkmi_simple_la_DEPENDENCIES = ../../messages/libkmi_simple.a
54 | libkmi_simple_la_LIBADD = -L../../messages -lkmi_simple ../libltfs/libltfs.la
55 | libkmi_simple_la_CPPFLAGS = @AM_CPPFLAGS@ -I ..
56 |
57 | libkmi_flatfile_la_SOURCES = flatfile.c key_format_ltfs.c
58 |
59 | #
60 | # OSR/HPE_mingw_BUILD
61 | #
62 | # In our MinGW environment, we dynamically link to the package
63 | # data.
64 | #
65 | libkmi_flatfile_la_LDFLAGS = -avoid-version -no-undefined @AM_LDFLAGS@
66 | libkmi_flatfile_la_DEPENDENCIES = ../../messages/libkmi_flatfile.a
67 | libkmi_flatfile_la_LIBADD = -L../../messages -lkmi_flatfile ../libltfs/libltfs.la
68 | libkmi_flatfile_la_CPPFLAGS = @AM_CPPFLAGS@ -I ..
69 |
70 | install-exec-hook:
71 | for f in $(lib_LTLIBRARIES); do rm -f $(libdir)/$$f; done
72 |
--------------------------------------------------------------------------------
/ltfs/src/kmi/key_format_ltfs.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: kmi/key_format_ltfs.h
39 | **
40 | ** DESCRIPTION: Header file for the LTFS specific format manager.
41 | **
42 | ** AUTHOR: Yutaka Oishi
43 | ** IBM Yamato, Japan
44 | ** oishi@jp.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifndef __key_format_ltfs_h
50 | #define __key_format_ltfs_h
51 |
52 | #define DK_LENGTH 32
53 | #define DKI_LENGTH 12
54 | #define DKI_ASCII_LENGTH 3
55 | #define SEPARATOR_LENGTH 1 /* length of ':' and '/' */
56 |
57 | struct key {
58 | unsigned char dk[DK_LENGTH]; /**< Data Key */
59 | unsigned char dki[DKI_LENGTH]; /**< Data Key Identifier */
60 | };
61 |
62 | struct key_format_ltfs {
63 | int num_of_keys; /**< Number of DK and DKi pairs */
64 | struct key *dk_list; /**< DK and DKi pairs' list */
65 | };
66 |
67 | void *key_format_ltfs_init(struct ltfs_volume *vol, const char *id);
68 | int key_format_ltfs_destroy(void * const kmi_handle, const char *id);
69 | int key_format_ltfs_get_key(unsigned char **keyalias, unsigned char **key, void * const kmi_handle,
70 | unsigned char * const dk_list, unsigned char * const dki_for_format);
71 |
72 | #endif /* __key_format_ltfs_h */
73 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/LTFS-MIB.txt:
--------------------------------------------------------------------------------
1 | LTFS-MIB DEFINITIONS ::= BEGIN
2 |
3 | IMPORTS
4 | OBJECT-TYPE, NOTIFICATION-TYPE, MODULE-IDENTITY, enterprises
5 | FROM SNMPv2-SMI;
6 |
7 | ibmLTFS MODULE-IDENTITY
8 | LAST-UPDATED "201312160000Z"
9 | ORGANIZATION "International Business Machines Corp."
10 | CONTACT-INFO "IBM Support"
11 | DESCRIPTION "This file defines IBM LTFS MIB.
12 | Licensed Materials - Property of IBM
13 | (C) Copyright IBM Corp. 2014"
14 | ::= { ibmProd 248 }
15 |
16 | ibm OBJECT IDENTIFIER ::= { enterprises 2 }
17 | ibmProd OBJECT IDENTIFIER ::= { ibm 6 }
18 | ltfsObjects OBJECT IDENTIFIER ::= { ibmLTFS 1 }
19 | ltfsTraps OBJECT IDENTIFIER ::= { ibmLTFS 2 }
20 |
21 | ltfsInfo OBJECT-TYPE
22 | SYNTAX OCTET STRING
23 | MAX-ACCESS read-only
24 | STATUS current
25 | DESCRIPTION
26 | "A string that represents the error/notification contents."
27 | ::= { ltfsObjects 1 }
28 |
29 | ltfsStartTrap NOTIFICATION-TYPE
30 | STATUS current
31 | DESCRIPTION
32 | "This trap indicates that the LTFS process started."
33 | ::= { ltfsTraps 1 }
34 |
35 | ltfsStopTrap NOTIFICATION-TYPE
36 | STATUS current
37 | DESCRIPTION
38 | "This trap indicates that the LTFS process stopped."
39 | ::= { ltfsTraps 2 }
40 |
41 | ltfsInfoTrap NOTIFICATION-TYPE
42 | OBJECTS {
43 | ltfsInfo
44 | }
45 | STATUS current
46 | DESCRIPTION
47 | "This trap indicates that there are contents of which a user should be notified."
48 | ::= { ltfsTraps 3 }
49 |
50 | ltfsErrorTrap NOTIFICATION-TYPE
51 | OBJECTS {
52 | ltfsInfo
53 | }
54 | STATUS current
55 | DESCRIPTION
56 | "This trap indicates that a fatal error is detected in LTFS process."
57 | ::= { ltfsTraps 4 }
58 | END
59 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/LtfsSnmpTrapDef.txt:
--------------------------------------------------------------------------------
1 | #
2 | # LTFS SNMP TRAP DEFINITION FILE
3 | #
4 |
5 | # 14104I # Launched command
6 | # 14105I # This binary type
7 | # 14106I # GCC version
8 | # 17087I # Kernel version
9 | # 17089I # Distribution
10 | # 14063I # Sync type
11 | # 17085I # Plugin: Loading message
12 | # 12165I # lin_tape version
13 | # 12118I # Changer or Drive identification
14 | # 12162I # Vendor ID
15 | # 12159I # Firmware revision
16 | # 12160I # Changer serial
17 | # 12158I # Opening a device through ibmtape driver
18 | # 12160I # Drive serial
19 | # 17160I # Maximum device block size
20 | # 12158I # Opening a device through ibmtape driver
21 | # 16500I # Cartridge repository plugin
22 | # 13500I # GPFS: On-demand dentry cache is initialized
23 | # 11679I # This node is started up as 'primary' node
24 | # 11545I # Rebuilding the cartridge inventory
25 | # 11675I # Cartridge allocation information
26 | # 13500I # GPFS: On-demand dentry cache is initialized
27 | # 11666I # Notify library status change : 353 => 354
28 | # 11705I # Set read lock on the lock of the multi-node config file
29 | # 14708I # LTFS admin server is listening on port 2112
30 | 14111I # Initial setup completed successfully
31 | # 14112I # Invoke 'mount' command to check the result of final setup
32 | # 14113I # Specified mount point is listed if succeeded
33 | # 14029I # Ready to receive file system requests
34 | # 14158I # Holding the regular node lock in the main process of LTFS
35 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # %Z% %I% %W% %G% %U%
3 | #
4 | # ZZ_Copyright_BEGIN
5 | #
6 | #
7 | # Licensed Materials - Property of IBM
8 | #
9 | # IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | #
11 | # Copyright IBM Corp. 2010, 2014
12 | #
13 | # This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | # (formally known as IBM Linear Tape File System)
15 | #
16 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | # you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | # General Public License as published by the Free Software Foundation,
19 | # version 2.1 of the License.
20 | #
21 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | # hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | # See the GNU Lesser General Public License for more details.
25 | #
26 | # You should have received a copy of the GNU Lesser General Public
27 | # License along with this library; if not, write to the Free Software
28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | # or download the license from .
30 | #
31 | #
32 | # ZZ_Copyright_END
33 | #
34 |
35 | lib_LTLIBRARIES = libltfs.la
36 |
37 | noinst_HEADERS =
38 | nobase_pkginclude_HEADERS = ltfs.h tape_ops.h ltfs_types.h ltfslogging.h ltfstrace.h ltfs_thread.h ltfs_locking.h queue.h plugin.h config_file.h ltfs_error.h
39 |
40 | libltfs_la_SOURCES = \
41 | ltfs.c \
42 | ltfs_internal.c \
43 | ltfs_fsops.c \
44 | ltfs_fsops_raw.c \
45 | fs.c \
46 | xml_common.c \
47 | xml_writer.c \
48 | xml_reader.c \
49 | xml_writer_libltfs.c \
50 | xml_reader_libltfs.c \
51 | label.c \
52 | base64.c \
53 | tape.c \
54 | iosched.c \
55 | dcache.c \
56 | kmi.c \
57 | pathname.c \
58 | index_criteria.c \
59 | xattr.c \
60 | ltfslogging.c \
61 | ltfstrace.c \
62 | config_file.c \
63 | plugin.c \
64 | periodic_sync.c \
65 | arch/uuid_internal.c \
66 | arch/filename_handling.c \
67 | arch/time_internal.c \
68 | arch/arch_info.c \
69 | arch/errormap.c
70 |
71 | libltfs_la_DEPENDENCIES = ../../messages/libltfs_dat.o ../../messages/internal_error_dat.o
72 | libltfs_la_LIBADD = ../../messages/libltfs_dat.o ../../messages/internal_error_dat.o
73 | libltfs_la_CPPFLAGS = @AM_CPPFLAGS@ -I ..
74 | libltfs_la_LDFLAGS = @AM_LDFLAGS@
75 |
76 | install-data-local:
77 | if [ ! -d "$(prefix)/share/snmp" ]; then \
78 | mkdir -p "$(prefix)/share/snmp"; \
79 | cp LtfsSnmpTrapDef.txt LTFS-MIB.txt "$(prefix)/share/snmp/"; \
80 | elif [ ! -f "$(prefix)/share/snmp/LtfsSnmpTrapDef.txt" ]; then \
81 | cp LtfsSnmpTrapDef.txt "$(prefix)/share/snmp/LtfsSnmpTrapDef.txt"; \
82 | elif [ ! -f "$(prefix)/share/snmp/LTFS-MIB.txt" ]; then \
83 | cp LTFS-MIB.txt "$(prefix)/share/snmp/LTFS-MIB.txt"; \
84 | fi
85 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/arch/arch_info.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: arch/arch_info.h
39 | **
40 | ** DESCRIPTION: Prototypes for platform information
41 | **
42 | ** AUTHOR: Atsushi Abe
43 | ** IBM Yamato, Japan
44 | ** PISTE@jp.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifndef arch_info_h_
50 | #define arch_info_h_
51 |
52 | #if defined(__linux__)
53 |
54 | #if defined(__i386__)
55 | #define BUILD_SYS_FOR "This binary is built for Linux (i386)"
56 | #define BUILD_SYS_GCC __VERSION__
57 | #elif defined(__x86_64__)
58 | #define BUILD_SYS_FOR "This binary is built for Linux (x86_64)"
59 | #define BUILD_SYS_GCC __VERSION__
60 | #elif defined(__ppc__)
61 | #define BUILD_SYS_FOR "This binary is built for Linux (ppc)"
62 | #define BUILD_SYS_GCC __VERSION__
63 | #elif defined(__ppc64__)
64 | #define BUILD_SYS_FOR "This binary is built for Linux (ppc64)"
65 | #define BUILD_SYS_GCC __VERSION__
66 | #else
67 | #define BUILD_SYS_FOR "This binary is built for Linux (unknown)"
68 | #define BUILD_SYS_GCC __VERSION__
69 | #endif
70 |
71 | #elif defined(__APPLE__)
72 |
73 | #define BUILD_SYS_FOR "This binary is built for Mac OS X "
74 | #define BUILD_SYS_GCC __VERSION__
75 |
76 | #elif defined(mingw_PLATFORM)
77 |
78 | #define BUILD_SYS_FOR "This binary is built for Windows"
79 | #define BUILD_SYS_GCC __VERSION__
80 |
81 | #else
82 |
83 | #define BUILD_SYS_FOR "This binary is built on an unknown OS"
84 | #define BUILD_SYS_GCC __VERSION__
85 |
86 | #endif
87 |
88 | void show_runtime_system_info(void);
89 |
90 | #endif /* arch_info_h_ */
91 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/arch/filename_handling.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: arch/filename_handling.h
39 | **
40 | ** DESCRIPTION: Prototypes for platform-specific filename handling functions.
41 | **
42 | ** AUTHOR: Takashi Ashida
43 | ** IBM Yamato, Japan
44 | ** ashida@jp.ibm.com
45 | **
46 | *************************************************************************************
47 | **
48 | ** (C) Copyright 2015 - 2017 Hewlett Packard Enterprise Development LP
49 | ** 10/13/17 Added support for SNIA 2.4
50 | **
51 | *************************************************************************************
52 | */
53 |
54 | #ifndef filename_handling_h_
55 | #define filename_handling_h_
56 |
57 | #include "libltfs/ltfs.h"
58 |
59 | void update_platform_safe_name(struct dentry* dentry, bool handle_invalid_char, struct ltfs_index *idx);
60 | int ltfs_compare_names(const char *name1, const char *name2, int *result);
61 | // HPE MD 22.09.2017 Added following functions for SNIA 2.4
62 | void perform_name_percent_encoding(struct dentry* dentry);
63 | void perform_xattr_percent_encoding(struct xattr_info* xattr);
64 | void update_xattr_safe_name(struct xattr_info* xattr);
65 |
66 | #endif /* filename_handling_h_ */
67 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/arch/osx/osx_string.c:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: arch/osx/osx_string.c
39 | **
40 | ** DESCRIPTION: Implements some string functions missing on OS X.
41 | **
42 | ** AUTHOR: Michael A. Richmond
43 | ** IBM Almaden Research Center
44 | ** mar@almaden.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifdef __APPLE__
50 |
51 | #include "osx_string.h"
52 |
53 | size_t strnlen(const char *s, size_t maxlen) {
54 | const char *null_pos = memchr(s, '\0', maxlen);
55 |
56 | if (null_pos) {
57 | return null_pos - s;
58 | } else {
59 | return maxlen;
60 | }
61 | }
62 |
63 | char *strndup(const char *s, size_t maxlen) {
64 |
65 | size_t length = strnlen(s, maxlen);
66 | char *destination = malloc(length + 1);
67 |
68 | if(destination == NULL) {
69 | return NULL;
70 | }
71 |
72 | destination[length] = '\0';
73 | return memcpy(destination, s, length);
74 | }
75 |
76 | #endif /* __APPLE__ */
77 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/arch/osx/osx_string.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: arch/osx/osx_string.h
39 | **
40 | ** DESCRIPTION: Prototypes for string functions missing on OS X.
41 | **
42 | ** AUTHOR: Michael A. Richmond
43 | ** IBM Almaden Research Center
44 | ** mar@almaden.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifndef __osx_string_h
50 | #define __osx_string_h
51 |
52 | #ifdef __APPLE__
53 |
54 | #include
55 | #include
56 | #include
57 |
58 | size_t strnlen(const char *s, size_t maxlen);
59 |
60 | char *strndup(const char *s, size_t maxlen);
61 |
62 | #endif /* __APPLE__ */
63 |
64 | #endif /* __osx_string_h */
65 |
66 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/arch/signal_internal.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: arch/signal_internal.h
39 | **
40 | ** DESCRIPTION: Prototypes for platform-specific signal functions.
41 | **
42 | ** AUTHOR: Atsushi Abe
43 | ** IBM Yamato, Japan
44 | ** PISTE@jp.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifndef signal_internal_h_
50 | #define signal_internal_h_
51 |
52 | #ifdef mingw_PLATFORM
53 | #include "libltfs/arch/win/win_util.h"
54 | #endif
55 | #include
56 |
57 | #ifdef __APPLE__
58 | typedef void (*sighandler_t)(int);
59 | #endif
60 |
61 | #endif /* time_internal_h_ */
62 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/arch/uuid_internal.c:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: arch/uuid_internal.h
39 | **
40 | ** DESCRIPTION: Implements platform-specific UUID functions.
41 | **
42 | ** AUTHOR: Brian Biskeborn
43 | ** IBM Almaden Research Center
44 | ** bbiskebo@us.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifndef mingw_PLATFORM
50 |
51 | #include
52 |
53 | void gen_uuid_unix(char *uuid_str)
54 | {
55 | uuid_t tape_uuid;
56 | uuid_generate(tape_uuid);
57 | uuid_unparse_lower(tape_uuid, uuid_str);
58 | }
59 |
60 | #endif
61 |
62 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/arch/uuid_internal.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: arch/uuid_internal.h
39 | **
40 | ** DESCRIPTION: Prototypes for platform-specific UUID functions.
41 | **
42 | ** AUTHOR: Brian Biskeborn
43 | ** IBM Almaden Research Center
44 | ** bbiskebo@us.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifndef __uuid_internal_h__
50 | #define __uuid_internal_h__
51 |
52 | #ifdef mingw_PLATFORM
53 | #include "libltfs/arch/win/win_util.h"
54 | #define ltfs_gen_uuid(uuid_str) gen_uuid_win(uuid_str)
55 |
56 | #else
57 | void gen_uuid_unix(char *uuid_str);
58 | #define ltfs_gen_uuid(uuid_str) gen_uuid_unix(uuid_str)
59 |
60 | #endif /* mingw_PLATFORM */
61 |
62 | #endif /* __uuid_internal_h__ */
63 |
64 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/arch/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: arch/version.h
39 | **
40 | ** DESCRIPTION: Platform-specific version information.
41 | **
42 | ** AUTHOR: Michael A. Richmond
43 | ** IBM Almaden Research Center
44 | ** mar@almaden.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifndef VERSION_H_
50 | #define VERSION_H_
51 |
52 | /*
53 | * Creator tag value format:
54 | * PackageName Version - Platform - Program
55 | * IBM LTFS 0.2.0 - Linux - mkltfs
56 | */
57 | #define CREATOR_STRING_FORMAT "%s %s - %s - %s"
58 |
59 | #ifdef __APPLE__
60 | #define PLATFORM "Mac OS X"
61 | #elif mingw_PLATFORM
62 | #define PLATFORM "Windows"
63 | #else
64 | #define PLATFORM "Linux"
65 | #endif /* __APPLE__ */
66 |
67 | #endif /* VERSION_H_ */
68 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/arch/win/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # %Z% %I% %W% %G% %U%
3 | #
4 | # ZZ_Copyright_BEGIN
5 | #
6 | #
7 | # Licensed Materials - Property of IBM
8 | #
9 | # IBM Linear Tape File System Single Drive Edition Version 1.3.0.0 for Linux and Mac OS X
10 | #
11 | # Copyright IBM Corp. 2010, 2012
12 | #
13 | # This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | # (formally known as IBM Linear Tape File System)
15 | #
16 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | # you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | # General Public License as published by the Free Software Foundation,
19 | # version 2.1 of the License.
20 | #
21 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | # hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | # See the GNU Lesser General Public License for more details.
25 | #
26 | # You should have received a copy of the GNU Lesser General Public
27 | # License along with this library; if not, write to the Free Software
28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | # or download the license from .
30 | #
31 | #
32 | # ZZ_Copyright_END
33 | #
34 |
35 | lib_LTLIBRARIES = libwinlog.la
36 | libdir = @libdir@/ltfs
37 |
38 | libwinlog_la_SOURCES = winlog.c
39 | libwinlog_la_CPPFLAGS = -I$(top_srcdir)/src @AM_CPPFLAGS@
40 | libwinlog_la_LDFLAGS = -avoid-version -module
41 |
42 | install-exec-hook:
43 | for f in $(lib_LTLIBRARIES); do rm -f $(libdir)/$$f; done
44 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/arch/win/winlog.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 1.3.0.0 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2012
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: arch/win/winlog.c
39 | **
40 | ** DESCRIPTION: Implements MinGW (Windows) specific log 'functions
41 | **
42 | *************************************************************************************
43 | */
44 |
45 | #ifndef WINLOG_H_
46 | #define WINLOG_H_
47 |
48 | // prototype
49 | void vsyslog(int priority, const char *format, va_list ap);
50 | void syslog(int priority, const char *format, ...);
51 |
52 | #endif /* WINLOG_H_ */
53 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/base64.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: base64.c
39 | **
40 | ** DESCRIPTION: Prototype for base64 decoder.
41 | **
42 | ** AUTHORS: Brian Biskeborn
43 | ** IBM Almaden Research Center
44 | ** bbiskebo@us.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifndef __base64_h
50 | #define __base64_h
51 |
52 | #include
53 |
54 | size_t base64_decode(const unsigned char *enc, size_t nbytes_in, unsigned char **dec);
55 |
56 | #endif /* __base64_h */
57 |
58 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/index_criteria.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: index_criteria.h
39 | **
40 | ** DESCRIPTION: Header file for the routines that deal with the index partition
41 | ** criteria.
42 | **
43 | ** AUTHOR: Lucas C. Villa Real
44 | ** IBM Almaden Research Center
45 | ** lucasvr@us.ibm.com
46 | **
47 | *************************************************************************************
48 | */
49 | #ifndef __index_criteria_h
50 | #define __index_criteria_h
51 |
52 | #ifdef __cplusplus
53 | extern "C" {
54 | #endif
55 |
56 | int index_criteria_parse(const char *filterrules, struct ltfs_volume *vol);
57 | int index_criteria_dup_rules(struct index_criteria *dest_ic, struct index_criteria *src_ic);
58 | int index_criteria_set_allow_update(bool allow, struct ltfs_volume *vol);
59 | bool index_criteria_match(struct dentry *d, struct ltfs_volume *vol);
60 | size_t index_criteria_get_max_filesize(struct ltfs_volume *vol);
61 | const char **index_criteria_get_glob_patterns(struct ltfs_volume *vol);
62 | void index_criteria_free(struct index_criteria *ic);
63 |
64 | #ifdef __cplusplus
65 | }
66 | #endif
67 |
68 | #endif /* __index_criteria_h */
69 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/iosched.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: iosched.h
39 | **
40 | ** DESCRIPTION: Header for the interface with the pluggable I/O schedulers.
41 | **
42 | ** AUTHOR: Lucas C. Villa Real
43 | ** IBM Almaden Research Center
44 | ** lucasvr@us.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 | #ifndef __iosched_h
49 | #define __iosched_h
50 |
51 | #ifdef __cplusplus
52 | extern "C" {
53 | #endif
54 |
55 | #include "plugin.h"
56 | #include "iosched_ops.h"
57 |
58 | int iosched_init(struct libltfs_plugin *plugin, struct ltfs_volume *vol);
59 | int iosched_destroy(struct ltfs_volume *vol);
60 | int iosched_open(const char *path, bool open_write, struct dentry **dentry,
61 | struct ltfs_volume *vol);
62 | int iosched_close(struct dentry *d, bool flush, struct ltfs_volume *vol);
63 | bool iosched_initialized(struct ltfs_volume *vol);
64 | ssize_t iosched_read(struct dentry *d, char *buf, size_t size, off_t offset,
65 | struct ltfs_volume *vol);
66 | ssize_t iosched_write(struct dentry *d, const char *buf, size_t size, off_t offset,
67 | bool isupdatetime, struct ltfs_volume *vol);
68 | int iosched_flush(struct dentry *d, bool closeflag, struct ltfs_volume *vol);
69 | int iosched_truncate(struct dentry *d, off_t length, struct ltfs_volume *vol);
70 | uint64_t iosched_get_filesize(struct dentry *d, struct ltfs_volume *vol);
71 | int iosched_update_data_placement(struct dentry *d, struct ltfs_volume *vol);
72 |
73 | #ifdef __cplusplus
74 | }
75 | #endif
76 |
77 |
78 | #endif /* __iosched_h */
79 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/kmi.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: libltfs/kmi.h
39 | **
40 | ** DESCRIPTION: Key manager interface API
41 | **
42 | ** AUTHOR: Yutaka Oishi
43 | ** IBM Yamato, Japan
44 | ** oishi@jp.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifndef __kmi_h
50 | #define __kmi_h
51 |
52 | #ifdef __cplusplus
53 | extern "C" {
54 | #endif
55 |
56 | #include "plugin.h"
57 | #include "kmi_ops.h"
58 |
59 | int kmi_init(struct libltfs_plugin * const plugin, struct ltfs_volume * const vol);
60 | int kmi_destroy(struct ltfs_volume * const vol);
61 | bool kmi_initialized(const struct ltfs_volume * const vol);
62 | int kmi_get_key(unsigned char **keyalias, unsigned char **key, void * const kmi_handle);
63 | int kmi_print_help_message(const struct kmi_ops * const ops);
64 | int kmi_parse_opts(void * const kmi_handle, void *opt_args);
65 |
66 | #ifdef __cplusplus
67 | }
68 | #endif
69 |
70 |
71 | #endif /* __kmi_h */
72 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/kmi_ops.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: kmi_ops.h
39 | **
40 | ** DESCRIPTION: Defines operations that must be supported by the key manager interface plugins.
41 | **
42 | ** AUTHOR: Yutaka Oishi
43 | ** IBM Yamato, Japan
44 | ** oishi@jp.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 | #ifndef __kmi_ops_h
49 | #define __kmi_ops_h
50 |
51 | #include "ltfs.h"
52 |
53 | /**
54 | * kmi_ops structure.
55 | * Defines operations that must be supported by the key manager interface plugins.
56 | */
57 | struct kmi_ops {
58 | void *(*init)(struct ltfs_volume *vol);
59 | int (*destroy)(void * const kmi_handle);
60 | int (*get_key)(unsigned char ** const keyalias, unsigned char ** const key, void * const kmi_handle);
61 | int (*help_message)(void);
62 | int (*parse_opts)(void *opt_args);
63 | };
64 |
65 | struct kmi_ops *kmi_get_ops(void);
66 | const char *kmi_get_message_bundle_name(void ** const message_data);
67 |
68 | #endif /* __kmi_ops_h */
69 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/label.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: label.h
39 | **
40 | ** DESCRIPTION: Prototypes for label handling functions.
41 | **
42 | ** AUTHOR: Takashi Ashida
43 | ** IBM Yamato, Japan
44 | ** ashida@jp.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifndef label_h_
50 | #define label_h_
51 |
52 | #include "ltfs.h"
53 |
54 | int label_alloc(struct ltfs_label **label);
55 | void label_free(struct ltfs_label **label);
56 | int label_compare(struct ltfs_label *label1, struct ltfs_label *label2);
57 | void label_make_ansi_label(struct ltfs_volume *vol, char *label, size_t size);
58 |
59 | #endif /* label_h_ */
60 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/ltfs_fuse_version.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: ltfs_fuse_version.h
39 | **
40 | ** DESCRIPTION: Defines the minimum FUSE version for all modules.
41 | **
42 | ** AUTHOR: Michael A. Richmond
43 | ** IBM Almaden Research Center
44 | ** mar@almaden.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifndef __ltfs_fuse_version_h__
50 | #define __ltfs_fuse_version_h__
51 |
52 | #define FUSE_USE_VERSION 26
53 |
54 | #endif /* __ltfs_fuse_version_h__ */
55 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/ltfs_thread.c:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: ltfs_thread.c
39 | **
40 | ** DESCRIPTION: LTFS thread operation imprementation
41 | **
42 | ** AUTHORS: Atsushi Abe
43 | ** IBM Tokyo Lab., Japan
44 | ** piste@jp.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifdef __APPLE__
50 |
51 | #include
52 | #include
53 |
54 | uint32_t ltfs_get_thread_id(void)
55 | {
56 | uint32_t tid;
57 |
58 | tid = (uint32_t)pthread_mach_thread_np(pthread_self());
59 |
60 | return tid;
61 | }
62 |
63 | #endif
64 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/ltfssnmp.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: snmp/ltfssnmp.h
39 | **
40 | ** DESCRIPTION: Implements the snmp trap functions.
41 | **
42 | ** AUTHORS: Masahide Washizawa
43 | ** IBM Tokyo Lab., Japan
44 | ** washi@jp.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifndef __LTFSSNMP_H__
50 | #define __LTFSSNMP_H__
51 |
52 | #if ((!defined (__APPLE__)) && (!defined (mingw_PLATFORM)))
53 | #include
54 | #include
55 | #include
56 | #endif /* ((!defined (__APPLE__)) && (!defined (mingw_PLATFORM))) */
57 |
58 | #include
59 | #include
60 | #include "libltfs/queue.h"
61 | #include "libltfs/ltfs_error.h"
62 | #include "libltfs/ltfslogging.h"
63 |
64 | /*
65 | * function declarations
66 | */
67 | int ltfs_snmp_init(char *);
68 | int ltfs_snmp_finish();
69 | bool is_snmp_enabled(void);
70 | bool is_snmp_trapid(const char *);
71 | int send_ltfsStartTrap(void);
72 | int send_ltfsStopTrap(void);
73 | int send_ltfsInfoTrap(char *);
74 | int send_ltfsErrorTrap(char *);
75 |
76 | #endif /* __LTFSSNMP_H__ */
77 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/periodic_sync.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: periodic_sync.c
39 | **
40 | ** DESCRIPTION: Prototypes for the periodic sync feature
41 | **
42 | ** AUTHOR: Atsushi Abe
43 | ** IBM Yamato, Japan
44 | ** PISTE@jp.ibm.com
45 | *************************************************************************************
46 | */
47 | #ifndef __periodic_sync_h
48 | #define __periodic_sync_h
49 |
50 | #ifdef __cplusplus
51 | extern "C" {
52 | #endif
53 |
54 | int periodic_sync_thread_init(int sec, struct ltfs_volume *vol);
55 | int periodic_sync_thread_destroy(void* syncer_handle);
56 | bool periodic_sync_thread_initialized(void* syncer_handle);
57 | int periodic_sync_thread_signal(void *syncer_handle);
58 |
59 | #ifdef __cplusplus
60 | }
61 | #endif
62 |
63 | #endif /* __periodic_sync_h */
64 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/uthash_ext.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | */
34 |
35 | /*************************************************************************************
36 | ** FILE NAME: uthash_ext.h
37 | **
38 | ** DESCRIPTION: Header file for HASH function extensions.
39 | **
40 | ** AUTHORS:
41 | ** IBM Yamato, Japan
42 | **
43 | *************************************************************************************
44 | */
45 | #ifndef __uthash_ext_h
46 | #define __uthash_ext_h
47 |
48 | #include "uthash.h"
49 |
50 | #ifdef __cplusplus
51 | extern "C" {
52 | #endif
53 |
54 | #define HASH_FIND_PARTIAL(structure,start,length,table,search,result) \
55 | do { \
56 | structure *s, *tmp; \
57 | result = NULL; \
58 | HASH_ITER(hh, table, s, tmp) { \
59 | if (HASH_KEYCMP(&s->start, &search.start, length) == 0) { \
60 | result = s; \
61 | break; \
62 | } \
63 | } \
64 | } while (0)
65 |
66 | #ifdef __cplusplus
67 | }
68 | #endif
69 |
70 | #endif /* uthash_ext_h */
71 |
--------------------------------------------------------------------------------
/ltfs/src/libltfs/xml_common.c:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: xml_common.c
39 | **
40 | ** DESCRIPTION: XML module initialization and teardown routines.
41 | **
42 | ** AUTHORS: Brian Biskeborn
43 | ** IBM Almaden Research Center
44 | ** bbiskebo@us.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #include "xml.h"
50 |
51 | void xml_init()
52 | {
53 | LIBXML_TEST_VERSION;
54 | }
55 |
56 | void xml_finish()
57 | {
58 | xmlCleanupParser();
59 | }
60 |
--------------------------------------------------------------------------------
/ltfs/src/ltfs_copyright.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: ltfs_copyright.h
39 | **
40 | ** DESCRIPTION: Defines components of the LTFS copyright string.
41 | **
42 | ** AUTHOR: Brian Biskeborn
43 | ** IBM Almaden Research Center
44 | ** bbiskebo@us.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifndef __ltfs_copyright_h__
50 | #define __ltfs_copyright_h__
51 |
52 | #ifdef __cplusplus
53 | extern "C" {
54 | #endif
55 |
56 | #define LTFS_COPYRIGHT_0 "Licensed Materials - Property of IBM"
57 | #define LTFS_COPYRIGHT_1 "IBM Linear Tape File System Single Drive Edition"
58 | #define LTFS_COPYRIGHT_2 "(C) Copyright IBM Corp. 2011, 2012 All Rights Reserved"
59 | #define LTFS_COPYRIGHT_3 "US Government Users Restricted Rights - Use, duplication or "
60 | #define LTFS_COPYRIGHT_4 "disclosure restricted by GSA ADP Schedule Contract with"
61 | #define LTFS_COPYRIGHT_5 "IBM Corp."
62 |
63 | #ifdef __cplusplus
64 | }
65 | #endif
66 |
67 | #endif
68 |
--------------------------------------------------------------------------------
/ltfs/src/ltfs_msgs.h:
--------------------------------------------------------------------------------
1 | //
2 | // Values are 32 bit values laid out as follows:
3 | //
4 | // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
5 | // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
6 | // +---+-+-+-----------------------+-------------------------------+
7 | // |Sev|C|R| Facility | Code |
8 | // +---+-+-+-----------------------+-------------------------------+
9 | //
10 | // where
11 | //
12 | // Sev - is the severity code
13 | //
14 | // 00 - Success
15 | // 01 - Informational
16 | // 10 - Warning
17 | // 11 - Error
18 | //
19 | // C - is the Customer code flag
20 | //
21 | // R - is a reserved bit
22 | //
23 | // Facility - is the facility code
24 | //
25 | // Code - is the facility's status code
26 | //
27 | //
28 | // Define the facility codes
29 | //
30 |
31 |
32 | //
33 | // Define the severity codes
34 | //
35 | #define STATUS_SEVERITY_WARNING 0x2
36 | #define STATUS_SEVERITY_SUCCESS 0x0
37 | #define STATUS_SEVERITY_INFORMATIONAL 0x1
38 | #define STATUS_SEVERITY_ERROR 0x3
39 |
40 |
41 | //
42 | // MessageId: LTFS_ERROR_EVENT
43 | //
44 | // MessageText:
45 | //
46 | // The LTFS file system encountered an error
47 | //
48 | #define LTFS_ERROR_EVENT ((DWORD)0x00000064L)
49 |
50 |
--------------------------------------------------------------------------------
/ltfs/src/ltfs_msgs.mc:
--------------------------------------------------------------------------------
1 | ;/*
2 | ; This MC file allows us to suppress the warnings in the event log
3 | ; about there being no provider for our messages.
4 | ;
5 | ; To compile this MC file and generate a new RC file, use the following
6 | ; command:
7 | ;
8 | ; mc.exe ltfs_msgs.mc
9 | ;*/
10 | MessageIdTypedef=DWORD
11 |
12 | SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS
13 | Informational=0x1:STATUS_SEVERITY_INFORMATIONAL
14 | Warning=0x2:STATUS_SEVERITY_WARNING
15 | Error=0x3:STATUS_SEVERITY_ERROR
16 | )
17 |
18 | MessageId=100
19 | SymbolicName=LTFS_ERROR_EVENT
20 | Language=English
21 | The LTFS file system encountered an error
22 | .
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ltfs/src/ltfs_msgs.rc:
--------------------------------------------------------------------------------
1 | LANGUAGE 0x9,0x1
2 | 1 11 "MSG00001.bin"
3 |
--------------------------------------------------------------------------------
/ltfs/src/ltfsprintf.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | *************************************************************************************
34 | **
35 | ** COMPONENT NAME: IBM Linear Tape File System
36 | **
37 | ** FILE NAME: ltfsprintf.h
38 | **
39 | ** DESCRIPTION: Implements a basic printf based logging function.
40 | ** This function should not be used as a permanent logging
41 | ** in the LTFS code base unless there is a compelling reason
42 | ** to avoid dependency on the official logging framework.
43 | **
44 | ** AUTHORS: Michael A. Richmond
45 | ** IBM Almaden Research Center
46 | ** mar@almaden.ibm.com
47 | **
48 | *************************************************************************************
49 | */
50 |
51 |
52 | #ifndef __ltfs_printf_h
53 | #define __ltfs_printf_h
54 |
55 | #ifdef __cplusplus
56 | extern "C" {
57 | #endif
58 |
59 | #include
60 |
61 | /* For printing debug messages */
62 | #define ltfsprintf(fmt, ...) \
63 | do { \
64 | fprintf(stderr, "["__FILE__"::%d] "fmt"\n", __LINE__, ##__VA_ARGS__); \
65 | } while(0)
66 |
67 | #ifdef __cplusplus
68 | }
69 | #endif
70 |
71 | #endif /* __ltfs_printf_h */
72 |
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/crc32c_crc.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: crc32c_crc.h
39 | **
40 | ** DESCRIPTION: Implements CRC32C CRC usd by LTO based drives
41 | **
42 | ** AUTHORS: Mitsuhiro Nishida
43 | ** IBM Tokyo Lab., Japan
44 | ** mini@jp.ibm.com
45 | **
46 | ** Atsushi Abe
47 | ** IBM Tokyo Lab., Japan
48 | ** piste@jp.ibm.com
49 | **
50 | *************************************************************************************
51 | */
52 |
53 | #ifndef __crc32c_crc_h
54 | #define __crc32c_crc_h
55 |
56 | #ifdef __cplusplus
57 | extern "C" {
58 | #endif
59 |
60 | void *memcpy_crc32c_enc(void *dest, const void *src, size_t n);
61 | int memcpy_crc32c_check(void *dest, const void *src, size_t n);
62 | void crc32c_enc(void *buf, size_t n);
63 | int crc32c_check(void *buf, size_t n);
64 |
65 | #ifdef __cplusplus
66 | }
67 | #endif
68 |
69 | #endif // __crc32c_crc_h
70 |
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/generic/file/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # %Z% %I% %W% %G% %U%
3 | #
4 | # ZZ_Copyright_BEGIN
5 | #
6 | #
7 | # Licensed Materials - Property of IBM
8 | #
9 | # IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | #
11 | # Copyright IBM Corp. 2010, 2014
12 | #
13 | # This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | # (formally known as IBM Linear Tape File System)
15 | #
16 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | # you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | # General Public License as published by the Free Software Foundation,
19 | # version 2.1 of the License.
20 | #
21 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | # hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | # See the GNU Lesser General Public License for more details.
25 | #
26 | # You should have received a copy of the GNU Lesser General Public
27 | # License along with this library; if not, write to the Free Software
28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | # or download the license from .
30 | #
31 | #
32 | # ZZ_Copyright_END
33 | #
34 |
35 | lib_LTLIBRARIES = libdriver-file.la
36 | libdir = @libdir@/ltfs
37 |
38 | AM_LIBTOOLFLAGS = --tag=disable-static
39 |
40 | libdriver_file_la_SOURCES = filedebug_tc.c
41 | libdriver_file_la_DEPENDENCIES = ../../../../messages/driver_generic_file_dat.o
42 | libdriver_file_la_LIBADD = ../../../../messages/driver_generic_file_dat.o
43 | libdriver_file_la_LDFLAGS = -avoid-version -module
44 | libdriver_file_la_CPPFLAGS = @AM_CPPFLAGS@ -I ../../..
45 |
46 | install-exec-hook:
47 | for f in $(lib_LTLIBRARIES); do rm -f $(libdir)/$$f; done
48 |
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/generic/itdtimg/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # %Z% %I% %W% %G% %U%
3 | #
4 | # ZZ_Copyright_BEGIN
5 | #
6 | #
7 | # Licensed Materials - Property of IBM
8 | #
9 | # IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | #
11 | # Copyright IBM Corp. 2010, 2014
12 | #
13 | # This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | # (formally known as IBM Linear Tape File System)
15 | #
16 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | # you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | # General Public License as published by the Free Software Foundation,
19 | # version 2.1 of the License.
20 | #
21 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | # hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | # See the GNU Lesser General Public License for more details.
25 | #
26 | # You should have received a copy of the GNU Lesser General Public
27 | # License along with this library; if not, write to the Free Software
28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | # or download the license from .
30 | #
31 | #
32 | # ZZ_Copyright_END
33 | #
34 |
35 | lib_LTLIBRARIES = libdriver-itdtimg.la
36 | libdir = @libdir@/ltfs
37 |
38 | AM_LIBTOOLFLAGS = --tag=disable-static
39 |
40 | libdriver_itdtimg_la_SOURCES = itdtimg_tc.c
41 | libdriver_itdtimg_la_DEPENDENCIES = ../../../../messages/driver_generic_itdtimg_dat.o
42 | libdriver_itdtimg_la_LIBADD = ../../../../messages/driver_generic_itdtimg_dat.o
43 | libdriver_itdtimg_la_LDFLAGS = -avoid-version -module
44 | libdriver_itdtimg_la_CPPFLAGS = @AM_CPPFLAGS@ -I ../../..
45 |
46 | install-exec-hook:
47 | for f in $(lib_LTLIBRARIES); do rm -f $(libdir)/$$f; done
48 |
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/linux/ibmtape/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # %Z% %I% %W% %G% %U%
3 | #
4 | # ZZ_Copyright_BEGIN
5 | #
6 | #
7 | # Licensed Materials - Property of IBM
8 | #
9 | # IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | #
11 | # Copyright IBM Corp. 2010, 2014
12 | #
13 | # This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | # (formally known as IBM Linear Tape File System)
15 | #
16 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | # you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | # General Public License as published by the Free Software Foundation,
19 | # version 2.1 of the License.
20 | #
21 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | # hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | # See the GNU Lesser General Public License for more details.
25 | #
26 | # You should have received a copy of the GNU Lesser General Public
27 | # License along with this library; if not, write to the Free Software
28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | # or download the license from .
30 | #
31 | #
32 | # ZZ_Copyright_END
33 | #
34 |
35 | lib_LTLIBRARIES = libdriver-ibmtape.la
36 | libdir = @libdir@/ltfs
37 |
38 | AM_LIBTOOLFLAGS = --tag=disable-static
39 |
40 | libdriver_ibmtape_la_SOURCES = ibmtape_cmn.c ibmtape_tc.c
41 | libdriver_ibmtape_la_DEPENDENCIES = ../../../../messages/driver_linux_ibmtape_dat.o ./libdriver_ibmtape_la-reed_solomon_crc.lo ./libdriver_ibmtape_la-crc32c_crc.lo
42 | libdriver_ibmtape_la_LIBADD = ../../../../messages/driver_linux_ibmtape_dat.o ./libdriver_ibmtape_la-reed_solomon_crc.lo ./libdriver_ibmtape_la-crc32c_crc.lo
43 | libdriver_ibmtape_la_LDFLAGS = -avoid-version -module
44 | libdriver_ibmtape_la_CPPFLAGS = @AM_CPPFLAGS@ -I ../../.. -I ../..
45 |
46 | libdriver_ibmtape_la-reed_solomon_crc.lo: ../../reed_solomon_crc.c
47 | $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdriver_ibmtape_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CRC_OPTIMIZE) -MT libdriver_ibmtape_la-reed_solomon_crc.lo -MD -MP -c -o libdriver_ibmtape_la-reed_solomon_crc.lo $<
48 |
49 | libdriver_ibmtape_la-crc32c_crc.lo: ../../crc32c_crc.c
50 | $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdriver_ibmtape_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CRC_OPTIMIZE) -MT libdriver_ibmtape_la-crc32c_crc.lo -MD -MP -c -o libdriver_ibmtape_la-crc32c_crc.lo $<
51 |
52 | install-exec-hook:
53 | for f in $(lib_LTLIBRARIES); do rm -f $(libdir)/$$f; done
54 |
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/linux/ltotape/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # Hewlett Packard LTFS backend for LTO and DAT tape drives
3 | #
4 | # FILE: Makefile.am
5 | #
6 | # CONTENTS: Makefile specifics for ltotape backend
7 | #
8 | # (C) Copyright 2015, 2016 Hewlett Packard Enterprise Development LP
9 | #
10 | # This program is free software; you can redistribute it and/or modify it
11 | # under the terms of version 2.1 of the GNU Lesser General Public License
12 | # as published by the Free Software Foundation.
13 | #
14 | # This program is distributed in the hope that it will be useful, but
15 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 | # License for more details.
18 | #
19 | # You should have received a copy of the GNU General Public License along
20 | # with this program; if not, write to:
21 | # Free Software Foundation, Inc.
22 | # 51 Franklin Street, Fifth Floor
23 | # Boston, MA 02110-1301, USA.
24 | #
25 |
26 | lib_LTLIBRARIES = libdriver-ltotape.la
27 | libdir = @libdir@/ltfs
28 |
29 | AM_LIBTOOLFLAGS = --tag=disable-static
30 |
31 | libdriver_ltotape_la_SOURCES = ltotape.c ltotape_diag.c ltotape_platform.c
32 | libdriver_ltotape_la_DEPENDENCIES = $(top_srcdir)/messages/driver_ltotape_dat.o
33 | libdriver_ltotape_la_LIBADD = $(top_srcdir)/messages/driver_ltotape_dat.o
34 | libdriver_ltotape_la_CPPFLAGS = -I$(top_srcdir)/src @AM_CPPFLAGS@
35 | libdriver_ltotape_la_LDFLAGS = -avoid-version -module
36 |
37 | install-exec-hook:
38 | for f in $(lib_LTLIBRARIES); do rm -f $(libdir)/$$f; done
39 |
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/linux/ltotape/ltotape.c:
--------------------------------------------------------------------------------
1 | ../../osx/ltotape/ltotape.c
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/linux/ltotape/ltotape.h:
--------------------------------------------------------------------------------
1 | ../../osx/ltotape/ltotape.h
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/linux/ltotape/ltotape_diag.c:
--------------------------------------------------------------------------------
1 | ../../osx/ltotape/ltotape_diag.c
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/linux/ltotape/ltotape_diag.h:
--------------------------------------------------------------------------------
1 | ../../osx/ltotape/ltotape_diag.h
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/linux/ltotape/ltotape_supdevs.h:
--------------------------------------------------------------------------------
1 | ../../osx/ltotape/ltotape_supdevs.h
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/linux/ltotape/ltotape_timeout.h:
--------------------------------------------------------------------------------
1 | ../../osx/ltotape/ltotape_timeout.h
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/osx/iokit/device_identifiers.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: tape_drivers/osx/iokit/device_identifiers.h
39 | **
40 | ** DESCRIPTION: Header file defining devices supported for
41 | ** LTFS.
42 | **
43 | ** AUTHOR: Michael A. Richmond
44 | ** IBM Almaden Research Center
45 | ** mar@almaden.ibm.com
46 | **
47 | *************************************************************************************
48 | */
49 |
50 |
51 | #include "tape_timeout.h"
52 | #include "tape_drivers/tape_drivers.h"
53 |
54 | #ifndef __device_identifiers_h
55 | #define __device_identifiers_h
56 |
57 | #define IBM_VENDOR_ID "IBM"
58 | struct supported_device {
59 | char vendor_id[VENDOR_ID_LENGTH + 1];
60 | char product_id[PRODUCT_ID_LENGTH + 1];
61 | int device_code;
62 | DRIVE_TYPE drive_type;
63 | char product_name[PRODUCT_NAME_LENGTH + 1];
64 | };
65 |
66 | #define DEVICE(v, p, c, t, n) &(struct supported_device){ v, p, c, t, n }
67 |
68 | extern struct supported_device *supported_devices[];
69 |
70 | #endif /* __device_identifiers_h */
71 |
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/osx/iokit/scsi_mode_pages.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: tape_drivers/osx/iokit/scsi_mode_pages.h
39 | **
40 | ** DESCRIPTION: Header file for raw SCSI mode pages.
41 | **
42 | ** AUTHOR: Michael A. Richmond
43 | ** IBM Almaden Research Center
44 | ** mar@almaden.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 |
50 | #ifndef __scsi_mode_pages_h
51 | #define __scsi_mode_pages_h
52 |
53 | #define DATA_COMPRESSION_PAGE_NUMBER 0x0F
54 | #define DEVICE_CONFIGURATION_PAGE_NUMBER 0x10
55 | #define MEDIUM_SENSE_PAGE_NUMBER 0x23
56 |
57 | /* medium sense page (359x only) */
58 | #define Capacity100 0x00
59 | #define Capacity75 0xC0
60 | #define Capacity50 0x80
61 | #define Capacity25 0x40
62 | #define Capacity100RangeHigh 0xff
63 | #define Capacity100RangeLow 0xC1
64 | #define Capacity75RangeHigh 0xC0
65 | #define Capacity75RangeLow 0x81
66 | #define Capacity50RangeHigh 0x80
67 | #define Capacity50RangeLow 0x41
68 | #define Capacity25RangeHigh 0x40
69 | #define Capacity25RangeLow 0x01
70 |
71 | #endif /* __scsi_mode_pages_h */
72 |
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/osx/ltotape/ltotape_supdevs.h:
--------------------------------------------------------------------------------
1 | /************************************************************************************
2 | **
3 | ** Hewlett Packard LTFS backend for HP LTO and DAT tape drives
4 | **
5 | ** FILE: ltotape_supdevs.h
6 | **
7 | ** CONTENTS: Array of devices supported by this backend
8 | **
9 | ** (C) Copyright 2015 - 2017 Hewlett Packard Enterprise Development LP
10 | **
11 | ** This program is free software; you can redistribute it and/or modify it
12 | ** under the terms of version 2.1 of the GNU Lesser General Public License
13 | ** as published by the Free Software Foundation.
14 | **
15 | ** This program is distributed in the hope that it will be useful, but
16 | ** WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17 | ** or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 | ** License for more details.
19 | **
20 | ** You should have received a copy of the GNU General Public License along
21 | ** with this program; if not, write to:
22 | ** Free Software Foundation, Inc.
23 | ** 51 Franklin Street, Fifth Floor
24 | ** Boston, MA 02110-1301, USA.
25 | **
26 | ** 18 August 2010
27 | **
28 | *************************************************************************************
29 | */
30 |
31 | #ifndef __ltotape_supdevs_h
32 | #define __ltotape_supdevs_h
33 |
34 | /*
35 | * Array of device types supported by this back end:
36 | */
37 | const supported_device_type supported_devices[] = {
38 | { "Ultrium 5-SCSI ", drivefamily_lto, "HP LTO5", drive_lto5 },
39 | { "Ultrium 6-SCSI ", drivefamily_lto, "HP LTO6", drive_lto6 },
40 | { "Ultrium 7-SCSI ", drivefamily_lto, "HP LTO7", drive_lto7 },
41 | { "Ultrium 8-SCSI ", drivefamily_lto, "HPE LTO8", drive_lto8 },
42 | { "ULTRIUM 5 ", drivefamily_lto, "Quantum LTO5", drive_lto5 },
43 | { "ULTRIUM 6 ", drivefamily_lto, "Quantum LTO6", drive_lto6 },
44 | { "ULTRIUM 7 ", drivefamily_lto, "Quantum LTO7", drive_lto7 },
45 | { "ULTRIUM 8 ", drivefamily_lto, "Quantum LTO8", drive_lto8 },
46 | { "LTO-5 HH ", drivefamily_lto, "TANDBERG DATA LTO5", drive_lto5 },
47 | { "LTO-6 HH ", drivefamily_lto, "TANDBERG DATA LTO6", drive_lto6 },
48 | { "DAT320 ", drivefamily_dat, "HP DAT320", drive_dat },
49 | { "DAT160 ", drivefamily_dat, "HP DAT160", drive_dat },
50 | { (const char*)NULL, drivefamily_unknown, "Unknown", drive_unknown }
51 | };
52 |
53 | #endif // __ltotape_diag_h
54 |
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/reed_solomon_crc.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: reed_solomon_crc.h
39 | **
40 | ** DESCRIPTION: Implements Reed-Solomon GF(256) CRC usd by LTO based drives
41 | **
42 | ** AUTHOR: Atsushi Abe
43 | ** IBM Tokyo Lab., Japan
44 | ** PISTE@jp.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifndef __reed_solomon_crc_h
50 | #define __reed_solomon_crc_h
51 |
52 | #ifdef __cplusplus
53 | extern "C" {
54 | #endif
55 |
56 | void *memcpy_rs_gf256_enc(void *dest, const void *src, size_t n);
57 | int memcpy_rs_gf256_check(void *dest, const void *src, size_t n);
58 | void rs_gf256_enc(void *buf, size_t n);
59 | int rs_gf256_check(void *buf, size_t n);
60 |
61 | #ifdef __cplusplus
62 | }
63 | #endif
64 |
65 | #endif // __reed_solomon_crc_h
66 |
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/tape_drivers.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** %Z% %I% %W% %G% %U%
3 | **
4 | ** ZZ_Copyright_BEGIN
5 | **
6 | **
7 | ** Licensed Materials - Property of IBM
8 | **
9 | ** IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | **
11 | ** Copyright IBM Corp. 2010, 2014
12 | **
13 | ** This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | ** (formally known as IBM Linear Tape File System)
15 | **
16 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | ** you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | ** General Public License as published by the Free Software Foundation,
19 | ** version 2.1 of the License.
20 | **
21 | ** The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | ** hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | ** See the GNU Lesser General Public License for more details.
25 | **
26 | ** You should have received a copy of the GNU Lesser General Public
27 | ** License along with this library; if not, write to the Free Software
28 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | ** or download the license from .
30 | **
31 | **
32 | ** ZZ_Copyright_END
33 | **
34 | *************************************************************************************
35 | **
36 | ** COMPONENT NAME: IBM Linear Tape File System
37 | **
38 | ** FILE NAME: tape_drivers/tape_drivers.h
39 | **
40 | ** DESCRIPTION: Prototypes for common tape operations.
41 | **
42 | ** AUTHOR: Yutaka Oishi
43 | ** IBM Yamato, Japan
44 | ** OISHI@jp.ibm.com
45 | **
46 | *************************************************************************************
47 | */
48 |
49 | #ifndef __tape_drivers_h
50 | #define __tape_drivers_h
51 |
52 | #define KB (1024)
53 | #define MB (KB * 1024)
54 | #define GB (MB * 1024)
55 |
56 | #define VENDOR_ID_LENGTH 8
57 | #define PRODUCT_ID_LENGTH 16
58 | #define PRODUCT_NAME_LENGTH (PRODUCT_ID_LENGTH + 3) /* " [PRODUCT_ID]" */
59 | #define PRODUCT_REV_LENGTH 4
60 |
61 | static const char base_firmware_level_lto5[] = "B170";
62 | static const char base_firmware_level_ts1140[] = "3694";
63 |
64 | typedef void (*crc_enc)(void *buf, size_t n);
65 | typedef int (*crc_check)(void *buf, size_t n);
66 | typedef void* (*memcpy_crc_enc)(void *dest, const void *src, size_t n);
67 | typedef int (*memcpy_crc_check)(void *dest, const void *src, size_t n);
68 |
69 | typedef enum {
70 | DRIVE_UNSUPPORTED, /* Unsupported drive */
71 | DRIVE_LTO5, /* IBM Ultrium Gen 5 */
72 | DRIVE_LTO5_HH, /* IBM Ultrium Gen 5 Half-High */
73 | DRIVE_LTO6, /* IBM Ultrium Gen 6 */
74 | DRIVE_LTO6_HH, /* IBM Ultrium Gen 6 Half-High */
75 | DRIVE_TS1140, /* TS1140 */
76 | DRIVE_TS1150, /* TS1150 */
77 | } DRIVE_TYPE;
78 |
79 | #endif // __tape_drivers_h
80 |
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/windows/ltotape/Makefile:
--------------------------------------------------------------------------------
1 |
2 | # Rough makefile for building the Microsoft Windows ltotape backend
3 | # under cygwin.
4 | #
5 | # Expect this to change majorly before it becomes useful..
6 |
7 | CC=/bin/gcc
8 | CFLAGS=-g -c -DHP_BUILD
9 | HAX=-DUChar="unsigned char"
10 | INC=-I. -I../../..
11 |
12 | SRCS=ltotape_platform.c ltotape_diag.c ltotape.c
13 |
14 | LIBRARY: $(SRCS)
15 | $(CC) $(CFLAGS) $(INC) $(HAX) $(SRCS)
16 |
17 | clean:
18 | rm -f $(SRCS:.c=.o) testharness.exe
19 |
20 | # Test harness program, purely for trying out the backend functions before LTFS ported..
21 | testharness: $(SRCS) testharness.c
22 | $(CC) -g $(INC) testharness.c $(SRCS:.c=.o) -o testharness
23 |
24 |
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/windows/ltotape/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # Hewlett Packard LTFS backend for LTO and DAT tape drives
3 | #
4 | # FILE: Makefile.am
5 | #
6 | # CONTENTS: Makefile specifics for ltotape backend
7 | #
8 | # (C) Copyright 2015, 2016 Hewlett Packard Enterprise Development LP
9 | #
10 | # This program is free software; you can redistribute it and/or modify it
11 | # under the terms of version 2.1 of the GNU Lesser General Public License
12 | # as published by the Free Software Foundation.
13 | #
14 | # This program is distributed in the hope that it will be useful, but
15 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 | # License for more details.
18 | #
19 | # You should have received a copy of the GNU General Public License along
20 | # with this program; if not, write to:
21 | # Free Software Foundation, Inc.
22 | # 51 Franklin Street, Fifth Floor
23 | # Boston, MA 02110-1301, USA.
24 | #
25 |
26 | lib_LTLIBRARIES = libdriver-ltotape-win.la
27 | libdir = @libdir@/ltfs
28 |
29 | AM_LIBTOOLFLAGS = --tag=disable-static
30 |
31 | libdriver_ltotape_win_la_SOURCES = ltotape.c ltotape_diag.c ltotape_platform.c
32 | libdriver_ltotape_win_la_DEPENDENCIES = $(top_srcdir)/messages/libdriver_ltotape.a
33 | libdriver_ltotape_win_la_LIBADD = -L$(abs_top_srcdir)/messages -ldriver_ltotape ../../../libltfs/libltfs.la -lfuse4win
34 | libdriver_ltotape_win_la_CPPFLAGS = -I$(top_srcdir)/src @AM_CPPFLAGS@
35 | libdriver_ltotape_win_la_LDFLAGS = -avoid-version -no-undefined
36 |
37 | install-exec-hook:
38 | for f in $(lib_LTLIBRARIES); do rm -f $(libdir)/$$f; done
39 |
--------------------------------------------------------------------------------
/ltfs/src/tape_drivers/windows/ltotape/ltotape_supdevs.h:
--------------------------------------------------------------------------------
1 | /************************************************************************************
2 | **
3 | ** Hewlett Packard LTFS backend for HP LTO and DAT tape drives
4 | **
5 | ** FILE: ltotape_supdevs.h
6 | **
7 | ** CONTENTS: Array of devices supported by this backend
8 | **
9 | ** (C) Copyright 2015 - 2017 Hewlett Packard Enterprise Development LP
10 | **
11 | ** This program is free software; you can redistribute it and/or modify it
12 | ** under the terms of version 2.1 of the GNU Lesser General Public License
13 | ** as published by the Free Software Foundation.
14 | **
15 | ** This program is distributed in the hope that it will be useful, but
16 | ** WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17 | ** or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 | ** License for more details.
19 | **
20 | ** You should have received a copy of the GNU General Public License along
21 | ** with this program; if not, write to:
22 | ** Free Software Foundation, Inc.
23 | ** 51 Franklin Street, Fifth Floor
24 | ** Boston, MA 02110-1301, USA.
25 | **
26 | ** 18 August 2010
27 | **
28 | *************************************************************************************
29 | */
30 |
31 | #ifndef __ltotape_supdevs_h
32 | #define __ltotape_supdevs_h
33 |
34 | /*
35 | * Array of device types supported by this back end:
36 | */
37 | const supported_device_type supported_devices[] = {
38 | { "Ultrium 5-SCSI ", drivefamily_lto, "HP LTO5", drive_lto5 },
39 | { "Ultrium 6-SCSI ", drivefamily_lto, "HP LTO6", drive_lto6 },
40 | { "Ultrium 7-SCSI ", drivefamily_lto, "HP LTO7", drive_lto7 },
41 | { "Ultrium 8-SCSI ", drivefamily_lto, "HPE LTO8", drive_lto8 },
42 | { "ULTRIUM 5 ", drivefamily_lto, "Quantum LTO5", drive_lto5 },
43 | { "ULTRIUM 6 ", drivefamily_lto, "Quantum LTO6", drive_lto6 },
44 | { "ULTRIUM 7 ", drivefamily_lto, "Quantum LTO7", drive_lto7 },
45 | { "ULTRIUM 8 ", drivefamily_lto, "Quantum LTO8", drive_lto8 },
46 | { "LTO-5 HH ", drivefamily_lto, "TANDBERG DATA LTO5", drive_lto5 },
47 | { "LTO-6 HH ", drivefamily_lto, "TANDBERG DATA LTO6", drive_lto6 },
48 | { "DAT320 ", drivefamily_dat, "HP DAT320", drive_dat },
49 | { "DAT160 ", drivefamily_dat, "HP DAT160", drive_dat },
50 | { (const char*)NULL, drivefamily_unknown, "Unknown", drive_unknown }
51 | };
52 |
53 | #endif // __ltotape_diag_h
54 |
--------------------------------------------------------------------------------
/ltfs/src/utils/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # %Z% %I% %W% %G% %U%
3 | #
4 | # ZZ_Copyright_BEGIN
5 | #
6 | #
7 | # Licensed Materials - Property of IBM
8 | #
9 | # IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | #
11 | # Copyright IBM Corp. 2010, 2014
12 | #
13 | # This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | # (formally known as IBM Linear Tape File System)
15 | #
16 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | # you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | # General Public License as published by the Free Software Foundation,
19 | # version 2.1 of the License.
20 | #
21 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | # hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | # See the GNU Lesser General Public License for more details.
25 | #
26 | # You should have received a copy of the GNU Lesser General Public
27 | # License along with this library; if not, write to the Free Software
28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | # or download the license from .
30 | #
31 | #
32 | # ZZ_Copyright_END
33 | #
34 |
35 | bin_PROGRAMS = mkltfs ltfsck unltfs
36 |
37 | noinst_HEADERS =
38 |
39 | mkltfs_SOURCES = mkltfs.c
40 | mkltfs_DEPENDENCIES = ../libltfs/libltfs.la ../../messages/bin_mkltfs_dat.o
41 | mkltfs_LDADD = ../libltfs/libltfs.la ../../messages/bin_mkltfs_dat.o
42 | mkltfs_CPPFLAGS = @AM_CPPFLAGS@ -I ..
43 |
44 | unltfs_SOURCES = unltfs.c
45 | unltfs_DEPENDENCIES = ../libltfs/libltfs.la ../../messages/bin_mkltfs_dat.o
46 | unltfs_LDADD = ../libltfs/libltfs.la ../../messages/bin_mkltfs_dat.o
47 | unltfs_CPPFLAGS = @AM_CPPFLAGS@ -I ..
48 |
49 | ltfsck_SOURCES = ltfsck.c
50 | ltfsck_DEPENDENCIES = ../libltfs/libltfs.la ../../messages/bin_ltfsck_dat.o
51 | ltfsck_LDADD = ../libltfs/libltfs.la ../../messages/bin_ltfsck_dat.o
52 | ltfsck_CPPFLAGS = @AM_CPPFLAGS@ -I ..
53 |
--------------------------------------------------------------------------------
/ltfs/src/utils/Makefile.am_Windows:
--------------------------------------------------------------------------------
1 | #
2 | # %Z% %I% %W% %G% %U%
3 | #
4 | # ZZ_Copyright_BEGIN
5 | #
6 | #
7 | # Licensed Materials - Property of IBM
8 | #
9 | # IBM Linear Tape File System Single Drive Edition Version 2.2.0.2 for Linux and Mac OS X
10 | #
11 | # Copyright IBM Corp. 2010, 2014
12 | #
13 | # This file is part of the IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X
14 | # (formally known as IBM Linear Tape File System)
15 | #
16 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is free software;
17 | # you can redistribute it and/or modify it under the terms of the GNU Lesser
18 | # General Public License as published by the Free Software Foundation,
19 | # version 2.1 of the License.
20 | #
21 | # The IBM Linear Tape File System Single Drive Edition for Linux and Mac OS X is distributed in the
22 | # hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
23 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 | # See the GNU Lesser General Public License for more details.
25 | #
26 | # You should have received a copy of the GNU Lesser General Public
27 | # License along with this library; if not, write to the Free Software
28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 | # or download the license from .
30 | #
31 | #
32 | # ZZ_Copyright_END
33 | #
34 | ###############################################################################
35 | #
36 | # Copyright (C) 2012 OSR Open Systems Resources, Inc.
37 | #
38 | ###############################################################################
39 |
40 |
41 | bin_PROGRAMS = mkltfs ltfsck unltfs
42 |
43 | noinst_HEADERS =
44 |
45 | mkltfs_SOURCES = mkltfs.c
46 | #
47 | # OSR/HPE_mingw_BUILD
48 | #
49 | # In our MinGW environment, we dynamically link to the package
50 | # data.
51 | #
52 | mkltfs_DEPENDENCIES = ../libltfs/libltfs.la ../../messages/libbin_mkltfs.a
53 | mkltfs_LDADD = -L../../messages ../libltfs/libltfs.la -lbin_mkltfs -lbin_libltfs
54 | mkltfs_CPPFLAGS = @AM_CPPFLAGS@ -I ..
55 |
56 | unltfs_SOURCES = unltfs.c
57 | #
58 | # OSR/HPE_mingw_BUILD
59 | #
60 | # In our MinGW environment, we dynamically link to the package
61 | # data.
62 | #
63 | unltfs_DEPENDENCIES = ../libltfs/libltfs.la ../../messages/libbin_mkltfs.a
64 | unltfs_LDADD = -L../../messages ../libltfs/libltfs.la -lbin_mkltfs -lbin_libltfs
65 | unltfs_CPPFLAGS = @AM_CPPFLAGS@ -I ..
66 |
67 | ltfsck_SOURCES = ltfsck.c
68 | #
69 | # OSR/HPE_mingw_BUILD
70 | #
71 | # In our MinGW environment, we dynamically link to the package
72 | # data.
73 | #
74 | ltfsck_DEPENDENCIES = ../libltfs/libltfs.la ../../messages/libbin_ltfsck.a
75 | ltfsck_LDADD = -L../../messages ../libltfs/libltfs.la -lbin_ltfsck -lbin_libltfs
76 | ltfsck_CPPFLAGS = @AM_CPPFLAGS@ -I ..
77 |
--------------------------------------------------------------------------------