aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorBill Kendall <wkendall@sgi.com>2005-11-10 22:05:47 +0000
committerBill Kendall <wkendall@sgi.com>2005-11-10 22:05:47 +0000
commit7186a90e5fcaba9bb340f7a9b642eb1d725f66cd (patch)
tree88a11679e845543efa0f55efc6b93294f36e4a54 /common
parentfb5dbe27bdbcd2e646c2bd19ed66cd38d828aa10 (diff)
downloadxfsdump-dev-7186a90e5fcaba9bb340f7a9b642eb1d725f66cd.tar.gz
Change xfsdump and xfsrestore to unconditionally compile support for
extended attributes and DMAPI event flags. Noticed some code which would revert to an old media format if the user requested that extended attributes not be dumped. The intention being to make the dumps compatible with old xfsrestores (really old now). But using the old media format means that holes will not be efficiently encoded in the dump. So I'm removing this code so that we always dump in the current media format.
Diffstat (limited to 'common')
-rw-r--r--common/arch_xlate.c2
-rw-r--r--common/arch_xlate.h2
-rw-r--r--common/content_inode.h8
-rw-r--r--common/global.c12
-rw-r--r--common/main.c8
5 files changed, 0 insertions, 32 deletions
diff --git a/common/arch_xlate.c b/common/arch_xlate.c
index 8642a489..a4711b5c 100644
--- a/common/arch_xlate.c
+++ b/common/arch_xlate.c
@@ -472,7 +472,6 @@ xlate_direnthdr(direnthdr_t *dh1, direnthdr_t *dh2, int dir)
ptr2->dh_name );
}
-#ifdef EXTATTR
/*
* xlate_extattrhdr - endian convert struct extattrhdr
*/
@@ -487,7 +486,6 @@ xlate_extattrhdr(extattrhdr_t *eh1, extattrhdr_t *eh2, int dir)
IXLATE(eh1, eh2, ah_valsz);
IXLATE(eh1, eh2, ah_checksum);
}
-#endif /* EXTATTR */
/*
* xlate_rec_hdr - endian convert struct rec_hdr
diff --git a/common/arch_xlate.h b/common/arch_xlate.h
index ebc7f075..53504275 100644
--- a/common/arch_xlate.h
+++ b/common/arch_xlate.h
@@ -97,12 +97,10 @@ void xlate_extenthdr(extenthdr_t *eh1, extenthdr_t *eh2, int dir);
*/
void xlate_direnthdr(direnthdr_t *dh1, direnthdr_t *dh2, int dir);
-#ifdef EXTATTR
/*
* xlate_extattrhdr - endian convert struct extattrhdr
*/
void xlate_extattrhdr(extattrhdr_t *eh1, extattrhdr_t *eh2, int dir);
-#endif /* EXTATTR */
/*
* xlate_rec_hdr - endian convert struct rec_hdr
diff --git a/common/content_inode.h b/common/content_inode.h
index 7c46c485..60ffc349 100644
--- a/common/content_inode.h
+++ b/common/content_inode.h
@@ -128,10 +128,8 @@ typedef struct content_inode_hdr content_inode_hdr_t;
#define CIH_DUMPATTR_EXTENTHDR_CHECKSUM ( 1 << 9 )
#define CIH_DUMPATTR_DIRENTHDR_CHECKSUM ( 1 << 10 )
#define CIH_DUMPATTR_DIRENTHDR_GEN ( 1 << 11 )
-#ifdef EXTATTR
#define CIH_DUMPATTR_EXTATTR ( 1 << 12 )
#define CIH_DUMPATTR_EXTATTRHDR_CHECKSUM ( 1 << 13 )
-#endif /* EXTATTR */
/* timestruct_t - time structure
@@ -216,12 +214,10 @@ typedef struct filehdr filehdr_t;
/* the last media file in the stream is always terminated by
* a dummy file header, with this flag set.
*/
-#ifdef EXTATTR
#define FILEHDR_FLAGS_EXTATTR ( 1 << 3 )
/* special file header followed by one file's (dir or nondir)
* extended attributes.
*/
-#endif /* EXTATTR */
/* extenthdr_t - a header placed at the beginning of every dumped
@@ -307,8 +303,6 @@ typedef u_int16_t gen_t;
*/
#define SYMLINK_ALIGN 8
-#ifdef EXTATTR
-
/* extattr_hdr_t - hdr for an extended attribute. the first byte of the
* attribute name immediately follows the header. the name is terminated
* with a NULL byte. Each extattr record will be aligned; there may
@@ -343,6 +337,4 @@ typedef struct extattrhdr extattrhdr_t;
/* a "secure" mode attribute
*/
-#endif /* EXTATTR */
-
#endif /* CONTENT_INODE_H */
diff --git a/common/global.c b/common/global.c
index 471bbcf0..a353c0a8 100644
--- a/common/global.c
+++ b/common/global.c
@@ -165,18 +165,6 @@ global_hdr_alloc( intgen_t argc, char *argv[ ] )
}
break;
#endif /* RESTORE */
-#ifdef DUMP
-#ifdef EXTATTR
- case GETOPT_NOEXTATTR:
- /* if this is the version which dumps extended
- * file attributes and the option to not do so
- * has been specified, then we can regress the
- * header version number.
- */
- ghdrp->gh_version = GLOBAL_HDR_VERSION_0;
- break;
-#endif /* EXTATTR */
-#endif /* DUMP */
}
}
diff --git a/common/main.c b/common/main.c
index 7947d711..7170c633 100644
--- a/common/main.c
+++ b/common/main.c
@@ -972,9 +972,7 @@ usage( void )
fprintf( stderr, linebuf );
#ifdef DUMP
-#ifdef DMEXTATTR
ULO(_("(dump DMF dualstate files as offline)"), GETOPT_DUMPASOFFLINE );
-#endif /* DMEXTATTR */
ULO(_("<blocksize>"), GETOPT_BLOCKSIZE );
ULO(_("<media change alert program> "), GETOPT_ALERTPROG );
ULO(_("<dump media file size> "), GETOPT_FILESZ );
@@ -989,9 +987,7 @@ usage( void )
ULO(_("<subtree> ..."), GETOPT_SUBTREE );
ULO(_("<verbosity {silent, verbose, trace}>"), GETOPT_VERBOSITY );
ULO(_("<maximum file size>"), GETOPT_MAXDUMPFILESIZE );
-#ifdef EXTATTR
ULO(_("(don't dump extended file attributes)"), GETOPT_NOEXTATTR );
-#endif /* EXTATTR */
#ifdef BASED
ULO(_("<base dump session id>"), GETOPT_BASED );
#endif /* BASED */
@@ -1050,13 +1046,9 @@ usage( void )
ULO(_("(contents only)"), GETOPT_TOC );
ULO(_("<verbosity {silent, verbose, trace}>"), GETOPT_VERBOSITY );
ULO(_("(use small tree window)"), GETOPT_SMALLWINDOW );
-#ifdef EXTATTR
ULO(_("(don't restore extended file attributes)"),GETOPT_NOEXTATTR );
-#endif /* EXTATTR */
ULO(_("(restore root dir owner/permissions)"), GETOPT_ROOTPERM );
-#ifdef DMEXTATTR
ULO(_("(restore DMAPI event settings)"), GETOPT_SETDM );
-#endif /* DMEXTATTR */
#ifdef REVEAL
ULO(_("(check tape record checksums)"), GETOPT_RECCHKSUM );
#endif /* REVEAL */