Radix cross Linux

The main Radix cross Linux repository contains the build scripts of packages, which have the most complete and common functionality for desktop machines

452 Commits   2 Branches   1 Tag
Index: Makefile
===================================================================
--- Makefile	(nonexistent)
+++ Makefile	(revision 5)
@@ -0,0 +1,62 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/a/xfs/xfsdump-dev
+
+versions    = 3.1.9
+pkgname     = xfsdump
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches     = $(CURDIR)/patches/xfsdump-3.1.9-buildmacros.patch
+patches    += $(CURDIR)/patches/xfsdump-3.1.9-getopt.patch
+patches    += $(CURDIR)/patches/xfsdump-3.1.9-librmt.patch
+patches    += $(CURDIR)/patches/xfsdump-3.1.9-xattr.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-3.1.9-buildmacros-patch ; ./create.patch.sh ) ; \
+	 ( cd create-3.1.9-getopt-patch      ; ./create.patch.sh ) ; \
+	 ( cd create-3.1.9-librmt-patch      ; ./create.patch.sh ) ; \
+	 ( cd create-3.1.9-xattr-patch       ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: create-3.1.9-buildmacros-patch/create.patch.sh
===================================================================
--- create-3.1.9-buildmacros-patch/create.patch.sh	(nonexistent)
+++ create-3.1.9-buildmacros-patch/create.patch.sh	(revision 5)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=3.1.9
+
+tar --files-from=file.list -xJvf ../xfsdump-$VERSION.tar.xz
+mv xfsdump-$VERSION xfsdump-$VERSION-orig
+
+cp -rf ./xfsdump-$VERSION-new ./xfsdump-$VERSION
+
+diff --unified -Nr  xfsdump-$VERSION-orig  xfsdump-$VERSION > xfsdump-$VERSION-buildmacros.patch
+
+mv xfsdump-$VERSION-buildmacros.patch ../patches
+
+rm -rf ./xfsdump-$VERSION
+rm -rf ./xfsdump-$VERSION-orig

Property changes on: create-3.1.9-buildmacros-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: create-3.1.9-buildmacros-patch/file.list
===================================================================
--- create-3.1.9-buildmacros-patch/file.list	(nonexistent)
+++ create-3.1.9-buildmacros-patch/file.list	(revision 5)
@@ -0,0 +1,2 @@
+xfsdump-3.1.9/include/builddefs.in
+xfsdump-3.1.9/include/buildmacros
Index: create-3.1.9-buildmacros-patch/xfsdump-3.1.9-new/include/builddefs.in
===================================================================
--- create-3.1.9-buildmacros-patch/xfsdump-3.1.9-new/include/builddefs.in	(nonexistent)
+++ create-3.1.9-buildmacros-patch/xfsdump-3.1.9-new/include/builddefs.in	(revision 5)
@@ -0,0 +1,114 @@
+#
+# Copyright (c) 2002-2006 Silicon Graphics, Inc.  All Rights Reserved.
+#
+# @configure_input@
+#
+
+ifndef _BUILDDEFS_INCLUDED_
+_BUILDDEFS_INCLUDED_ = 1
+
+DEBUG = @debug_build@
+OPTIMIZER = @opt_build@
+MALLOCLIB = @malloc_lib@
+LOADERFLAGS = @LDFLAGS@
+CFLAGS = @CFLAGS@
+
+LIBRMT = $(TOPDIR)/librmt/librmt.la
+LIBXFS = @libxfs@
+LIBATTR = @libattr@
+LIBPTHREAD = @libpthread@
+LIBUUID = @libuuid@
+LIBCURSES = @libcurses@
+LIBHANDLE = @libhdl@
+
+PKG_NAME	= @pkg_name@
+PKG_USER	= @pkg_user@
+PKG_GROUP	= @pkg_group@
+PKG_RELEASE	= @pkg_release@
+PKG_VERSION	= @pkg_version@
+PKG_PLATFORM	= @pkg_platform@
+PKG_DISTRIBUTION= @pkg_distribution@
+
+prefix		= @prefix@
+exec_prefix	= @exec_prefix@
+datarootdir	= @datarootdir@
+top_builddir	= @top_builddir@
+
+PKG_SBIN_DIR	= @sbindir@
+PKG_ROOT_SBIN_DIR = @root_sbindir@
+PKG_ROOT_LIB_DIR= @root_libdir@
+PKG_INC_DIR	= @includedir@
+PKG_MAN_DIR	= @mandir@
+PKG_DOC_DIR	= @datadir@/doc/@pkg_name@
+PKG_LOCALE_DIR	= @datadir@/locale
+
+CC		= @cc@
+AWK		= @awk@
+SED		= @sed@
+TAR		= @tar@
+ZIP		= @zip@
+MAKE		= @make@
+ECHO		= @echo@
+SORT		= @sort@
+LN_S		= @LN_S@
+SHELL		= @SHELL@
+LIBTOOL		= @LIBTOOL@
+MAKEDEPEND	= @makedepend@
+
+MSGFMT		= @msgfmt@
+MSGMERGE	= @msgmerge@
+XGETTEXT	= @xgettext@
+LOCALIZED_FILES	= @LOCALIZED_FILES@
+
+RPM		= @rpm@
+RPMBUILD	= @rpmbuild@
+RPM_VERSION	= @rpm_version@
+
+ENABLE_CURSES	= @enable_curses@
+ENABLE_SHARED	= @enable_shared@
+ENABLE_GETTEXT	= @enable_gettext@
+
+HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
+HAVE_FALLOCATE = @have_fallocate@
+
+GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall 
+#	   -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl
+
+ifeq ($(PKG_PLATFORM),linux)
+PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(GCCFLAGS)
+DEPENDFLAGS = -D__linux__
+endif
+ifeq ($(PKG_PLATFORM),darwin)
+PCFLAGS = -traditional-cpp $(GCCFLAGS)
+DEPENDFLAGS = -D__APPLE__
+endif
+ifeq ($(PKG_PLATFORM),irix)
+PLDLIBS = -ldisk -lgen
+DEPENDFLAGS = -D__sgi__
+endif
+ifeq ($(PKG_PLATFORM),freebsd)
+PLDLIBS = -L/usr/local/lib -lintl
+PCFLAGS = -I/usr/local/include $(GCCFLAGS)
+DEPENDFLAGS = -D__FreeBSD__
+endif
+
+GCFLAGS = $(OPTIMIZER) $(DEBUG) \
+	  -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\"  \
+	  -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include
+
+ifeq ($(ENABLE_GETTEXT),yes)
+GCFLAGS += -DENABLE_GETTEXT
+endif
+
+# First, Global, Platform, Local CFLAGS
+CFLAGS += $(FCFLAGS) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
+
+include $(TOPDIR)/include/buildmacros
+
+endif
+
+#
+# For targets that should always be rebuilt,
+# define a target that is never up-to-date.
+# Targets needing this should depend on $(_FORCE)
+_FORCE = __force_build
Index: create-3.1.9-buildmacros-patch/xfsdump-3.1.9-new/include/buildmacros
===================================================================
--- create-3.1.9-buildmacros-patch/xfsdump-3.1.9-new/include/buildmacros	(nonexistent)
+++ create-3.1.9-buildmacros-patch/xfsdump-3.1.9-new/include/buildmacros	(revision 5)
@@ -0,0 +1,135 @@
+#
+# Copyright (c) 2002-2003 Silicon Graphics, Inc.  All Rights Reserved.
+#
+
+BUILDRULES = $(TOPDIR)/include/buildrules
+
+# LCFLAGS, LLDFLAGS, LLDLIBS, LSRCFILES and LDIRT may be specified in
+# user Makefiles. Note: LSRCFILES is anything other than Makefile, $(CFILES)
+# $(CXXFILES), or $(HFILES) and is used to construct the manifest list
+# during the "dist" phase (packaging).
+
+LDFLAGS += $(LOADERFLAGS) $(LLDFLAGS)
+LTLDFLAGS += $(LOADERFLAGS)
+LDLIBS = $(LLDLIBS) $(PLDLIBS) $(MALLOCLIB)
+
+MAKEOPTS = --no-print-directory Q=$(Q)
+SRCFILES = Makefile $(HFILES) $(CFILES) $(LSRCFILES) $(LFILES) $(YFILES)
+
+DEPDIRT = dep dep.bak
+MANDIRT = *.[1-9].gz
+PODIRT = *.tmpo *.mo
+CDIRT = $(OBJECTS) $(LTOBJECTS) $(LTCOMMAND) $(LTLIBRARY)
+DIRT = $(LDIRT) $(DEPDIRT) $(MANDIRT) $(PODIRT) $(CDIRT)
+LIBDIRT = .libs
+DIRDIRT = $(LDIRDIRT) $(LIBDIRT)
+
+OBJECTS = $(ASFILES:.s=.o) \
+	  $(LCFILES:.c=.o) \
+	  $(CFILES:.c=.o) \
+	  $(LFILES:.l=.o) \
+	  $(YFILES:%.y=%.tab.o)
+
+INSTALL	= $(TOPDIR)/install-sh
+
+IMAGES_DIR = $(TOPDIR)/all-images
+DIST_DIR = $(TOPDIR)/dist
+
+CCF	= $(CC) $(CFLAGS) $(CPPFLAGS)
+MAKEF	= $(MAKE) $(MAKEOPTS)
+CXXF	= $(CXX) $(CXXFLAGS)
+
+# For libtool.
+LIBNAME = $(basename $(LTLIBRARY))
+LTOBJECTS = $(OBJECTS:.o=.lo)
+LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
+LTLINK = $(LIBTOOL) --quiet --tag=CC --mode=link $(CC)
+LTEXEC = $(LIBTOOL) --quiet --mode=execute
+LTINSTALL = $(LIBTOOL) --quiet --mode=install $(INSTALL)
+LTCOMPILE = $(LIBTOOL) --quiet --tag=CC --mode=compile $(CCF)
+
+ifeq ($(ENABLE_SHARED),yes)
+LTLDFLAGS += -rpath $(PKG_ROOT_LIB_DIR)
+LTLDFLAGS += -version-info $(LTVERSION)
+endif
+
+ifeq ($(ENABLE_SHARED),yes)
+INSTALL_LTLIB = \
+	cd $(TOPDIR)/$(LIBNAME)/.libs; \
+	../$(INSTALL) -m 755 -d $(PKG_ROOT_LIB_DIR); \
+	../$(INSTALL) -m 755 -T so_dot_version $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \
+	../$(INSTALL) -T so_dot_current $(LIBNAME).lai $(PKG_ROOT_LIB_DIR)
+endif
+
+# Libtool thinks the static and shared libs should be in the same dir, so
+# make the static lib appear in the place we chose as rpath (using the two
+# symlinks below).
+# Other things want the shared libs to appear in /usr/lib, else they'll
+# link with the static libs there.  So, another symlink to get the .so into
+# /usr/lib.
+ifeq ($(ENABLE_SHARED),yes)
+INSTALL_LTLIB_DEV = \
+	cd $(TOPDIR)/$(LIBNAME)/.libs; \
+	../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
+	../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_LIB_DIR); \
+	../$(INSTALL) -m 644 $(LIBNAME).lai $(PKG_LIB_DIR)/$(LIBNAME).la ; \
+	../$(INSTALL) -m 755 -d $(PKG_ROOT_LIB_DIR); \
+	../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \
+	if test "x$(PKG_LIB_DIR)" != "x$(PKG_ROOT_LIB_DIR)" ; then \
+	../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).a $(PKG_ROOT_LIB_DIR)/$(LIBNAME).a; \
+	../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).la $(PKG_ROOT_LIB_DIR)/$(LIBNAME).la; \
+	../$(INSTALL) -S $(PKG_ROOT_LIB_DIR)/$(LIBNAME).so $(PKG_LIB_DIR)/$(LIBNAME).so; \
+	fi
+else
+INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
+endif
+
+INSTALL_LTLIB_STATIC = \
+	cd $(TOPDIR)/$(LIBNAME)/.libs; \
+	../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
+	../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_LIB_DIR)
+
+INSTALL_MAN = \
+	@for d in $(MAN_PAGES); do \
+		first=true; \
+		for m in `$(AWK) \
+			'/^\.S[h|H] NAME/ {ok=1; next} ok {print; exit}' $$d \
+			| $(SED) \
+				-e 's/^\.Nm //' -e 's/,/ /g' -e 's/\\-.*//' \
+				-e 's/\\\f[0-9]//g' -e 's/  / /g;q'`; \
+		do \
+			[ -z "$$m" -o "$$m" = "\\" ] && continue; \
+			t=$(MAN_DEST)/$$m.$(MAN_SECTION); \
+			if $$first; then \
+				if $(HAVE_ZIPPED_MANPAGES); then \
+					$(ZIP) -9 -c $$d > $$d.gz; _sfx=.gz; \
+				fi; \
+				u=$$m.$(MAN_SECTION)$$_sfx; \
+				echo $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx;\
+				$(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \
+			else \
+				echo $(INSTALL) -S $$u $${t}$$_sfx; \
+				$(INSTALL) -S $$u $${t}$$_sfx; \
+			fi; \
+			first=false; \
+		done; \
+	done
+
+ifeq ($(ENABLE_GETTEXT),yes)
+INSTALL_LINGUAS = \
+	@for l in $(LINGUAS) ""; do \
+		if test -f "$$l.mo" ; then \
+			ldir=$(PKG_LOCALE_DIR)/$$l/LC_MESSAGES; \
+			$(INSTALL) -m 755 -d $$ldir; \
+			$(INSTALL) -m 644 $$l.mo $$ldir/$(PKG_NAME).mo; \
+		fi; \
+	done
+endif
+
+MAN_MAKERULE = \
+	@for f in *.[12345678] ""; do \
+		if test ! -z "$$f"; then \
+			$(ZIP) --best -c < $$f > $$f.gz; \
+		fi; \
+	done
Index: create-3.1.9-buildmacros-patch/xfsdump-3.1.9-new/include
===================================================================
--- create-3.1.9-buildmacros-patch/xfsdump-3.1.9-new/include	(nonexistent)
+++ create-3.1.9-buildmacros-patch/xfsdump-3.1.9-new/include	(revision 5)

Property changes on: create-3.1.9-buildmacros-patch/xfsdump-3.1.9-new/include
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-3.1.9-buildmacros-patch/xfsdump-3.1.9-new
===================================================================
--- create-3.1.9-buildmacros-patch/xfsdump-3.1.9-new	(nonexistent)
+++ create-3.1.9-buildmacros-patch/xfsdump-3.1.9-new	(revision 5)

Property changes on: create-3.1.9-buildmacros-patch/xfsdump-3.1.9-new
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-3.1.9-buildmacros-patch
===================================================================
--- create-3.1.9-buildmacros-patch	(nonexistent)
+++ create-3.1.9-buildmacros-patch	(revision 5)

Property changes on: create-3.1.9-buildmacros-patch
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-3.1.9-getopt-patch/create.patch.sh
===================================================================
--- create-3.1.9-getopt-patch/create.patch.sh	(nonexistent)
+++ create-3.1.9-getopt-patch/create.patch.sh	(revision 5)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=3.1.9
+
+tar --files-from=file.list -xJvf ../xfsdump-$VERSION.tar.xz
+mv xfsdump-$VERSION xfsdump-$VERSION-orig
+
+cp -rf ./xfsdump-$VERSION-new ./xfsdump-$VERSION
+
+diff --unified -Nr  xfsdump-$VERSION-orig  xfsdump-$VERSION > xfsdump-$VERSION-getopt.patch
+
+mv xfsdump-$VERSION-getopt.patch ../patches
+
+rm -rf ./xfsdump-$VERSION
+rm -rf ./xfsdump-$VERSION-orig

Property changes on: create-3.1.9-getopt-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: create-3.1.9-getopt-patch/file.list
===================================================================
--- create-3.1.9-getopt-patch/file.list	(nonexistent)
+++ create-3.1.9-getopt-patch/file.list	(revision 5)
@@ -0,0 +1,4 @@
+xfsdump-3.1.9/dump/getopt.h
+xfsdump-3.1.9/inventory/getopt.h
+xfsdump-3.1.9/invutil/getopt.h
+xfsdump-3.1.9/restore/getopt.h
Index: create-3.1.9-getopt-patch/xfsdump-3.1.9-new/dump/getopt.h
===================================================================
--- create-3.1.9-getopt-patch/xfsdump-3.1.9-new/dump/getopt.h	(nonexistent)
+++ create-3.1.9-getopt-patch/xfsdump-3.1.9-new/dump/getopt.h	(revision 5)
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2000-2001 Silicon Graphics, Inc.
+ * All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+#ifndef GETOPT_H
+#define GETOPT_H
+
+/* getopt.h	common getopt  command string
+ *
+ * several modules parse the command line looking for arguments specific to
+ * that module. Unfortunately, each of the getopt(3) calls needs the
+ * complete command string, to know how to parse. This file's purpose is
+ * to contain that command string. It also abstracts the option letters,
+ * facilitating easy changes.
+ */
+
+#define GETOPT_CMDSTRING	"ab:c:d:ef:hl:mop:qs:t:v:z:AB:CDEFG:H:I:JKL:M:NO:PRSTUVWY:"
+
+#define GETOPT_DUMPASOFFLINE	'a'	/* dump DMF dualstate files as offline */
+#define	GETOPT_BLOCKSIZE	'b'	/* blocksize for rmt */
+#define	GETOPT_ALERTPROG	'c'	/* Media Change Alert prog(content.c) */
+#define	GETOPT_FILESZ		'd'	/* Media file size to use in Mb */
+#define GETOPT_EXCLUDEFILES	'e'	/* allow files to be excluded */
+#define	GETOPT_DUMPDEST		'f'	/* dump dest. file (drive.c) */
+/*				'g'	*/
+#define	GETOPT_HELP		'h'	/* display version and usage */
+/*				'i'	*/
+/*				'j'	*/
+/*				'k'	*/
+#define	GETOPT_LEVEL		'l'	/* dump level (content_inode.c) */
+#define GETOPT_MINRMT		'm'	/* use minimal rmt protocol */
+/*				'n'	*/
+#define GETOPT_OVERWRITE	'o'	/* overwrite data on tape */
+#define GETOPT_PROGRESS		'p'	/* interval between progress reports */
+#define	GETOPT_QIC		'q'	/* option to tell dump it's a QIC tape */
+/*				'r'	*/
+#define	GETOPT_SUBTREE		's'	/* subtree dump (content_inode.c) */
+#define GETOPT_DUMPTIME		't'	/* use mtime of file as dump time */
+/*				'u' */
+#define	GETOPT_VERBOSITY	'v'	/* verbosity level (0 to 4) */
+/*				'w' */
+/*				'x'	   used in irix for xvm snapshot */
+/*				'y' */
+#define GETOPT_MAXDUMPFILESIZE	'z'	/* prune files over specified size */
+#define	GETOPT_NOEXTATTR	'A'	/* do not dump ext. file attributes */
+#define	GETOPT_BASED		'B'	/* specify session to base increment */
+#define GETOPT_RECCHKSUM	'C'	/* use record checksums */
+#define GETOPT_NOUNCHANGEDDIRS	'D'	/* skip unchanged directories */
+#define	GETOPT_ERASE		'E'	/* pre-erase media */
+#define GETOPT_FORCE		'F'	/* don't prompt (getopt.c) */
+#define GETOPT_MINSTACKSZ	'G'	/* minimum stack size (bytes) */
+#define GETOPT_MAXSTACKSZ	'H'	/* maximum stack size (bytes) */
+#define GETOPT_INVPRINT         'I'     /* just display the inventory */
+#define	GETOPT_NOINVUPDATE	'J'	/* do not update the dump inventory */
+#define GETOPT_FMT2COMPAT	'K'	/* use dump format 2 for compat with old restore */
+#define	GETOPT_DUMPLABEL	'L'	/* dump session label (global.c) */
+#define	GETOPT_MEDIALABEL	'M'	/* media object label (media.c) */
+#define	GETOPT_TIMESTAMP	'N'	/* show timestamps in log msgs */
+#define	GETOPT_OPTFILE		'O'	/* specifycmd line options file */
+#define	GETOPT_RINGPIN		'P'	/* pin down I/O buffer ring */
+/*				'Q'	*/
+#define	GETOPT_RESUME		'R'	/* resume intr dump (content_inode.c) */
+#define	GETOPT_SINGLEMFILE	'S'	/* obsolete - now the default */
+#define	GETOPT_NOTIMEOUTS	'T'	/* don't timeout dialogs */
+#define	GETOPT_UNLOAD		'U'	/* unload media when change needed */
+#define	GETOPT_SHOWLOGSS	'V'	/* show subsystem of log messages */
+#define	GETOPT_SHOWLOGLEVEL	'W'	/* show level of log messages */
+/*				'X'	*/
+#define	GETOPT_RINGLEN		'Y'	/* specify I/O buffer ring length */
+/*				'Z'	   used on irix for miniroot */
+
+#endif /* GETOPT_H */
+
+#include_next <getopt.h>
Index: create-3.1.9-getopt-patch/xfsdump-3.1.9-new/dump
===================================================================
--- create-3.1.9-getopt-patch/xfsdump-3.1.9-new/dump	(nonexistent)
+++ create-3.1.9-getopt-patch/xfsdump-3.1.9-new/dump	(revision 5)

Property changes on: create-3.1.9-getopt-patch/xfsdump-3.1.9-new/dump
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-3.1.9-getopt-patch/xfsdump-3.1.9-new/inventory/getopt.h
===================================================================
--- create-3.1.9-getopt-patch/xfsdump-3.1.9-new/inventory/getopt.h	(nonexistent)
+++ create-3.1.9-getopt-patch/xfsdump-3.1.9-new/inventory/getopt.h	(revision 5)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2000-2001 Silicon Graphics, Inc.
+ * All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+#ifndef GETOPT_H
+#define GETOPT_H
+
+/* getopt.h	common getopt  command string
+ *
+ * several modules parse the command line looking for arguments specific to
+ * that module. Unfortunately, each of the getopt(3) calls needs the
+ * complete command string, to know how to parse. This file's purpose is
+ * to contain that command string. It also abstracts the option letters,
+ * facilitating easy changes.
+ */
+
+#define GETOPT_CMDSTRING	"gwrqdL:u:l:s:t:v:m:f:i"
+
+#define	GETOPT_DUMPDEST		'f'	/* dump dest. file (drive.c) */
+#define	GETOPT_LEVEL		'l'	/* dump level (content_inode.c) */
+#define	GETOPT_SUBTREE		's'	/* subtree dump (content_inode.c) */
+#define	GETOPT_VERBOSITY	'v'	/* verbosity level (0 to 4) */
+#define	GETOPT_DUMPLABEL	'L'	/* dump session label (global.c) */
+#define	GETOPT_MEDIALABEL	'M'	/* media object label (content.c) */
+#define	GETOPT_RESUME		'R'	/* resume intr dump (content_inode.c) */
+#define GETOPT_INVPRINT         'i'     /* just display the inventory */
+/*
+ * f - dump destination:	drive.c
+ * l - dump level		content_inode.c
+ * s - subtree			content.c
+ * v - verbosity		mlog.c
+ * L - dump session label	global.c
+ * M - media object label	media.c
+ * R - resume interrupted dump	content_inode.c
+ */
+
+#endif /* GETOPT_H */
+
+#include_next <getopt.h>
Index: create-3.1.9-getopt-patch/xfsdump-3.1.9-new/inventory
===================================================================
--- create-3.1.9-getopt-patch/xfsdump-3.1.9-new/inventory	(nonexistent)
+++ create-3.1.9-getopt-patch/xfsdump-3.1.9-new/inventory	(revision 5)

Property changes on: create-3.1.9-getopt-patch/xfsdump-3.1.9-new/inventory
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-3.1.9-getopt-patch/xfsdump-3.1.9-new/invutil/getopt.h
===================================================================
--- create-3.1.9-getopt-patch/xfsdump-3.1.9-new/invutil/getopt.h	(nonexistent)
+++ create-3.1.9-getopt-patch/xfsdump-3.1.9-new/invutil/getopt.h	(revision 5)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2000-2002 Silicon Graphics, Inc.
+ * All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+#ifndef GETOPT_H
+#define GETOPT_H
+
+#define GETOPT_CMDSTRING	"dilnu:wCFM:m:s:"
+
+#define GETOPT_DEBUG		'd'	/* debug */
+#define GETOPT_INTERACTIVE	'i'	/* interactive mode */
+#define GETOPT_NONINTERACTIVE	'n'	/* non interactive mode - obsoleted by -F */
+#define GETOPT_UUID		'u'	/* prune uuid */
+#define GETOPT_WAITFORLOCKS	'w'	/* wait for locks */
+#define GETOPT_CHECKPRUNEFSTAB	'C'	/* check and prune fstab */
+#define GETOPT_FORCE		'F'	/* force - do not ask for confirmation */
+#define GETOPT_PRUNEMNT		'M'	/* prune mount point */
+#define GETOPT_PRUNEMEDIALABEL	'm'	/* prune media label */
+#define GETOPT_PRUNESESSION	's'	/* prune session id */
+
+#endif /* GETOPT_H */
+
+#include_next <getopt.h>
Index: create-3.1.9-getopt-patch/xfsdump-3.1.9-new/invutil
===================================================================
--- create-3.1.9-getopt-patch/xfsdump-3.1.9-new/invutil	(nonexistent)
+++ create-3.1.9-getopt-patch/xfsdump-3.1.9-new/invutil	(revision 5)

Property changes on: create-3.1.9-getopt-patch/xfsdump-3.1.9-new/invutil
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-3.1.9-getopt-patch/xfsdump-3.1.9-new/restore/getopt.h
===================================================================
--- create-3.1.9-getopt-patch/xfsdump-3.1.9-new/restore/getopt.h	(nonexistent)
+++ create-3.1.9-getopt-patch/xfsdump-3.1.9-new/restore/getopt.h	(revision 5)
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2000-2001 Silicon Graphics, Inc.
+ * All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+#ifndef GETOPT_H
+#define GETOPT_H
+
+/* getopt.h	common getopt  command string
+ *
+ * several modules parse the command line looking for arguments specific to
+ * that module. Unfortunately, each of the getopt(3) calls needs the
+ * complete command string, to know how to parse. This file's sole
+ * purpose is to contain that command string.
+ */
+
+#define GETOPT_CMDSTRING	"a:b:c:def:himn:op:qrs:tv:wABCDEFG:H:I:JKL:M:NO:PQRS:TUVWX:Y:"
+
+#define GETOPT_WORKSPACE	'a'	/* workspace dir (content.c) */
+#define GETOPT_BLOCKSIZE        'b'     /* blocksize for rmt */
+#define GETOPT_ALERTPROG        'c'     /* Media Change Alert prog(content.c) */
+#define GETOPT_PV766024		'd'	/* DRIVE_ERROR_MEDIA for pv#766024 */
+#define	GETOPT_EXISTING		'e'	/* don't overwrite existing files */
+#define	GETOPT_DUMPDEST		'f'	/* dump src. file (drive.c) */
+/*				'g' */
+#define	GETOPT_HELP		'h'	/* display version and usage */
+#define	GETOPT_INTERACTIVE	'i'	/* interactive subtree selection */
+/*				'j' */
+/*				'k' */
+/*				'l' */
+#define GETOPT_MINRMT		'm'	/* use minimal rmt protocol */
+#define	GETOPT_NEWER		'n'	/* only restore files newer than arg */
+#define	GETOPT_OWNER		'o'	/* restore owner/grp even if not root */
+#define GETOPT_PROGRESS		'p'	/* interval between progress reports */
+#define	GETOPT_QIC		'q'	/* option to tell dump it's a QIC tape */
+#define	GETOPT_CUMULATIVE	'r'	/* accumulating restore (content.c) */
+#define	GETOPT_SUBTREE		's'	/* subtree restore (content.c) */
+#define	GETOPT_TOC		't'	/* display contents only (content.c) */
+/*				'u' */
+#define	GETOPT_VERBOSITY	'v'	/* verbosity level (0 to 4) */
+#define	GETOPT_SMALLWINDOW	'w'	/* use a small window for dir entries */
+/*				'x' */
+/*				'y' */
+/*				'z' */
+#define	GETOPT_NOEXTATTR	'A'	/* do not restore ext. file attr. */
+#define GETOPT_ROOTPERM		'B'	/* restore ownership and permissions for root directory */
+#define GETOPT_RECCHKSUM	'C'	/* use record checksums */
+#define GETOPT_SETDM		'D'	/* set DMAPI event mask and state */
+#define	GETOPT_CHANGED		'E'	/* overwrite if missing or old */
+#define GETOPT_FORCE		'F'	/* don't prompt (getopt.c) */
+#define GETOPT_MINSTACKSZ	'G'	/* minimum stack size (bytes) */
+#define GETOPT_MAXSTACKSZ	'H'	/* maximum stack size (bytes) */
+#define GETOPT_INVPRINT         'I'     /* just display the inventory */
+#define	GETOPT_NOINVUPDATE	'J'	/* do not update the dump inventory */
+#define GETOPT_FMT2COMPAT	'K'	/* force use format 2 gen numbers */
+#define	GETOPT_DUMPLABEL	'L'	/* dump session label (global.c) */
+#define	GETOPT_MEDIALABEL	'M'	/* media object label (media.c) */
+#define	GETOPT_TIMESTAMP	'N'	/* show timestamps in log msgs */
+#define	GETOPT_OPTFILE		'O'	/* specifycmd line options file */
+#define	GETOPT_RINGPIN		'P'	/* pin down I/O buffer ring */
+#define GETOPT_SESSCPLT		'Q'	/* force completion of intr. session */
+#define	GETOPT_RESUME		'R'	/* resume intr rest (content.c) */
+#define	GETOPT_SESSIONID	'S'	/* dump session uuid (global.c) */
+#define	GETOPT_NOTIMEOUTS	'T'	/* don't timeout dialogs */
+#define	GETOPT_UNLOAD		'U'	/* unload media when change needed */
+#define	GETOPT_SHOWLOGSS	'V'	/* show subsystem of log messages */
+#define	GETOPT_SHOWLOGLEVEL	'W'	/* show level of log messages */
+#define	GETOPT_NOSUBTREE	'X'	/* subtree to exclude */
+#define	GETOPT_RINGLEN		'Y'	/* specify I/O buffer ring length */
+/*				'Z'	   used on irix for miniroot */
+
+#endif /* GETOPT_H */
+
+#include_next <getopt.h>
Index: create-3.1.9-getopt-patch/xfsdump-3.1.9-new/restore
===================================================================
--- create-3.1.9-getopt-patch/xfsdump-3.1.9-new/restore	(nonexistent)
+++ create-3.1.9-getopt-patch/xfsdump-3.1.9-new/restore	(revision 5)

Property changes on: create-3.1.9-getopt-patch/xfsdump-3.1.9-new/restore
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-3.1.9-getopt-patch/xfsdump-3.1.9-new
===================================================================
--- create-3.1.9-getopt-patch/xfsdump-3.1.9-new	(nonexistent)
+++ create-3.1.9-getopt-patch/xfsdump-3.1.9-new	(revision 5)

Property changes on: create-3.1.9-getopt-patch/xfsdump-3.1.9-new
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-3.1.9-getopt-patch
===================================================================
--- create-3.1.9-getopt-patch	(nonexistent)
+++ create-3.1.9-getopt-patch	(revision 5)

Property changes on: create-3.1.9-getopt-patch
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-3.1.9-librmt-patch/create.patch.sh
===================================================================
--- create-3.1.9-librmt-patch/create.patch.sh	(nonexistent)
+++ create-3.1.9-librmt-patch/create.patch.sh	(revision 5)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=3.1.9
+
+tar --files-from=file.list -xJvf ../xfsdump-$VERSION.tar.xz
+mv xfsdump-$VERSION xfsdump-$VERSION-orig
+
+cp -rf ./xfsdump-$VERSION-new ./xfsdump-$VERSION
+
+diff --unified -Nr  xfsdump-$VERSION-orig  xfsdump-$VERSION > xfsdump-$VERSION-librmt.patch
+
+mv xfsdump-$VERSION-librmt.patch ../patches
+
+rm -rf ./xfsdump-$VERSION
+rm -rf ./xfsdump-$VERSION-orig

Property changes on: create-3.1.9-librmt-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: create-3.1.9-librmt-patch/file.list
===================================================================
--- create-3.1.9-librmt-patch/file.list	(nonexistent)
+++ create-3.1.9-librmt-patch/file.list	(revision 5)
@@ -0,0 +1,9 @@
+xfsdump-3.1.9/librmt/rmtabort.c
+xfsdump-3.1.9/librmt/rmtcommand.c
+xfsdump-3.1.9/librmt/rmtfstat.c
+xfsdump-3.1.9/librmt/rmtioctl.c
+xfsdump-3.1.9/librmt/rmtlib.h
+xfsdump-3.1.9/librmt/rmtopen.c
+xfsdump-3.1.9/librmt/rmtread.c
+xfsdump-3.1.9/librmt/rmtstatus.c
+xfsdump-3.1.9/librmt/rmtwrite.c
Index: create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtabort.c
===================================================================
--- create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtabort.c	(nonexistent)
+++ create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtabort.c	(revision 5)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2000-2001 Silicon Graphics, Inc.; provided copyright in
+ * certain portions may be held by third parties as indicated herein.
+ * All Rights Reserved.
+ *
+ * The code in this source file represents an aggregation of work from
+ * Georgia Tech, Fred Fish, Jeff Lee, Arnold Robbins and other Silicon
+ * Graphics engineers over the period 1985-2000.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <unistd.h>
+#include "rmtlib.h"
+
+/*
+ *	abort --- close off a remote tape connection
+ */
+
+void _rmt_abort(int fildes)
+{
+	close(RMTREAD(fildes));
+	close(RMTWRITE(fildes));
+	RMTREAD(fildes) = -1;
+	RMTWRITE(fildes) = -1;
+        RMTHOST(fildes) = -1;
+	_rmt_msg(RMTDBG, "rmtabort(%d)\n", fildes);
+}
Index: create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtcommand.c
===================================================================
--- create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtcommand.c	(nonexistent)
+++ create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtcommand.c	(revision 5)
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2000-2001 Silicon Graphics, Inc.; provided copyright in
+ * certain portions may be held by third parties as indicated herein.
+ * All Rights Reserved.
+ *
+ * The code in this source file represents an aggregation of work from
+ * Georgia Tech, Fred Fish, Jeff Lee, Arnold Robbins and other Silicon
+ * Graphics engineers over the period 1985-2000.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <errno.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "rmtlib.h"
+
+
+/*
+ *	_rmt_command --- attempt to perform a remote tape command
+ */
+
+int _rmt_command(fildes, buf)
+int fildes;
+char *buf;
+{
+	register int blen;
+
+	_rmt_msg(RMTDBG, "rmtcommand: fd = %d, buf = %s\n", fildes, buf);
+
+/*
+ *	try to make the request
+ */
+
+	blen = strlen(buf);
+	if (write(RMTWRITE(fildes), buf, blen) == blen)
+	{
+		return(0);
+	}
+
+/*
+ *	something went wrong. close down and go home
+ */
+
+	_rmt_abort(fildes);
+
+	setoserror(EIO);
+	return(-1);
+}
+
+
+
Index: create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtfstat.c
===================================================================
--- create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtfstat.c	(nonexistent)
+++ create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtfstat.c	(revision 5)
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2000-2001 Silicon Graphics, Inc.; provided copyright in
+ * certain portions may be held by third parties as indicated herein.
+ * All Rights Reserved.
+ *
+ * The code in this source file represents an aggregation of work from
+ * Georgia Tech, Fred Fish, Jeff Lee, Arnold Robbins and other Silicon
+ * Graphics engineers over the period 1985-2000.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "rmtlib.h"
+
+#include <errno.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+static int _rmt_fstat(int, char *);
+
+/*
+ *	Get file status.  Looks just like fstat(2) to caller.
+ */
+
+int rmtfstat (fildes, buf)
+int fildes;
+struct stat *buf;
+{
+	if (isrmt (fildes))
+	{
+		return (_rmt_fstat (fildes - REM_BIAS, (char *)buf));
+	}
+	else
+	{
+		int i;
+		i = fstat(fildes, buf);
+		return i;
+	}
+}
+
+static int
+_rmt_fstat(int fildes, char *arg)
+{
+	char buffer[BUFMAGIC];
+	int rc, cnt, adj_rc;
+
+	sprintf(buffer, "Z%d\n", fildes);
+
+	/*
+	 *	grab the status and read it directly into the structure
+	 *	this assumes that the status buffer is (hopefully) not
+	 *	padded and that 2 shorts fit in a long without any word
+	 *	alignment problems, ie - the whole struct is contiguous
+	 *	NOTE - this is probably NOT a good assumption.
+	 */
+
+	if (_rmt_command(fildes, buffer) == -1 ||
+	    (rc = _rmt_status(fildes)) == -1)
+		return(-1);
+
+	/* adjust read count to prevent overflow */
+
+	adj_rc = (rc > sizeof(struct stat)) ? sizeof(struct stat) : rc;
+	rc -= adj_rc;
+
+	for (; adj_rc > 0; adj_rc -= cnt, arg += cnt)
+	{
+		cnt = read(RMTREAD(fildes), arg, adj_rc);
+		if (cnt <= 0)
+		{
+abortit:
+			_rmt_abort(fildes);
+			setoserror(EIO);
+			return(-1);
+		}
+	}
+
+	/* handle any bytes we didn't know what to do with */
+	while (rc-- > 0)
+		if (read(RMTREAD(fildes), buffer, 1) <= 0)
+			goto abortit;
+
+	return(0);
+}
Index: create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtioctl.c
===================================================================
--- create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtioctl.c	(nonexistent)
+++ create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtioctl.c	(revision 5)
@@ -0,0 +1,427 @@
+/*
+ * Copyright (c) 2000-2001 Silicon Graphics, Inc.; provided copyright in
+ * certain portions may be held by third parties as indicated herein.
+ * All Rights Reserved.
+ *
+ * The code in this source file represents an aggregation of work from
+ * Georgia Tech, Fred Fish, Jeff Lee, Arnold Robbins and other Silicon
+ * Graphics engineers over the period 1985-2000.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <unistd.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/mtio.h>
+#include <sys/param.h>
+#include <assert.h>
+
+#include "config.h"
+#include "rmtlib.h"
+#include "swap.h"
+
+
+/*
+ * uses old_mtget IRIX structure since we don't bother
+ * sending the "V" version command.
+ */
+struct  irix_mtget   {
+        short   mt_type;          /* type of magtape device */
+        unsigned short  mt_dsreg; /* ``drive status'' register */
+        short   mt_erreg;         /* ``error'' register */
+        short   mt_resid;         /* residual count */
+        int     mt_fileno;        /* file number of current position */
+        int     mt_blkno;         /* block number of current position */
+};
+
+struct linux32_mtget
+{
+    int32_t mt_type;           /* Type of magtape device.  */
+    int32_t mt_resid;          /* Residual count: */
+    /* The following registers are device dependent.  */
+    int32_t mt_dsreg;          /* Status register.  */
+    int32_t mt_gstat;          /* Generic (device independent) status.  */
+    int32_t mt_erreg;          /* Error register.  */
+    /* The next two fields are not always used.  */
+    int32_t mt_fileno;        /* Number of current file on tape.  */
+    int32_t mt_blkno;         /* Current block number.  */
+};
+
+struct linux64_mtget
+{
+    int64_t mt_type;           /* Type of magtape device.  */
+    int64_t mt_resid;          /* Residual count. */
+    /* The following registers are device dependent.  */
+    int64_t mt_dsreg;          /* Status register.  */
+    int64_t mt_gstat;          /* Generic (device independent) status.  */
+    int64_t mt_erreg;          /* Error register.  */
+    /* The next two fields are not always used.  */
+    int32_t mt_fileno;        /* Number of current file on tape.  */
+    int32_t mt_blkno;         /* Current block number.  */
+};
+
+
+/* IRIX tape device status values */
+#define IRIX_MT_EOT          0x01    /* tape is at end of media */
+#define IRIX_MT_BOT          0x02    /* tape is at beginning of media */
+#define IRIX_MT_WPROT        0x04    /* tape is write-protected */
+#define IRIX_MT_EW           0x08    /* hit early warning marker     */
+#define IRIX_MT_ONL          0x40    /* drive is online */
+#define IRIX_MT_EOD          0x4000  /* tape is at end of data */
+#define IRIX_MT_FMK          0x8000  /* tape is at file mark */
+
+/* IRIX mt operations (mt_op values for MTIOCTOP) */
+#define IRIX_MTWEOF  0       /* write an end-of-file record */
+#define IRIX_MTFSF   1       /* forward space file */
+#define IRIX_MTBSF   2       /* backward space file */
+#define IRIX_MTFSR   3       /* forward space record */
+#define IRIX_MTBSR   4       /* backward space record */
+#define IRIX_MTREW   5       /* rewind */
+#define IRIX_MTOFFL  6       /* rewind and put the drive offline */
+#define IRIX_MTERASE 12      /* erase tape from current position to EOT */
+#define IRIX_MTUNLOAD 13     /* unload tape from drive */
+
+/* std (common) mt op codes */
+#define STD_MTWEOF  0       /* write an end-of-file record */
+#define STD_MTFSF   1       /* forward space file */
+#define STD_MTBSF   2       /* backward space file */
+#define STD_MTFSR   3       /* forward space record */
+#define STD_MTBSR   4       /* backward space record */
+#define STD_MTREW   5       /* rewind */
+#define STD_MTOFFL  6       /* rewind and put the drive offline */
+
+#define MT_MAX 40 /* encompass potential range of mt_op values */
+static int mtop_irixmap[MT_MAX] = {-1};
+static int mtop_stdmap[MT_MAX] = {-1};
+
+static void
+init_mtop_map(void)
+{
+    /* set all other values to sentinel (-1) */
+
+    /* only map the ones which xfsdump/restore are interested in */
+    mtop_irixmap[MTWEOF]    = IRIX_MTWEOF;
+    mtop_irixmap[MTFSF]     = IRIX_MTFSF;
+    mtop_irixmap[MTBSF]     = IRIX_MTBSF;
+    mtop_irixmap[MTFSR]     = IRIX_MTFSR;
+    mtop_irixmap[MTBSR]     = IRIX_MTBSR;
+    mtop_irixmap[MTREW]     = IRIX_MTREW;
+    mtop_irixmap[MTOFFL]    = IRIX_MTOFFL;
+    mtop_irixmap[MTERASE]   = IRIX_MTERASE;
+    mtop_irixmap[MTUNLOAD]  = IRIX_MTUNLOAD;
+
+    mtop_stdmap[MTWEOF]    = STD_MTWEOF;
+    mtop_stdmap[MTFSF]     = STD_MTFSF;
+    mtop_stdmap[MTBSF]     = STD_MTBSF;
+    mtop_stdmap[MTFSR]     = STD_MTFSR;
+    mtop_stdmap[MTBSR]     = STD_MTBSR;
+    mtop_stdmap[MTREW]     = STD_MTREW;
+    mtop_stdmap[MTOFFL]    = STD_MTOFFL;
+    mtop_stdmap[MTUNLOAD]  = STD_MTOFFL;
+}
+
+
+static int _rmt_ioctl(int, unsigned int, void *);
+
+/*
+ *	Do ioctl on file.  Looks just like ioctl(2) to caller.
+ */
+
+int
+rmtioctl(int fildes, unsigned int request, void *arg)
+{
+	if (isrmt (fildes)) {
+		return (_rmt_ioctl (fildes - REM_BIAS, request, arg));
+	}
+	else {
+		return (ioctl (fildes, request, arg));
+	}
+}
+
+
+/*
+ *	_rmt_ioctl --- perform raw tape operations remotely
+ */
+
+/*
+ * WARNING: MTIOCGET code is highly dependent on the format
+ *          of mtget on different platforms
+ *          We only support Linux 32/ia64 and IRIX 32/64 for this case.
+ *          We use the result of uname(1) (in rmtopen()) and
+ *          the size of the mtget structure to determine which
+ *          architecture it is.
+ */
+
+static int
+_rmt_ioctl(int fildes, unsigned int op, void *arg)
+{
+	char buffer[BUFMAGIC];
+	int rc, cnt, ssize;
+	char *p = NULL, *irixget = NULL, *linux32get = NULL, *linux64get = NULL;
+	struct irix_mtget irix_mtget;
+	struct linux32_mtget linux32_mtget;
+	struct linux64_mtget linux64_mtget;
+	int islinux32 = 1; /* is remote machine Linux 32 bit */
+	static int onetrip = 0;
+
+	if (!onetrip) {
+		onetrip = 1;
+		init_mtop_map();
+	}
+
+/*
+ *	MTIOCTOP is the easy one. nothing is transfered in binary
+ */
+
+	if (op == MTIOCTOP) {
+		int mt_op = ((struct mtop *) arg)->mt_op;
+		int mt_count = ((struct mtop *) arg)->mt_count;
+
+		if (RMTHOST(fildes) == UNAME_UNDEFINED) {
+			_rmt_msg(RMTWARN,
+		_("rmtioctl: remote host type not supported for MTIOCTOP\n"));
+			setoserror(EPROTONOSUPPORT);
+			return(-1);
+		}
+
+		/* map the linux op code to the irix op code */
+		if (RMTHOST(fildes) == UNAME_IRIX) {
+			mt_op = mtop_irixmap[mt_op];
+			if (mt_op == -1) {
+			    setoserror(EINVAL);
+			    return(-1);
+			}
+		}
+		else if (RMTHOST(fildes) != UNAME_LINUX) {
+		/* map the linux op code to the standard/fallback op code */
+			mt_op = mtop_stdmap[mt_op];
+			if (mt_op == -1) {
+			    setoserror(EINVAL);
+			    return(-1);
+			}
+		}
+
+		sprintf(buffer, "I%d\n%d\n", mt_op, mt_count);
+		if (_rmt_command(fildes, buffer) == -1) {
+			return(-1);
+		}
+		return(_rmt_status(fildes));
+	}
+        else if (op == MTIOCGET) {
+
+		/*
+		 *  Grab the status and read it directly into the structure.
+		 *  Since the data is binary data, and the other machine might
+		 *  be IRIX or Linux of a different byte-order,
+		 *  we have to be careful in converting the data.
+		 *
+		 *  NOTE: the original /etc/rmt did NOT support a newline after
+		 *  the S command, and Sun still does not.  Neither does the
+		 *  current bsd source, all the way through the tahoe release.
+		 *  So do NOT add the \n to this!  The sgi rmt command will
+		 *  work either way.  Olson, 4/91
+		 */
+		if (_rmt_command(fildes, "S") == -1 ||
+		    (rc = _rmt_status(fildes)) == -1)
+			return(-1);
+
+
+		/* If undefined then try and define it by looking
+		 * and the size of the get structure.
+		 * If we know our rmt host, then verify that the
+		 * structure is the correct size for the supported ones
+		 */
+ 		switch (RMTHOST(fildes)) {
+		    case UNAME_UNDEFINED:
+			_rmt_msg(RMTWARN,
+		_("rmtioctl: remote host type not supported for MTIOCGET\n"));
+			setoserror(EPROTONOSUPPORT);
+			return(-1);
+		    case UNAME_IRIX:
+			if (sizeof(struct irix_mtget) != rc) {
+			    _rmt_msg(RMTWARN,
+				_("rmtioctl: IRIX mtget structure of wrong size"
+				  " - got %d, wanted %d\n"),
+				rc, sizeof(struct irix_mtget));
+			    setoserror(EPROTONOSUPPORT);
+			    return(-1);
+			}
+			break;
+		    case UNAME_LINUX:
+			if (sizeof(struct linux32_mtget) == rc) {
+			    islinux32 = 1;
+			}
+			else if (sizeof(struct linux64_mtget) == rc) {
+			    islinux32 = 0;
+			}
+			else {
+			    _rmt_msg(RMTWARN,
+			_("rmtioctl: Linux mtget structure of wrong size "
+			  "- got %d, wanted %d or %d\n"),
+				rc, sizeof(struct linux32_mtget),
+				sizeof(struct linux64_mtget));
+			    setoserror(EPROTONOSUPPORT);
+			    return(-1);
+			}
+			break;
+		    default:
+			setoserror(EPROTONOSUPPORT);
+			return(-1);
+		}
+
+
+		assert(RMTHOST(fildes)==UNAME_LINUX || RMTHOST(fildes)==UNAME_IRIX);
+
+
+		if (RMTHOST(fildes) == UNAME_IRIX) {
+		    p = irixget = (char *)&irix_mtget;
+		}
+		else if (islinux32) {
+		    p = linux32get = (char *)&linux32_mtget;
+		}
+		else {
+		    p = linux64get = (char *)&linux64_mtget;
+		}
+
+
+		/* read in all the data */
+		ssize = rc;
+		for (; ssize > 0; ssize -= cnt, p += cnt) {
+			cnt = read(RMTREAD(fildes), p, ssize);
+			if (cnt <= 0) {
+				_rmt_abort(fildes);
+				setoserror(EIO);
+				return(-1);
+			}
+		}
+
+
+		/*
+		 * May need to byteswap
+		 */
+		if (RMTHOST(fildes) == UNAME_IRIX) {
+			struct irix_mtget *irixp = (struct irix_mtget *)irixget;
+
+			if (irixp->mt_type > 0xff) {
+			    /* assume that mt_type should fit in 1 byte */
+
+			    irixp->mt_type   = INT_SWAP(irixp->mt_type, irixp->mt_type);
+			    irixp->mt_dsreg  = INT_SWAP(irixp->mt_dsreg, irixp->mt_dsreg);
+			    irixp->mt_erreg  = INT_SWAP(irixp->mt_erreg, irixp->mt_erreg);
+			    irixp->mt_resid  = INT_SWAP(irixp->mt_resid, irixp->mt_resid);
+			    irixp->mt_fileno = INT_SWAP(irixp->mt_fileno, irixp->mt_fileno);
+			    irixp->mt_blkno  = INT_SWAP(irixp->mt_blkno, irixp->mt_blkno);
+			}
+		}
+		else if (islinux32) {
+			struct linux32_mtget *linuxp = (struct linux32_mtget *)linux32get;
+
+			if (linuxp->mt_type > 0xffff) {
+			    /* assume that mt_type should fit in 2 bytes */
+
+			    linuxp->mt_type   = INT_SWAP(linuxp->mt_type, linuxp->mt_type);
+			    linuxp->mt_dsreg  = INT_SWAP(linuxp->mt_dsreg, linuxp->mt_dsreg);
+			    linuxp->mt_erreg  = INT_SWAP(linuxp->mt_erreg, linuxp->mt_erreg);
+			    linuxp->mt_resid  = INT_SWAP(linuxp->mt_resid, linuxp->mt_resid);
+			    linuxp->mt_fileno = INT_SWAP(linuxp->mt_fileno, linuxp->mt_fileno);
+			    linuxp->mt_blkno  = INT_SWAP(linuxp->mt_blkno, linuxp->mt_blkno);
+			    linuxp->mt_gstat  = INT_SWAP(linuxp->mt_gstat, linuxp->mt_gstat);
+
+			}
+		}
+		else {
+			struct linux64_mtget *linuxp = (struct linux64_mtget *)linux64get;
+
+			if (linuxp->mt_type > 0xffff) {
+			    /* assume that mt_type should fit in 2 bytes */
+
+			    linuxp->mt_type   = INT_SWAP(linuxp->mt_type, linuxp->mt_type);
+			    linuxp->mt_dsreg  = INT_SWAP(linuxp->mt_dsreg, linuxp->mt_dsreg);
+			    linuxp->mt_erreg  = INT_SWAP(linuxp->mt_erreg, linuxp->mt_erreg);
+			    linuxp->mt_resid  = INT_SWAP(linuxp->mt_resid, linuxp->mt_resid);
+			    linuxp->mt_fileno = INT_SWAP(linuxp->mt_fileno, linuxp->mt_fileno);
+			    linuxp->mt_blkno  = INT_SWAP(linuxp->mt_blkno, linuxp->mt_blkno);
+			    linuxp->mt_gstat  = INT_SWAP(linuxp->mt_gstat, linuxp->mt_gstat);
+
+			}
+		}
+
+		/*
+		 * now mtget has the correct (byte-swapped if needed) data,
+                 * so we just need to copy over the fields which are possibly
+                 * of different length and different semantics.
+		 */
+		if (RMTHOST(fildes) == UNAME_IRIX) {
+			struct mtget *dstp = (struct mtget *)arg;
+			struct irix_mtget *srcp = (struct irix_mtget *)irixget;
+			short status = srcp->mt_dsreg;
+
+			dstp->mt_type = srcp->mt_type;
+			dstp->mt_erreg = srcp->mt_erreg;
+			dstp->mt_resid = srcp->mt_resid;
+			dstp->mt_fileno = srcp->mt_fileno;
+			dstp->mt_blkno = srcp->mt_blkno;
+			dstp->mt_dsreg = srcp->mt_dsreg; /* different semantics */
+
+			/* need to do tape status conversions */
+			dstp->mt_gstat = 0;
+			if (status & IRIX_MT_EOT)
+			    dstp->mt_gstat |= GMT_EOT(0xffffffff);
+			if (status & IRIX_MT_BOT)
+			    dstp->mt_gstat |= GMT_BOT(0xffffffff);
+			if (status & IRIX_MT_WPROT)
+			    dstp->mt_gstat |= GMT_WR_PROT(0xffffffff);
+			if (status & IRIX_MT_ONL)
+			    dstp->mt_gstat |= GMT_ONLINE(0xffffffff);
+			if (status & IRIX_MT_EOD)
+			    dstp->mt_gstat |= GMT_EOD(0xffffffff);
+			if (status & IRIX_MT_FMK)
+			    dstp->mt_gstat |= GMT_EOF(0xffffffff);
+			if (status & IRIX_MT_EW)
+			    ;/* No GMT_ to map it to */
+		}
+		else if (islinux32) {
+			struct mtget *dstp = (struct mtget *)arg;
+			struct linux32_mtget *srcp = (struct linux32_mtget *)linux32get;
+
+			dstp->mt_type = srcp->mt_type;
+			dstp->mt_erreg = srcp->mt_erreg;
+			dstp->mt_resid = srcp->mt_resid;
+			dstp->mt_fileno = srcp->mt_fileno;
+			dstp->mt_blkno = srcp->mt_blkno;
+			dstp->mt_dsreg = srcp->mt_dsreg;
+			dstp->mt_gstat = srcp->mt_gstat;
+		}
+		else {
+			struct mtget *dstp = (struct mtget *)arg;
+			struct linux64_mtget *srcp = (struct linux64_mtget *)linux64get;
+
+			dstp->mt_type = srcp->mt_type;
+			dstp->mt_erreg = srcp->mt_erreg;
+			dstp->mt_resid = srcp->mt_resid;
+			dstp->mt_fileno = srcp->mt_fileno;
+			dstp->mt_blkno = srcp->mt_blkno;
+			dstp->mt_dsreg = srcp->mt_dsreg;
+			dstp->mt_gstat = srcp->mt_gstat;
+		}
+		return(0);
+
+	}
+        else {
+	    setoserror(EINVAL);
+	    return(-1);
+	}
+}
Index: create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtlib.h
===================================================================
--- create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtlib.h	(nonexistent)
+++ create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtlib.h	(revision 5)
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2000-2001 Silicon Graphics, Inc.; provided copyright in
+ * certain portions may be held by third parties as indicated herein.
+ * All Rights Reserved.
+ *
+ * The code in this source file represents an aggregation of work from
+ * Georgia Tech, Fred Fish, Jeff Lee, Arnold Robbins and other Silicon
+ * Graphics engineers over the period 1985-2000.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+/*
+ *	This file is only included by the library routines.  It is not
+ *	required for user code.
+ *
+ */
+
+/*
+ *	Note that local vs remote file descriptors are distinquished
+ *	by adding a bias to the remote descriptors.  This is a quick
+ *	and dirty trick that may not be portable to some systems.
+ *  It should be greater than the largest open filedescriptor
+ *  than can be returned by the OS, and should be a power of 2.
+ */
+
+#define REM_BIAS 8192
+
+
+/*
+ *	BUFMAGIC --- Magic buffer size
+ *	MAXUNIT --- Maximum number of remote tape file units
+ */
+
+#define BUFMAGIC	64
+#define MAXUNIT		4
+
+/*
+ *	Useful macros.
+ *
+ *	READ --- Return the number of the read side file descriptor
+ *	WRITE --- Return the number of the write side file descriptor
+ *	RMTHOST --- Return an id which says host type from uname
+ */
+
+/* rmt msg types */
+#define RMTWARN 1
+#define RMTDBG 	2 /* includes warning */
+
+#define RMTREAD(fd)	(_rmt_Ctp[fd][0])
+#define RMTWRITE(fd)	(_rmt_Ptc[fd][1])
+#define RMTHOST(fd)	(_rmt_host[fd])
+
+#define RSH_PATH        "/usr/bin/rsh"
+#define RMT_PATH        "/etc/rmt"
+
+#define UNAME_UNDEFINED	-1
+#define UNAME_LINUX	0
+#define UNAME_IRIX	1
+#define UNAME_UNKNOWN	2
+
+extern int _rmt_Ctp[MAXUNIT][2];
+extern int _rmt_Ptc[MAXUNIT][2];
+extern int _rmt_host[MAXUNIT];
+
+#define setoserror(err) (errno = err) /* TODO: multithread check */
+
+/* prototypes */
+int isrmt (int);
+void _rmt_abort(int);
+int _rmt_command(int, char *);
+int _rmt_dev (char *);
+int _rmt_status(int);
+int _rmt_msgson(void);
+void _rmt_msg(int level, const char *msg, ...);
+void _rmt_turnonmsgsbyenv(void);
+void rmt_turnonmsgs(int code);
Index: create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtopen.c
===================================================================
--- create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtopen.c	(nonexistent)
+++ create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtopen.c	(revision 5)
@@ -0,0 +1,275 @@
+/*
+ * Copyright (c) 2000-2001 Silicon Graphics, Inc.; provided copyright in
+ * certain portions may be held by third parties as indicated herein.
+ * All Rights Reserved.
+ *
+ * The code in this source file represents an aggregation of work from
+ * Georgia Tech, Fred Fish, Jeff Lee, Arnold Robbins and other Silicon
+ * Graphics engineers over the period 1985-2000.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <unistd.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include "config.h"
+#include "rmtlib.h"
+
+#define RMT_DEBUG_FILE "/tmp/librmt_debug" /* file for debug output on server */
+
+static int _rmt_open(char *, int, int);
+
+int _rmt_Ctp[MAXUNIT][2] = { {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1} };
+int _rmt_Ptc[MAXUNIT][2] = { {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1} };
+int _rmt_host[MAXUNIT] = { -1, -1, -1, -1};
+
+struct uname_table
+{
+    int id;
+    char *name;
+};
+
+struct uname_table uname_table[] =
+{ {UNAME_LINUX, "Linux"}, {UNAME_IRIX, "IRIX"}, {0, 0} };
+
+
+/*
+ *	Open a local or remote file.  Looks just like open(2) to
+ *	caller.
+ */
+
+int rmtopen (path, oflag, mode)
+char *path;
+int oflag;
+int mode;
+{
+	if (strchr (path, ':') != NULL)
+	{
+		return (_rmt_open (path, oflag, mode) | REM_BIAS);
+	}
+	else
+	{
+		return (open (path, oflag, mode));
+	}
+}
+
+/*
+ *	_rmt_open --- open a magtape device (or file) on system specified,
+ *                    as given user
+ *
+ *	file name has the form system[.user]:????
+ */
+
+#define MAXHOSTLEN	257
+#define MAXDBGPATH	100
+
+/* ARGSUSED */
+static int _rmt_open (char *path, int oflag, int mode)
+{
+	int i, rc;
+	char buffer[BUFMAGIC];
+	char system[MAXHOSTLEN];
+	char device[BUFMAGIC];
+	char login[BUFMAGIC];
+	char *sys, *dev, *user;
+        char *rsh_path;
+        char *rmt_path;
+	char rmt_cmd[MAXDBGPATH];
+
+
+	sys = system;
+	dev = device;
+	user = login;
+
+	if ((rsh_path = getenv("RSH")) == NULL) {
+	    rsh_path = RSH_PATH;
+	}
+
+	if ((rmt_path = getenv("RMT")) == NULL) {
+	    rmt_path = RMT_PATH;
+	}
+
+
+/*
+ *	first, find an open pair of file descriptors
+ */
+
+	for (i = 0; i < MAXUNIT; i++)
+		if (RMTREAD(i) == -1 && RMTWRITE(i) == -1)
+			break;
+
+	if (i == MAXUNIT)
+	{
+		setoserror(EMFILE);
+		return(-1);
+	}
+
+/*
+ *	pull apart system and device, and optional user
+ *	don't munge original string
+ */
+	while (*path != '@' && *path != ':') {
+		*user++ = *path++;
+	}
+	*user = '\0';
+	path++;
+
+	if (*(path - 1) == '@')
+	{
+		while (*path != ':') {
+			*sys++ = *path++;
+		}
+		*sys = '\0';
+		path++;
+	}
+	else
+	{
+		for (user = login; (*sys = *user); user++, sys++)
+			;
+		user = login;
+	}
+
+	while (*path) {
+		*dev++ = *path++;
+	}
+	*dev = '\0';
+
+	_rmt_turnonmsgsbyenv();
+
+        /* try to find out the uname of the remote host */
+	{
+#define MAX_UNAMECMD MAXHOSTLEN+40
+#define MAX_UNAME 20
+	    FILE *rmt_f;
+	    char cmd[MAX_UNAMECMD];
+	    char uname[MAX_UNAME];
+            struct uname_table *p;
+
+	    if (user != login) {
+		snprintf(cmd, sizeof(cmd), "%s -l %s %s uname", rsh_path, login, system);
+	    }
+	    else {
+		snprintf(cmd, sizeof(cmd), "%s %s uname", rsh_path, system);
+	    }
+
+	    rmt_f = popen(cmd, "r");
+	    if (rmt_f == NULL) {
+		_rmt_msg(RMTWARN, _(
+		"rmtopen: failed to detect remote host type using \"%s\"\n"),
+			cmd);
+		RMTHOST(i) = UNAME_UNDEFINED;
+		goto do_rmt;
+	    }
+	    else {
+		int len;
+		char *c  = fgets(uname, sizeof(uname), rmt_f);
+	        pclose(rmt_f);
+
+		if (c == NULL) {
+		    _rmt_msg(RMTWARN, _(
+		"rmtopen: failed to detect remote host type reading \"%s\"\n"),
+			cmd);
+		    RMTHOST(i) = UNAME_UNDEFINED;
+		    goto do_rmt;
+		}
+		len = strlen(uname);
+		if (len > 0 && uname[len-1] == '\n')
+		    uname[len-1] = '\0'; /* chomp the '\n' */
+	    }
+
+	    for(p = &uname_table[0]; p->name != 0; p++) {
+		if (strncmp(p->name, uname, strlen(p->name)) == 0)
+		    break;
+	    }
+	    if (p->name == 0) {
+		RMTHOST(i) = UNAME_UNKNOWN;
+		_rmt_msg(RMTWARN, _(
+		"rmtopen: remote host type, \"%s\", is unknown to librmt\n"),
+			uname);
+	    }
+	    else {
+		RMTHOST(i) = p->id;
+		_rmt_msg(RMTDBG, "rmtopen: RMTHOST(%d) = %s\n", i, p->name);
+	    }
+	}
+
+
+/*
+ *	setup the pipes for the 'rsh' command and fork
+ */
+do_rmt:
+	if (pipe(_rmt_Ptc[i]) == -1 || pipe(_rmt_Ctp[i]) == -1)
+		return(-1);
+
+	if ((rc = fork()) == -1)
+		return(-1);
+
+	if (rc == 0)
+	{
+		close(0);
+		dup(_rmt_Ptc[i][0]);
+		close(_rmt_Ptc[i][0]); close(_rmt_Ptc[i][1]);
+		close(1);
+		dup(_rmt_Ctp[i][1]);
+		close(_rmt_Ctp[i][0]); close(_rmt_Ctp[i][1]);
+		(void) setuid (getuid ());
+		(void) setgid (getgid ());
+		if (_rmt_msgson() == RMTDBG) {
+		    snprintf(rmt_cmd, sizeof(rmt_cmd), "%s %s.%d",
+				rmt_path, RMT_DEBUG_FILE, getpid());
+		}
+		else {
+		    strncpy(rmt_cmd, rmt_path, sizeof(rmt_cmd));
+		}
+		if (user != login)
+		{
+			execl(rsh_path, "rsh", system, "-l", login,
+				rmt_cmd, (char *) 0);
+		}
+		else
+		{
+			execl(rsh_path, "rsh", system,
+				rmt_cmd, (char *) 0);
+		}
+
+/*
+ *	bad problems if we get here
+ */
+		fprintf(stderr,
+		    "librmt: problem finding either RSH(%s) or RMT(%s): %s\n",
+		    rsh_path, rmt_path, strerror(errno));
+		exit(1);
+	}
+
+	close(_rmt_Ptc[i][0]); close(_rmt_Ctp[i][1]);
+
+/*
+ *	now attempt to open the tape device
+ */
+
+	sprintf(buffer, "O%s\n%d\n", device, oflag);
+	if (_rmt_command(i, buffer) == -1 || _rmt_status(i) == -1)
+		return(-1);
+
+	return(i);
+}
Index: create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtread.c
===================================================================
--- create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtread.c	(nonexistent)
+++ create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtread.c	(revision 5)
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2000-2001 Silicon Graphics, Inc.; provided copyright in
+ * certain portions may be held by third parties as indicated herein.
+ * All Rights Reserved.
+ *
+ * The code in this source file represents an aggregation of work from
+ * Georgia Tech, Fred Fish, Jeff Lee, Arnold Robbins and other Silicon
+ * Graphics engineers over the period 1985-2000.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include "rmtlib.h"
+
+static int _rmt_read(int, char *, unsigned int);
+
+/*
+ *	Read from stream.  Looks just like read(2) to caller.
+ */
+
+int rmtread (fildes, buf, nbyte)
+int fildes;
+char *buf;
+unsigned int nbyte;
+{
+	if (isrmt (fildes))
+	{
+		return (_rmt_read (fildes - REM_BIAS, buf, nbyte));
+	}
+	else
+	{
+		return (read (fildes, buf, nbyte));
+	}
+}
+
+
+/*
+ *	_rmt_read --- read a buffer from a remote tape
+ */
+
+static int _rmt_read(int fildes, char *buf, unsigned int nbyte)
+{
+	int rc, i;
+	char buffer[BUFMAGIC];
+
+	sprintf(buffer, "R%d\n", nbyte);
+	if (_rmt_command(fildes, buffer) == -1 || (rc = _rmt_status(fildes)) == -1)
+		return(-1);
+
+	for (i = 0; i < rc; i += nbyte, buf += nbyte)
+	{
+		nbyte = read(RMTREAD(fildes), buf, rc);
+		if (nbyte <= 0)
+		{
+			_rmt_abort(fildes);
+			setoserror(EIO);
+	 		return(-1);
+		}
+	}
+
+	return(rc);
+}
Index: create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtstatus.c
===================================================================
--- create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtstatus.c	(nonexistent)
+++ create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtstatus.c	(revision 5)
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2000-2001 Silicon Graphics, Inc.; provided copyright in
+ * certain portions may be held by third parties as indicated herein.
+ * All Rights Reserved.
+ *
+ * The code in this source file represents an aggregation of work from
+ * Georgia Tech, Fred Fish, Jeff Lee, Arnold Robbins and other Silicon
+ * Graphics engineers over the period 1985-2000.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include "rmtlib.h"
+
+/*
+ *	_rmt_status --- retrieve the status from the pipe
+ */
+
+int _rmt_status(fildes)
+int fildes;
+{
+	int i;
+	char c, *cp;
+	char buffer[BUFMAGIC];
+
+/*
+ *	read the reply command line
+ */
+
+	for (i = 0, cp = buffer; i < BUFMAGIC; i++, cp++)
+	{
+		if (read(RMTREAD(fildes), cp, 1) != 1)
+		{
+			_rmt_abort(fildes);
+			setoserror(EIO);
+			return(-1);
+		}
+		if (*cp == '\n')
+		{
+			*cp = 0;
+			break;
+		}
+	}
+
+	if (i == BUFMAGIC)
+	{
+		_rmt_abort(fildes);
+		setoserror(EIO);
+		return(-1);
+	}
+
+/*
+ *	check the return status
+ */
+
+	for (cp = buffer; *cp; cp++)
+		if (*cp != ' ')
+			break;
+
+	if (*cp == 'E' || *cp == 'F')
+	{
+		setoserror(atoi(cp + 1));
+		while (read(RMTREAD(fildes), &c, 1) == 1)
+			if (c == '\n')
+				break;
+
+		if (*cp == 'F')
+			_rmt_abort(fildes);
+
+		return(-1);
+	}
+
+/*
+ *	check for mis-synced pipes
+ */
+
+	if (*cp != 'A')
+	{
+		_rmt_abort(fildes);
+		setoserror(EIO);
+		return(-1);
+	}
+
+	return(atoi(cp + 1));
+}
+
+
+
Index: create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtwrite.c
===================================================================
--- create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtwrite.c	(nonexistent)
+++ create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt/rmtwrite.c	(revision 5)
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2000-2001 Silicon Graphics, Inc.; provided copyright in
+ * certain portions may be held by third parties as indicated herein.
+ * All Rights Reserved.
+ *
+ * The code in this source file represents an aggregation of work from
+ * Georgia Tech, Fred Fish, Jeff Lee, Arnold Robbins and other Silicon
+ * Graphics engineers over the period 1985-2000.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <unistd.h>
+#include <stdio.h>
+#include <errno.h>
+
+#include "rmtlib.h"
+
+static int _rmt_write(int, char *, unsigned int);
+
+/*
+ *	Write to stream.  Looks just like write(2) to caller.
+ */
+
+int rmtwrite (fildes, buf, nbyte)
+int fildes;
+char *buf;
+unsigned int nbyte;
+{
+	if (isrmt (fildes))
+	{
+		return (_rmt_write (fildes - REM_BIAS, buf, nbyte));
+	}
+	else
+	{
+		return (write (fildes, buf, nbyte));
+	}
+}
+
+
+/*
+ *	_rmt_write --- write a buffer to the remote tape
+ */
+
+static int _rmt_write(int fildes, char *buf, unsigned int nbyte)
+{
+	char buffer[BUFMAGIC];
+
+	sprintf(buffer, "W%d\n", nbyte);
+	if (_rmt_command(fildes, buffer) == -1)
+		return(-1);
+
+	if (write(RMTWRITE(fildes), buf, nbyte) == nbyte)
+	{
+		return(_rmt_status(fildes));
+	}
+
+	_rmt_abort(fildes);
+	setoserror(EIO);
+	return(-1);
+}
Index: create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt
===================================================================
--- create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt	(nonexistent)
+++ create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt	(revision 5)

Property changes on: create-3.1.9-librmt-patch/xfsdump-3.1.9-new/librmt
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-3.1.9-librmt-patch/xfsdump-3.1.9-new
===================================================================
--- create-3.1.9-librmt-patch/xfsdump-3.1.9-new	(nonexistent)
+++ create-3.1.9-librmt-patch/xfsdump-3.1.9-new	(revision 5)

Property changes on: create-3.1.9-librmt-patch/xfsdump-3.1.9-new
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-3.1.9-librmt-patch
===================================================================
--- create-3.1.9-librmt-patch	(nonexistent)
+++ create-3.1.9-librmt-patch	(revision 5)

Property changes on: create-3.1.9-librmt-patch
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-3.1.9-xattr-patch/create.patch.sh
===================================================================
--- create-3.1.9-xattr-patch/create.patch.sh	(nonexistent)
+++ create-3.1.9-xattr-patch/create.patch.sh	(revision 5)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=3.1.9
+
+tar --files-from=file.list -xJvf ../xfsdump-$VERSION.tar.xz
+mv xfsdump-$VERSION xfsdump-$VERSION-orig
+
+cp -rf ./xfsdump-$VERSION-new ./xfsdump-$VERSION
+
+diff --unified -Nr  xfsdump-$VERSION-orig  xfsdump-$VERSION > xfsdump-$VERSION-xattr.patch
+
+mv xfsdump-$VERSION-xattr.patch ../patches
+
+rm -rf ./xfsdump-$VERSION
+rm -rf ./xfsdump-$VERSION-orig

Property changes on: create-3.1.9-xattr-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: create-3.1.9-xattr-patch/file.list
===================================================================
--- create-3.1.9-xattr-patch/file.list	(nonexistent)
+++ create-3.1.9-xattr-patch/file.list	(revision 5)
@@ -0,0 +1 @@
+xfsdump-3.1.9/common/hsmapi.c
Index: create-3.1.9-xattr-patch/xfsdump-3.1.9-new/common/hsmapi.c
===================================================================
--- create-3.1.9-xattr-patch/xfsdump-3.1.9-new/common/hsmapi.c	(nonexistent)
+++ create-3.1.9-xattr-patch/xfsdump-3.1.9-new/common/hsmapi.c	(revision 5)
@@ -0,0 +1,882 @@
+/*
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.
+ * All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <string.h>
+#include <errno.h>
+#include <assert.h>
+#include <uuid/uuid.h>
+#include <attr/attributes.h>
+#include <xfs/xfs.h>
+#include <xfs/jdm.h>
+
+#include <string.h>
+
+#include "config.h"
+
+#include "types.h"
+#include "hsmapi.h"
+#include "mlog.h"
+
+/* This version of the HSM API supports the DMF attribute used in the initial
+ * DMF release, as well as the attribute used in the pseudo multiple managed
+ * region DMF release.
+*/
+
+/* DMF attribute name, size, and format as stored within XFS. (Stolen directly
+   from "dmfsapi/dmf_dmattr.H".
+*/
+
+#define	DMF_ATTR_NAME	"SGI_DMI_DMFATTR"	/* name of DMF's attr */
+
+typedef	struct {
+	u_char	fsys;		/* filesystem type */
+	u_char	version;	/* attribute format version */
+	u_char	state[2];	/* dm_state in MSB form */
+	u_char	flags[2];	/* dm_flags in MSB form */
+	u_char	bfid[16];	/* Bitfile ID in MSB form */
+} XFSattrvalue0_t;
+
+typedef	struct {
+	u_char	rg_offset[8];	/* region offset in MSB form */
+	u_char	rg_size[8];	/* region length in MSB form */
+	u_char	rg_state[2];	/* region dm_state in MSB form */
+	u_char	rg_flags;	/* managed region event bits */
+	u_char	rg_fbits;	/* region flag bits */
+} XFSattrregion_t;
+
+typedef	struct {
+	u_char	fsys;		/* filesystem type */
+	u_char	version;	/* attribute format version */
+	u_char	state[2];	/* global dm_state in MSB form */
+	u_char	flags[2];	/* global dm_flags in MSB form */
+	u_char	bfid[16];	/* Bitfile ID in MSB form. */
+	u_char	sitetag[4];	/* site tag */
+	u_char	regcnt[2];	/* number of regions in MSB form */
+} XFSattrvalue1_t;
+
+#define	MIN_FORMAT1_ATTR_LEN	(sizeof(XFSattrvalue1_t) + \
+				  sizeof(XFSattrregion_t))
+
+/* supported fsys values */
+
+/* XFS DMAPI (w/o MMR) */
+#define	FSYS_TYPE_XFS		1
+
+/* supported version values */
+
+/* original DMF attr format */
+#define	DMF_ATTR_FORMAT_0	0
+/* DMF attr with multiple regions (real or pseudo) or with a non-zero
+ * site tag. attrs of this format consist of a XFSattrvalue1_t struct
+ * followed by 1 or more XFSattrregion_t structs */
+#define	DMF_ATTR_FORMAT_1	1
+
+/* Interesting state field values */
+
+#define	DMF_ST_DUALSTATE	2	/* file has backups plus online data */
+#define	DMF_ST_OFFLINE		3	/* file has backups, no online data */
+#define	DMF_ST_UNMIGRATING	4	/* file data is being staged in */
+#define	DMF_ST_NOMIGR		5	/* file should not be migrated */
+#define	DMF_ST_PARTIAL		6	/* file has backups plus parts online */
+
+/* DM_EVENT_* are defined in <xfs/dmapi.h>. Trying to avoid a dmapi dependency
+ * in xfsdump since dmapi is not commonly used, yet this code needs to know some
+ * of the event bits.
+ */
+#define	DM_EVENT_READ		16
+#define	DM_EVENT_WRITE		17
+#define	DM_EVENT_TRUNCATE	18
+#define	DM_EVENT_DESTROY	20
+
+/* Interesting bit combinations within the bs_dmevmask field of struct xfs_bstat
+ * OFL, UNM, and PAR files have exactly these bits set.
+ * DUL and MIG files have all but the DM_EVENT_READ bit set */
+#define DMF_EV_BITS	((1<<DM_EVENT_DESTROY) | \
+			  (1<<DM_EVENT_READ)    | \
+			  (1<<DM_EVENT_WRITE)   | \
+			  (1<<DM_EVENT_TRUNCATE))
+
+/* OFL file's managed region event flags */
+#define DMF_MR_FLAGS	(0x1 | 0x2 | 0x4)
+
+/* The following definitions provide the internal format of the hsm_fs_ctxt_t
+   and hsm_f_ctxt_t structures, respectively.
+*/
+
+typedef	struct	{
+	int		dumpversion;
+	jdm_fshandle_t  *fshanp;
+} dmf_fs_ctxt_t;
+
+typedef	struct	{
+	dmf_fs_ctxt_t	fsys;
+	off64_t		filesize;
+	int		candidate;
+	int		attrlen;
+	char		attrval[5000];	/* sized bigger than any poss. value */
+} dmf_f_ctxt_t;
+
+/******************************************************************************
+* Name
+*       msb_store - store a variable to u_char array in MSB format
+*
+* Returns
+*	void
+******************************************************************************/
+static inline void
+msb_store(
+	u_char		*dest,
+	uint64_t	src,
+	int		length)
+{
+        int             i;
+
+        for (i = length - 1; i >= 0; i--) {
+                dest[i] = (u_char)(src & 0xff);
+                src >>= 8;
+        }
+}
+
+/******************************************************************************
+* Name
+*       msb_load - load a variable from a u_char array in MSB format
+*
+* Returns
+*	value
+******************************************************************************/
+static inline uint64_t
+msb_load(
+	u_char		*src,
+	int		length)
+{
+        uint64_t        tmp = 0;
+        int             i;
+
+        for (i = 0; i < length; i++) {
+                tmp = (tmp << 8) | src[i];
+        }
+        return tmp;
+}
+
+/******************************************************************************
+* Name
+*	HsmInitFsysContext - allocate and initialize an HSM filesystem context
+*
+* Description
+*	HsmInitFsysContext allocates and initializes an HSM filesystem
+*	context to hold all filesystem information that might later be needed
+*	by other HSM routines.  The context is read-only, and can be shared
+*	by multiple xfsdump dump streams.  It should eventually be freed by
+*	calling HsmDeleteFsysContext().  The caller must provide the mount
+*	point of the filesystem to be dumped and the HSM API version that
+*	xfsdump was compiled with.
+*
+*	Note: The restore routines do not require an HSM filesystem context.
+*
+* Returns
+*	!= NULL, then a pointer to the filesystem context that was allocated.
+*	== NULL, either the HSM libary is not compatible with xfsdump, or
+*	      the filesystem is not under HSM management.
+******************************************************************************/
+
+extern hsm_fs_ctxt_t *
+HsmInitFsysContext(
+const	char		*mountpoint,
+	int		dumpversion)
+{
+	dmf_fs_ctxt_t	*dmf_fs_ctxtp;
+
+	if (dumpversion != HSM_API_VERSION_1) {
+		return NULL;		/* we can't handle this version */
+	}
+
+	/* Malloc space for a filesystem context, and initialize any fields
+	   needed later by other routines.
+	*/
+
+	if ((dmf_fs_ctxtp = malloc(sizeof(dmf_fs_ctxt_t))) == NULL) {
+		return NULL;
+	}
+	dmf_fs_ctxtp->dumpversion = dumpversion;
+
+	/* Get the filesystem's handle for later use in building file
+	   handles in HsmInitFileContext.
+	*/
+	dmf_fs_ctxtp->fshanp = jdm_getfshandle((char *)mountpoint);
+	if (dmf_fs_ctxtp->fshanp == NULL) {
+		free(dmf_fs_ctxtp);
+		return NULL;
+	}
+
+	return (hsm_fs_ctxt_t *)dmf_fs_ctxtp;
+}
+
+
+/******************************************************************************
+* Name
+*	HsmDeleteFsysContext - delete an HSM filesystem context
+*
+* Description
+*	HsmDeleteFsysContext releases all storage previously allocated to a
+*	HSM filesystem context via HsmInitFsysContext.
+*
+* Returns
+*	None.
+******************************************************************************/
+
+extern void
+HsmDeleteFsysContext(
+	hsm_fs_ctxt_t	*contextp)
+{
+	free(contextp);
+}
+
+
+/******************************************************************************
+* Name
+*	HsmEstimateFileSpace - return estimated offline file size
+*
+* Description
+*	HsmEstimateFileSpace is called from within estimate_dump_space() only
+*	if -a is selected.  It estimates the number of bytes needed to dump
+*	the file assuming that all dual-residency data will be dumped as holes.
+*
+* Returns
+*	!= 0, then *bytes contains the estimated size of the file in bytes.
+*	== 0, then no estimate made.  Caller should use his default estimator.
+******************************************************************************/
+
+extern int
+HsmEstimateFileSpace(
+	hsm_fs_ctxt_t		*fscontextp,
+	hsm_f_ctxt_t		*fcontextp,
+	const struct xfs_bstat	*statp,
+	off64_t			*bytes,
+	int			accurate)
+{
+	/* If the estimate needs to be accurate, then we'll have to
+	 * pay the price and read the DMF attribute, if there is one,
+	 * to determine exactly what DMF state the file is in. Otherwise,
+	 * make a guess based on information in the bstat. If a
+	 * hsm_f_ctxt_t was provided, an accurate estimate is free.
+	 */
+	if (fcontextp) {
+		dmf_f_ctxt_t	*dmf_f_ctxt = (dmf_f_ctxt_t *)fcontextp;
+
+		if (dmf_f_ctxt->candidate) {
+			*bytes = 0;	/* treat the entire file as offline */
+			return 1;
+		} else {
+			return 0;
+		}
+	} else if (accurate) {
+		dmf_fs_ctxt_t	*dmf_fs_ctxtp = (dmf_fs_ctxt_t *)fscontextp;
+		dmf_f_ctxt_t	dmf_f_ctxt;
+
+		/* This is an implicit HsmAllocateFileContext call. */
+
+		dmf_f_ctxt.fsys = *dmf_fs_ctxtp;
+		dmf_f_ctxt.candidate = 0;
+
+		/* Initialize the file context to determine the file's state. */
+
+		if (HsmInitFileContext((hsm_f_ctxt_t *)&dmf_f_ctxt, statp)) {
+			return 0;
+		}
+
+		/* If the file is dualstate, make it appear offline. */
+
+		if (dmf_f_ctxt.candidate) {
+			*bytes = 0;	/* treat the entire file as offline */
+			return 1;
+		} else {
+			return 0;
+		}
+	} else {
+		/* This code is assuming that there are no MIG files, and so any
+		   file with DMAPI event bits set will be dumped as OFL. The
+		   non-dir dump size estimation will be somewhat low if there
+		   are MIG files.
+		 */
+		if ((statp->bs_mode & S_IFMT) != S_IFREG) {
+			return 0;       /* not a regular file */
+		}
+		if ((statp->bs_xflags & XFS_XFLAG_HASATTR) == 0) {
+			return 0;       /* no DMF attribute can possibly exist */
+		}
+		if ((statp->bs_dmevmask & DMF_EV_BITS) == 0) {
+			return 0;
+		}
+
+		*bytes = 0;
+		return 1;
+	}
+}
+
+
+/******************************************************************************
+* Name
+*	HsmEstimateFileOffset - return estimated file offset
+*
+* Description
+*	HsmEstimateFileOffset is called from within quantity2offset() only
+*	if -a is selected.  It estimates the offset within the file that has
+*	'bytecount' bytes of physical data preceding it assuming that all
+*	dual-residency data in the file will be dumped as holes.
+*
+* Returns
+*	!= 0, then *byteoffset contains the estimated offset within the file.
+*	== 0, then no estimate made.  Caller should use his default estimator.
+******************************************************************************/
+
+/* ARGSUSED */
+extern int
+HsmEstimateFileOffset(
+	hsm_fs_ctxt_t		*contextp,
+	const struct xfs_bstat	*statp,
+	off64_t			bytecount,
+	off64_t			*byteoffset)
+{
+	dmf_fs_ctxt_t		*dmf_fs_ctxtp = (dmf_fs_ctxt_t *)contextp;
+	dmf_f_ctxt_t		dmf_f_ctxt;
+
+	/* This is an implicit HsmAllocateFileContext call. */
+
+	dmf_f_ctxt.fsys = *dmf_fs_ctxtp;
+	dmf_f_ctxt.candidate = 0;
+
+	/* Initialize the file context to determine the file's state. */
+
+	if (HsmInitFileContext((hsm_f_ctxt_t *)&dmf_f_ctxt, statp)) {
+		return 0;
+	}
+
+	/* If the file is dualstate, make it appear offline. */
+
+	if (dmf_f_ctxt.candidate) {
+		*byteoffset = statp->bs_size;
+		return 1;
+	} else {
+		return 0;
+	}
+}
+
+
+/******************************************************************************
+* Name
+*	HsmAllocateFileContext - allocate an HSM file context
+*
+* Description
+*	HsmAllocateFileContext mallocs the maximum-sized file context that
+*	might later needed by HsmInitFileContext().  The context is
+*	read-write.  Each xfsdump stream must have its own file context.  This
+*	context should eventually be freed by calling HsmDeleteFileContext().
+*	The caller must provide the HSM filesystem context for the filesystem
+*	being dumped.
+*
+*	Note: The restore routines do not require an HSM file context.
+*
+* Returns
+*	!= NULL, then a pointer to the file context that was allocated.
+******************************************************************************/
+
+extern hsm_f_ctxt_t *
+HsmAllocateFileContext(
+	hsm_fs_ctxt_t	*contextp)
+{
+	dmf_f_ctxt_t	*dmf_f_ctxtp;
+
+	if ((dmf_f_ctxtp = malloc(sizeof(dmf_f_ctxt_t))) == NULL) {
+		return NULL;
+	}
+
+	/* Save the filesystem information in the file context. */
+
+	dmf_f_ctxtp->fsys = *(dmf_fs_ctxt_t *)contextp;
+	dmf_f_ctxtp->candidate = 0;
+
+	return (hsm_f_ctxt_t *)dmf_f_ctxtp;
+}
+
+
+/******************************************************************************
+* Name
+*	HsmDeleteFileContext - delete a previously created HSM file context
+*
+* Description
+*	HsmDeleteFileContext releases all storage previously allocated to a
+*	HSM file context via HsmAllocateFileContext.
+*
+* Returns
+*	None.
+******************************************************************************/
+
+extern void
+HsmDeleteFileContext(
+	hsm_f_ctxt_t	*contextp)
+{
+	free(contextp);
+}
+
+
+/******************************************************************************
+* Name
+*	HsmInitFileContext - initialize the HSM context for a particular file
+*
+* Description
+*	HsmInitFileContext initializes an existing HSM file context for
+*	subsequent operations on a particular regular file.  Other HSM routines
+*	use the context to access information collected by HsmInitFileContext
+*	about the file rather than having to recollect the file's information
+*	on each call.
+*
+* Returns
+*	== 0, context was created.
+*	!= 0, if something is wrong with the file and it should not be dumped.
+******************************************************************************/
+
+extern int
+HsmInitFileContext(
+	hsm_f_ctxt_t		*contextp,
+	const struct xfs_bstat	*statp)
+{
+	dmf_f_ctxt_t		*dmf_f_ctxtp = (dmf_f_ctxt_t *)contextp;
+	XFSattrvalue0_t		*dmfattrp;
+	int			state;
+	int			error;
+	attr_multiop_t		attr_op;
+
+	dmf_f_ctxtp->candidate = 0; /* assume file will NOT be of interest */
+
+	/* Try and rule out a dualstate inode by doing some quick tests. */
+
+	if ((statp->bs_mode & S_IFMT) != S_IFREG) {
+		return 0;	/* not a regular file */
+	}
+	if ((statp->bs_xflags & XFS_XFLAG_HASATTR) == 0) {
+		return 0;	/* no DMF attribute exists */
+	}
+	if ((statp->bs_dmevmask & DMF_EV_BITS) == 0) {
+		return 0;	/* no interesting DMAPI bits set */
+	}
+
+	/* We have a likely candidate, so we have to pay the price and look
+	   for the DMF attribute.  (It could be in a disk block separate from
+	   the inode.)
+	*/
+	attr_op.am_opcode    = ATTR_OP_GET;
+	attr_op.am_error     = 0;
+	attr_op.am_attrname  = DMF_ATTR_NAME;
+	attr_op.am_attrvalue = dmf_f_ctxtp->attrval;
+	attr_op.am_length    = sizeof(dmf_f_ctxtp->attrval);
+	attr_op.am_flags     = ATTR_ROOT;
+
+	error = jdm_attr_multi(dmf_f_ctxtp->fsys.fshanp,
+			       (struct xfs_bstat *)statp,
+			       (char *)&attr_op,
+			       1,
+			       0);
+	if (error || attr_op.am_error)
+		return 0; /* no DMF attribute */
+
+	dmf_f_ctxtp->attrlen = attr_op.am_length;
+	dmfattrp = (XFSattrvalue0_t *)dmf_f_ctxtp->attrval;
+
+	if (dmfattrp->fsys != FSYS_TYPE_XFS)
+		return 0; /* unsupported filesystem version */
+
+	switch(dmfattrp->version) {
+	case DMF_ATTR_FORMAT_0:
+		if (dmf_f_ctxtp->attrlen != sizeof(XFSattrvalue0_t))
+			return 0; /* wrong size */
+		break;
+	case DMF_ATTR_FORMAT_1:
+		if (dmf_f_ctxtp->attrlen < MIN_FORMAT1_ATTR_LEN)
+			return 0; /* wrong size */
+		break;
+	default:
+		return 0; /* unsupported attr version */
+	}
+
+	state = (int)msb_load(dmfattrp->state, sizeof(dmfattrp->state));
+	switch (state) {
+	case DMF_ST_DUALSTATE:
+	case DMF_ST_UNMIGRATING:
+	case DMF_ST_PARTIAL:
+	case DMF_ST_OFFLINE:
+		/* We have a DMF file that can be treated as offline */
+		dmf_f_ctxtp->candidate = 1;
+		dmf_f_ctxtp->filesize = statp->bs_size;
+		break;
+
+	default:
+		break;
+	}
+	return 0;
+}
+
+
+/*******************************************************************************
+* Name
+*	HsmModifyInode - modify a struct xfs_bstat to make a file appear offline
+*
+* Description
+*	HsmModifyInode uses the context provided by a previous
+*	HsmInitFileContext call to determine how to modify a struct xfs_bstat
+*	structure to make a dual-residency HSM file appear to be offline.
+*
+* Returns
+*	!= 0, struct xfs_bstat structure was modified.
+*	== 0, if something is wrong with the file and it should not be dumped.
+8******************************************************************************/
+
+extern int
+HsmModifyInode(
+	hsm_f_ctxt_t		*contextp,
+	struct xfs_bstat	*statp)
+{
+	dmf_f_ctxt_t		*dmf_f_ctxtp = (dmf_f_ctxt_t *)contextp;
+
+	if (dmf_f_ctxtp->candidate) {
+		statp->bs_dmevmask = DMF_EV_BITS;
+	}
+	return 1;
+}
+
+
+/******************************************************************************
+* Name
+*	HsmModifyExtentMap - modify getbmapx array to make file appear offline
+*
+* Description
+*	HsmModifyExtentMap uses the context provided by a previous
+*	HsmInitFileContext call to determine how to modify a contiguous array
+*	of getbmapx structures to make a dual-residency HSM file appear to
+*	be offline.
+*
+* Returns
+*	!= 0, getbmapx array was successfully modified.
+*	== 0, if something is wrong with the file and it should not be dumped.
+******************************************************************************/
+
+extern int
+HsmModifyExtentMap(
+	hsm_f_ctxt_t	*contextp,
+	struct getbmapx	*bmap)
+{
+	dmf_f_ctxt_t	*dmf_f_ctxtp = (dmf_f_ctxt_t *)contextp;
+	int64_t		length;
+
+	if (bmap[0].bmv_entries <= 0) {
+		return 1;	/* caller must already be at EOF */
+	}
+
+	if (!dmf_f_ctxtp->candidate) {
+		return 1;	/* not a dualstate file; dump as normal */
+	}
+
+	/* We are dumping a dualstate file.  Make it look like there is only
+	   one getbmapx extent and that it contains a hole which extends from
+	   the current offset to the end of the file.  The bmap[1].bmv_offset
+	   should already be correct.
+	*/
+
+	length = BTOBB(dmf_f_ctxtp->filesize) - bmap[1].bmv_offset;
+
+	if (length > 0) {
+		bmap[0].bmv_entries = 1;	/* rest of file is one extent */
+
+		bmap[1].bmv_block = -1;		/* convert to a hole */
+		bmap[1].bmv_length = length;
+	} else {
+		bmap[0].bmv_entries = 0;	/* indicate at EOF */
+	}
+
+	return 1;
+}
+
+
+/******************************************************************************
+* Name
+*	HsmFilterExistingAttribute - filter out unwanted extended attributes
+*
+* Description
+*	HsmFilterExistingAttribute uses the context provided by a previous
+*	HsmInitFileContext call to determine whether or not the extended
+*	attribute with name 'namep' should be included in a file's dump image.
+*	(An extended attribute can be modified within the dump by filtering
+*	it out with this routine, then adding the new version of the attribute
+*	back with HsmAddNewAttribute.)
+*
+*	Note: this routine must be idempotent.  It is possible that xfsdump
+*	will call this routine a second time for the same attribute if after
+*	the first call it discovers that there isn't room in its buffer to
+*	hold the attribute value.
+*
+* Returns
+*	!= 0, the attribute was successfully examined.  If '*skip_entry' is
+*	      non-zero, xfsdump will not add this attribute to the dump.
+*	== 0, if something is wrong with the file and it should not be dumped.
+******************************************************************************/
+
+extern int
+HsmFilterExistingAttribute(
+	hsm_f_ctxt_t	*hsm_f_ctxtp,
+const	char		*namep,		/* attribute name */
+	uint32_t	valuesz,	/* value size */
+	int		flag,
+	int		*skip_entry)
+{
+	dmf_f_ctxt_t	*dmf_f_ctxtp = (dmf_f_ctxt_t *)hsm_f_ctxtp;
+
+	*skip_entry = 0;	/* assume we will not remove this attribute */
+
+	if (!dmf_f_ctxtp->candidate) {
+		return 1;	/* not a dualstate file */
+	}
+	if (flag != ATTR_ROOT) {
+		return 1;	/* not a root attribute */
+	}
+	if (strcmp(namep, DMF_ATTR_NAME)) {
+		return 1;	/* not the right attribute */
+	}
+
+	if (valuesz < sizeof(XFSattrvalue0_t)) {
+		return 0;	/* attribute is corrupt */
+	}
+
+	/* Remove the existing DMF attribute, as we will later replace it with
+	   our own version.
+	*/
+
+	*skip_entry = 1;
+	return 1;
+}
+
+
+/******************************************************************************
+* Name
+*	HsmAddNewAttribute - add zero or more HSM attributes to a file's dump
+*
+* Description
+*	HsmAddNewAttribute uses the context provided by a previous
+*	HsmInitFileContext call to determine whether or not additional HSM
+*	extended attributes need to be added to a file's dump image.  On the
+*	first call for a file, 'cursor' will be zero.  xfsdump will increment
+*	'cursor' by one each time it asks for a new attribute.  When no more
+*	attributes are to be added, '*namepp' should be set to NULL.
+*
+*	Note: this routine must be idempotent.  It is possible that xfsdump
+*	will call this routine a second time using the same cursor value if
+*	it discovers that there isn't room in its buffer to hold the attribute
+*	value it was given in the first call.
+*
+* Returns
+*	!= 0, call was successful.  If '*namepp' is non-NULL, then it is the
+*	      name of an attribute to be added to the file's dump.  '*valuep'
+*	      points the the value of the attribute, and '*valueszp' is the
+*	      value's size.  If '*namep* is NULL, then there are no more
+*	      attributes to be added.
+*	== 0, if something is wrong with the file and it should not be dumped.
+******************************************************************************/
+
+extern int
+HsmAddNewAttribute(
+	hsm_f_ctxt_t	*hsm_f_ctxtp,
+	int		cursor,
+	int		flag,
+	char		**namepp,	/* pointer to new attribute name */
+	char		**valuepp,	/* pointer to its value */
+	uint32_t	*valueszp)	/* pointer to the value size */
+{
+	dmf_f_ctxt_t	*dmf_f_ctxtp = (dmf_f_ctxt_t *)hsm_f_ctxtp;
+	XFSattrvalue1_t	*dmfattr1p = (XFSattrvalue1_t *)dmf_f_ctxtp->attrval;
+
+	*namepp = NULL;		/* assume we won't add an attribute */
+
+	if (!dmf_f_ctxtp->candidate) {
+		return 1;	/* not a dualstate file */
+	}
+	if (flag != ATTR_ROOT) {
+		return 1;	/* not in the root attribute section */
+	}
+
+	if (cursor > 0) {
+		return 1;	/* there is only one attribute to add */
+	}
+
+	/* DMF writes format0 (XFSattrvalue0_t) attributes unless:
+	 *    - the file has multiple regions
+	 *    - the file has a non-zero site tag
+	 *
+	 * Here we are writing a single region (OFL), so we only dump a
+	 * format1 attribute if the file has a non-zero site tag.
+	 */
+	if (dmfattr1p->version == DMF_ATTR_FORMAT_1 &&
+	    msb_load(dmfattr1p->sitetag, sizeof(dmfattr1p->sitetag)) != 0) {
+		XFSattrregion_t *reg;
+		reg = (XFSattrregion_t *)(dmf_f_ctxtp->attrval +
+				           sizeof(XFSattrvalue1_t));
+		dmf_f_ctxtp->attrlen = MIN_FORMAT1_ATTR_LEN;
+
+		/* make one offline region the size of the whole file */
+		msb_store(dmfattr1p->regcnt, 1, sizeof(dmfattr1p->regcnt));
+		msb_store(reg->rg_offset, 0, sizeof(reg->rg_offset));
+		msb_store(reg->rg_size, dmf_f_ctxtp->filesize, sizeof(reg->rg_size));
+		msb_store(reg->rg_state, DMF_ST_OFFLINE, sizeof(reg->rg_state));
+		reg->rg_flags = DMF_MR_FLAGS;
+		reg->rg_fbits = 0;
+	} else {
+		/* writing a format0 attr. ensure correct length and version */
+		dmfattr1p->version = DMF_ATTR_FORMAT_0;
+		dmf_f_ctxtp->attrlen = sizeof(XFSattrvalue0_t);
+	}
+
+	/* set the global state to offline */
+	msb_store(dmfattr1p->state, DMF_ST_OFFLINE, sizeof(dmfattr1p->state));
+
+	*valuepp = (char *)dmfattr1p;
+	*namepp = DMF_ATTR_NAME;
+	*valueszp = dmf_f_ctxtp->attrlen;
+	return 1;
+}
+
+
+/******************************************************************************
+* Name
+*	HsmBeginRestoreFile
+*
+* Description
+*	HsmBeginRestoreFile is called after a file is created but before any
+*	data has been restored to it. The hsm_flagp param can be used to
+*	keep track of limited state between calls to the HSM restore routines.
+*
+*	Note that this does not require a filesystem or file context like the
+*	HSM calls for xfsdump. This is currently a crude interface to satisfy
+*	a specific need. It can be generalized at a later time, if necessary.
+*
+* Returns
+* 	None.
+******************************************************************************/
+
+extern void
+HsmBeginRestoreFile(
+	bstat_t		*bstatp,
+	int		fd,
+	int		*hsm_flagp)
+{
+	int rv;
+	XFSattrvalue0_t dmattr;
+
+	/* If it appears to be a DMF-managed file, set the NOMIGR attribute
+	 * on it to prevent DMF from touching the file while we are restoring
+	 * it. If it turns out to not be a DMF-managed file, we'll need to
+	 * remove the attribute when the file is completed.
+	 */
+	*hsm_flagp = 0;
+	if (bstatp->bs_dmevmask && bstatp->bs_xflags & XFS_XFLAG_HASATTR) {
+		memset(&dmattr, 0, sizeof(XFSattrvalue0_t));
+		dmattr.fsys = FSYS_TYPE_XFS;
+		msb_store(dmattr.state, DMF_ST_NOMIGR, sizeof(dmattr.state));
+
+		rv = fsetxattr(fd,
+			       DMF_ATTR_NAME,
+			       (char *)&dmattr,
+			       sizeof(dmattr),
+			       ATTR_ROOT);
+		if (rv == 0)
+			*hsm_flagp = 1;
+	}
+}
+
+
+/******************************************************************************
+* Name
+*	HsmRestoreAttribute
+*
+* Description
+**	HsmRestoreAttribute is called when restoring an extended attribute.
+*	The hsm_flagp param can be used to keep track of limited state
+*	between calls to the HSM restore routines.
+*
+*	Note that this does not require a filesystem or file context like the
+*	HSM calls for xfsdump. This is currently a crude interface to satisfy
+*	a specific need. It can be generalized at a later time, if necessary.
+*
+* Returns
+* 	None.
+******************************************************************************/
+
+extern void
+HsmRestoreAttribute(
+	int		flag,		/* ext attr flags */
+	char		*namep,		/* pointer to new attribute name */
+	int		*hsm_flagp)
+{
+	/* If the DMF attribute is being restored, then we will not
+	 * have to remove the NOMIGR attribute when this file is
+	 * being completed.
+	 */
+	if (flag & ATTR_ROOT && !strcmp(namep, DMF_ATTR_NAME))
+		*hsm_flagp = 0;
+}
+
+
+/******************************************************************************
+* Name
+*	HsmEndRestoreFile
+*
+* Description
+*	HsmEndRestoreFile is called when all data and extended attributes
+*	have been restored. The hsm_flagsp param can be used to keep track
+*	of limited state between calls to the HSM restore routines.
+*
+*	Note that this does not require a filesystem or file context like the
+*	HSM calls for xfsdump. This is currently a crude interface to satisfy
+*	a specific need. It can be generalized at a later time, if necessary.
+*
+* Returns
+* 	None.
+******************************************************************************/
+
+extern void
+HsmEndRestoreFile(
+	char		*path,
+	int		fd,
+	int		*hsm_flagp)
+{
+	/* We put a NOMIGR on the file because we thought it was a
+	 * DMF-managed file. If it was not, then we need to take
+	 * that attribute off now.
+	 */
+	if (*hsm_flagp) {
+		int rv;
+		rv = fremovexattr( fd, DMF_ATTR_NAME , ATTR_ROOT );
+		if (rv) {
+			mlog(MLOG_NORMAL | MLOG_WARNING,
+			     _("error removing temp DMF attr on %s: %s\n"),
+			     path,
+			     strerror(errno));
+		}
+	}
+}
Index: create-3.1.9-xattr-patch/xfsdump-3.1.9-new/common
===================================================================
--- create-3.1.9-xattr-patch/xfsdump-3.1.9-new/common	(nonexistent)
+++ create-3.1.9-xattr-patch/xfsdump-3.1.9-new/common	(revision 5)

Property changes on: create-3.1.9-xattr-patch/xfsdump-3.1.9-new/common
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-3.1.9-xattr-patch/xfsdump-3.1.9-new
===================================================================
--- create-3.1.9-xattr-patch/xfsdump-3.1.9-new	(nonexistent)
+++ create-3.1.9-xattr-patch/xfsdump-3.1.9-new	(revision 5)

Property changes on: create-3.1.9-xattr-patch/xfsdump-3.1.9-new
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-3.1.9-xattr-patch
===================================================================
--- create-3.1.9-xattr-patch	(nonexistent)
+++ create-3.1.9-xattr-patch	(revision 5)

Property changes on: create-3.1.9-xattr-patch
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: patches/README
===================================================================
--- patches/README	(nonexistent)
+++ patches/README	(revision 5)
@@ -0,0 +1,8 @@
+
+/* begin *
+
+   xfsdump-3.1.9-librmt.patch - When the whole system is built the READ, WRITE macros
+                                defined in librmt.h leads build error related to conflict
+                                between localy and system defined READ, WRITE macros.
+
+ * end */
Index: patches
===================================================================
--- patches	(nonexistent)
+++ patches	(revision 5)

Property changes on: patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: .
===================================================================
--- .	(nonexistent)
+++ .	(revision 5)

Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~