From: Stelian Pop Date: Thu, 21 Dec 2000 11:14:52 +0000 (+0000) Subject: LFS compatibility. X-Git-Tag: release_0_4b21~2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=d6967896bc4e18f9b4359a2ef5be5c0f1bcc456a;p=dump.git LFS compatibility. --- diff --git a/CHANGES b/CHANGES index 13a5cbc..775a3f8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.97 2000/12/05 16:57:37 stelian Exp $ +$Id: CHANGES,v 1.98 2000/12/21 11:14:52 stelian Exp $ Changes between versions 0.4b20 and 0.4b21 (released ?????????????????) ======================================================================= @@ -34,6 +34,15 @@ Changes between versions 0.4b20 and 0.4b21 (released ?????????????????) fully testing it... (of course, if this patch will break anything, he is to blame for :-)). +7. Make dump and restore LFS aware. Dump can dump a filesystem + containing large files, generate a large file on output and + restore can restore them. This feature is not enabled by + default, use --enable-largefile option of configure to enable + it (you need to have a LFS aware glibc though). Thanks to + Andrea Arcangeli for submitting the patch, + and to Theodore T'so for his always + useful thoughts. + Changes between versions 0.4b19 and 0.4b20 (released November 10, 2000) ======================================================================= diff --git a/THANKS b/THANKS index 4992ea1..6468211 100644 --- a/THANKS +++ b/THANKS @@ -1,4 +1,4 @@ -$Id: THANKS,v 1.41 2000/12/05 15:43:48 stelian Exp $ +$Id: THANKS,v 1.42 2000/12/21 11:14:52 stelian Exp $ Dump and restore were written by the people of the CSRG at the University of California, Berkeley. @@ -21,6 +21,7 @@ Thanks to people who reported problems with the port, sent patches, and suggested various improvements. Here is a partial list of them (if I have forgotten someone, please complain): John Adams johna@onevista.com +Andrea Arcangeli andrea@suse.de Stephen Atwell satwell@urbana.css.mot.com Stan Bubrouski satan@fastdial.net Stephen Carr sgcarr@civeng.adelaide.edu.au @@ -68,7 +69,7 @@ Matti Taskinen mkt@rni.helsinki.fi Jason L Tibbitts III tibbs@math.uh.edu Mike Tibor tibor@lib.uaa.alaska.edu Erik Troan ewt@redhat.com -Theodore Y. Ts'o tytso@mit.edu +Theodore Y. Ts'o tytso@valinux.com Stephen Tweedie sct@dcs.ed.ac.uk Daniel Veillard Daniel.Veillard@imag.fr Jason Venner jason@idiom.com diff --git a/common/dumprmt.c b/common/dumprmt.c index dcd319d..31eb63f 100644 --- a/common/dumprmt.c +++ b/common/dumprmt.c @@ -41,9 +41,10 @@ #ifndef lint static const char rcsid[] = - "$Id: dumprmt.c,v 1.14 2000/12/04 15:43:16 stelian Exp $"; + "$Id: dumprmt.c,v 1.15 2000/12/21 11:14:53 stelian Exp $"; #endif /* not lint */ +#include #ifdef __linux__ #include #include diff --git a/compat/include/bsdcompat.h b/compat/include/bsdcompat.h index 167ddfa..71ba0e2 100644 --- a/compat/include/bsdcompat.h +++ b/compat/include/bsdcompat.h @@ -5,7 +5,7 @@ * Stelian Pop , 1999-2000 * Stelian Pop - Alcôve , 2000 * - * $Id: bsdcompat.h,v 1.12 2000/12/04 15:43:16 stelian Exp $ + * $Id: bsdcompat.h,v 1.13 2000/12/21 11:14:53 stelian Exp $ */ #include @@ -102,6 +102,7 @@ struct dinode { #define di_rdev di_db[0] /* #define di_ouid di_uid */ /* #define di_ogid di_gid */ +#define di_size_high di_dir_acl /* * This is the ext2_dir_entry structure but the fields have been renamed diff --git a/compat/include/bylabel.h b/compat/include/bylabel.h index 740f4f6..b6e0ee9 100644 --- a/compat/include/bylabel.h +++ b/compat/include/bylabel.h @@ -11,12 +11,14 @@ * - Ported to dump/restore * Stelian Pop - Alcôve , 2000 * - * $Id: bylabel.h,v 1.3 2000/12/04 15:43:16 stelian Exp $ + * $Id: bylabel.h,v 1.4 2000/12/21 11:14:53 stelian Exp $ */ #ifndef _BYLABEL_H_ #define _BYLABEL_H_ +#include + const char * get_device_name(const char * item); const char * get_device_label(const char * spec); diff --git a/compat/include/fstab.h b/compat/include/fstab.h index 4c05266..fa93f04 100644 --- a/compat/include/fstab.h +++ b/compat/include/fstab.h @@ -5,7 +5,7 @@ * Stelian Pop , 1999-2000 * Stelian Pop - Alcôve , 2000 * - * $Id: fstab.h,v 1.9 2000/12/04 15:43:16 stelian Exp $ + * $Id: fstab.h,v 1.10 2000/12/21 11:14:53 stelian Exp $ */ /* @@ -44,6 +44,8 @@ #ifndef _FSTAB_H_ #define _FSTAB_H_ +#include + /* * File system table, see fstab(5). * diff --git a/compat/include/pathnames.h b/compat/include/pathnames.h index 7669ab3..720b71b 100644 --- a/compat/include/pathnames.h +++ b/compat/include/pathnames.h @@ -5,7 +5,7 @@ * Stelian Pop , 1999-2000 * Stelian Pop - Alcôve , 2000 * - * $Id: pathnames.h,v 1.10 2000/12/04 15:43:16 stelian Exp $ + * $Id: pathnames.h,v 1.11 2000/12/21 11:14:53 stelian Exp $ */ /* @@ -41,6 +41,7 @@ * SUCH DAMAGE. */ +#include #include #ifdef __linux__ diff --git a/compat/include/protocols/dumprestore.h b/compat/include/protocols/dumprestore.h index 785b330..a291908 100644 --- a/compat/include/protocols/dumprestore.h +++ b/compat/include/protocols/dumprestore.h @@ -5,7 +5,7 @@ * Stelian Pop , 1999-2000 * Stelian Pop - Alcôve , 2000 * - * $Id: dumprestore.h,v 1.8 2000/12/04 15:43:16 stelian Exp $ + * $Id: dumprestore.h,v 1.9 2000/12/21 11:14:53 stelian Exp $ */ /* @@ -49,6 +49,8 @@ #ifndef _PROTOCOLS_DUMPRESTORE_H_ #define _PROTOCOLS_DUMPRESTORE_H_ +#include + /* * TP_BSIZE is the size of file blocks on the dump tapes. * Note that TP_BSIZE must be a multiple of DEV_BSIZE. diff --git a/compat/lib/bylabel.c b/compat/lib/bylabel.c index 978a39d..31bdd0d 100644 --- a/compat/lib/bylabel.c +++ b/compat/lib/bylabel.c @@ -11,6 +11,7 @@ * - Ported to dump/restore */ +#include #include #include #include diff --git a/compat/lib/compaterr.c b/compat/lib/compaterr.c index 7dd06f6..f857210 100644 --- a/compat/lib/compaterr.c +++ b/compat/lib/compaterr.c @@ -41,19 +41,17 @@ #ifndef lint static const char rcsid[] = - "$Id: compaterr.c,v 1.7 2000/12/04 15:43:16 stelian Exp $"; + "$Id: compaterr.c,v 1.8 2000/12/21 11:14:53 stelian Exp $"; #endif /* not lint */ +#include #include #include #include #include #include - #include -#include - extern char *__progname; /* Program name, from crt0. */ #if !defined(HAVE_ERR) || !defined(HAVE_ERRX) || !defined(HAVE_VERR) || !defined(HAVE_VERRX) || !defined(HAVE_VWARN) || !defined(HAVE_VWARNX) || !defined(HAVE_WARN) || !defined(HAVE_WARNX) diff --git a/compat/lib/fstab.c b/compat/lib/fstab.c index 2c97fd0..aa23462 100644 --- a/compat/lib/fstab.c +++ b/compat/lib/fstab.c @@ -41,9 +41,10 @@ #ifndef lint static const char rcsid[] = - "$Id: fstab.c,v 1.9 2000/12/04 15:43:16 stelian Exp $"; + "$Id: fstab.c,v 1.10 2000/12/21 11:14:53 stelian Exp $"; #endif /* not lint */ +#include #include #include #include diff --git a/config.h.in b/config.h.in index 1f51bea..c7f3afb 100644 --- a/config.h.in +++ b/config.h.in @@ -47,3 +47,6 @@ /* Define this is you want old style F script (no arguments) */ #undef OLD_STYLE_FSCRIPT + +/* Define this to 64 if you want Large File System support */ +#undef _FILE_OFFSET_BITS diff --git a/configure b/configure index 44fa7a1..961da28 100755 --- a/configure +++ b/configure @@ -23,6 +23,8 @@ ac_help="$ac_help --enable-readline enable readline support in restore" ac_help="$ac_help --enable-oldstylefscript enable old style F script (no arguments)" +ac_help="$ac_help + --enable-largefile enable Large File System support (your glibc needs to support it)" ac_help="$ac_help --with-cc=COMPILER select compiler to use" ac_help="$ac_help @@ -562,7 +564,7 @@ MCONFIG=./MCONFIG echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:566: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:568: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -589,7 +591,7 @@ else fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:593: checking whether ln -s works" >&5 +echo "configure:595: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -612,7 +614,7 @@ fi # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:616: checking for $ac_word" >&5 +echo "configure:618: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -648,7 +650,7 @@ fi # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:652: checking for $ac_word" >&5 +echo "configure:654: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -684,7 +686,7 @@ fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:688: checking for $ac_word" >&5 +echo "configure:690: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -743,7 +745,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:747: checking host system type" >&5 +echo "configure:749: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -764,7 +766,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:768: checking build system type" >&5 +echo "configure:770: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -790,7 +792,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:794: checking for $ac_word" >&5 +echo "configure:796: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -822,7 +824,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:826: checking for $ac_word" >&5 +echo "configure:828: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -857,7 +859,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:861: checking for $ac_word" >&5 +echo "configure:863: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -889,7 +891,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:893: checking for $ac_word" >&5 +echo "configure:895: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -924,7 +926,7 @@ fi # Extract the first word of "${ac_tool_prefix}patch", so it can be a program name with args. set dummy ${ac_tool_prefix}patch; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:928: checking for $ac_word" >&5 +echo "configure:930: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_PATCH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -956,7 +958,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "patch", so it can be a program name with args. set dummy patch; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:960: checking for $ac_word" >&5 +echo "configure:962: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_PATCH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -991,7 +993,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:995: checking for $ac_word" >&5 +echo "configure:997: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1021,7 +1023,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1025: checking for $ac_word" >&5 +echo "configure:1027: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1072,7 +1074,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1076: checking for $ac_word" >&5 +echo "configure:1078: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1104,7 +1106,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1108: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1110: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1115,12 +1117,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1119 "configure" +#line 1121 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1146,12 +1148,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1150: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1152: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1155: checking whether we are using GNU C" >&5 +echo "configure:1157: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1160,7 +1162,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1179,7 +1181,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1183: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1185: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1222,7 +1224,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1226: checking for a BSD compatible install" >&5 +echo "configure:1228: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1390,6 +1392,23 @@ else fi +# Check whether --enable-largefile or --disable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval="$enable_largefile" + if test "$enableval" = "yes" +then + cat >> confdefs.h <<\EOF +#define _FILE_OFFSET_BITS 64 +EOF + +fi + +else + echo "Not enabling Large File System support" + +fi + + # Check whether --with-cc or --without-cc was given. if test "${with_cc+set}" = set; then withval="$with_cc" @@ -1520,7 +1539,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1524: checking how to run the C preprocessor" >&5 +echo "configure:1543: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1535,13 +1554,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1552,13 +1571,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1569,13 +1588,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1601,17 +1620,17 @@ echo "$ac_t""$CPP" 1>&6 ac_safe=`echo "ext2fs/ext2fs.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ext2fs/ext2fs.h""... $ac_c" 1>&6 -echo "configure:1605: checking for ext2fs/ext2fs.h" >&5 +echo "configure:1624: checking for ext2fs/ext2fs.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1634,7 +1653,7 @@ ext2fs_h=no fi echo $ac_n "checking for ext2fs_open in -lext2fs""... $ac_c" 1>&6 -echo "configure:1638: checking for ext2fs_open in -lext2fs" >&5 +echo "configure:1657: checking for ext2fs_open in -lext2fs" >&5 ac_lib_var=`echo ext2fs'_'ext2fs_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1642,7 +1661,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lext2fs -lcom_err $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1679,7 +1698,7 @@ if test "$ext2fs_h" = no -o "$ext2fs_lib" = no; then fi echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:1683: checking for tgetent in -ltermcap" >&5 +echo "configure:1702: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1687,7 +1706,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1727,17 +1746,17 @@ fi ac_safe=`echo "readline/readline.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for readline/readline.h""... $ac_c" 1>&6 -echo "configure:1731: checking for readline/readline.h" >&5 +echo "configure:1750: checking for readline/readline.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1760,7 +1779,7 @@ readline_h=no fi echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 -echo "configure:1764: checking for readline in -lreadline" >&5 +echo "configure:1783: checking for readline in -lreadline" >&5 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1768,7 +1787,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline "-ltermcap" $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1809,12 +1828,12 @@ fi for ac_func in err errx verr verrx vwarn vwarnx warn warnx realpath lchown do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1813: checking for $ac_func" >&5 +echo "configure:1832: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1862,12 +1881,12 @@ fi done echo $ac_n "checking for glob""... $ac_c" 1>&6 -echo "configure:1866: checking for glob" >&5 +echo "configure:1885: checking for glob" >&5 if eval "test \"`echo '$''{'ac_cv_func_glob'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_glob=yes" else @@ -1912,7 +1931,7 @@ fi if test "$ac_cv_func_glob" = "yes"; then cat > conftest.$ac_ext < @@ -1940,12 +1959,12 @@ rm -f conftest* fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1944: checking for ANSI C header files" >&5 +echo "configure:1963: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1953,7 +1972,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1970,7 +1989,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1988,7 +2007,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2009,7 +2028,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2020,7 +2039,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2044,12 +2063,12 @@ EOF fi echo $ac_n "checking for quad_t""... $ac_c" 1>&6 -echo "configure:2048: checking for quad_t" >&5 +echo "configure:2067: checking for quad_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_quad_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2077,12 +2096,12 @@ EOF fi echo $ac_n "checking for u_quad_t""... $ac_c" 1>&6 -echo "configure:2081: checking for u_quad_t" >&5 +echo "configure:2100: checking for u_quad_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_u_quad_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS diff --git a/configure.in b/configure.in index dcb6bfb..7906e16 100644 --- a/configure.in +++ b/configure.in @@ -122,6 +122,19 @@ fi echo "Using new style F script" ) +dnl +dnl Handle --enable-largefile +dnl +AC_ARG_ENABLE([largefile], +[ --enable-largefile enable Large File System support (your glibc needs to support it)], +if test "$enableval" = "yes" +then + AC_DEFINE(_FILE_OFFSET_BITS,64) +fi +, +echo "Not enabling Large File System support" +) + dnl dnl set $(CC) from --with-cc=value dnl diff --git a/dump/dump.h b/dump/dump.h index c83293b..e215223 100644 --- a/dump/dump.h +++ b/dump/dump.h @@ -5,7 +5,7 @@ * Stelian Pop , 1999-2000 * Stelian Pop - Alcôve , 2000 * - * $Id: dump.h,v 1.18 2000/12/05 16:57:38 stelian Exp $ + * $Id: dump.h,v 1.19 2000/12/21 11:14:53 stelian Exp $ */ /*- @@ -41,6 +41,8 @@ * SUCH DAMAGE. */ +#include + #define MAXINOPB (MAXBSIZE / sizeof(struct dinode)) #define MAXNINDIR (MAXBSIZE / sizeof(daddr_t)) diff --git a/dump/itime.c b/dump/itime.c index 3fed4dc..20aa69a 100644 --- a/dump/itime.c +++ b/dump/itime.c @@ -41,9 +41,10 @@ #ifndef lint static const char rcsid[] = - "$Id: itime.c,v 1.13 2000/12/04 15:43:16 stelian Exp $"; + "$Id: itime.c,v 1.14 2000/12/21 11:14:54 stelian Exp $"; #endif /* not lint */ +#include #include #include #ifdef __linux__ diff --git a/dump/main.c b/dump/main.c index cb75aa5..7745e46 100644 --- a/dump/main.c +++ b/dump/main.c @@ -41,9 +41,10 @@ #ifndef lint static const char rcsid[] = - "$Id: main.c,v 1.31 2000/12/04 15:43:16 stelian Exp $"; + "$Id: main.c,v 1.32 2000/12/21 11:14:54 stelian Exp $"; #endif /* not lint */ +#include #include #include #ifdef __linux__ diff --git a/dump/optr.c b/dump/optr.c index 0ac0ace..b186437 100644 --- a/dump/optr.c +++ b/dump/optr.c @@ -41,9 +41,10 @@ #ifndef lint static const char rcsid[] = - "$Id: optr.c,v 1.17 2000/12/05 16:31:36 stelian Exp $"; + "$Id: optr.c,v 1.18 2000/12/21 11:14:54 stelian Exp $"; #endif /* not lint */ +#include #include #include #include diff --git a/dump/tape.c b/dump/tape.c index c3628cc..16328bd 100644 --- a/dump/tape.c +++ b/dump/tape.c @@ -41,9 +41,10 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.26 2000/12/05 16:31:36 stelian Exp $"; + "$Id: tape.c,v 1.27 2000/12/21 11:14:54 stelian Exp $"; #endif /* not lint */ +#include #ifdef __linux__ #include #include diff --git a/dump/traverse.c b/dump/traverse.c index 69cf6a2..5833da7 100644 --- a/dump/traverse.c +++ b/dump/traverse.c @@ -41,9 +41,10 @@ #ifndef lint static const char rcsid[] = - "$Id: traverse.c,v 1.24 2000/12/05 16:57:38 stelian Exp $"; + "$Id: traverse.c,v 1.25 2000/12/21 11:14:54 stelian Exp $"; #endif /* not lint */ +#include #include #include #ifdef __linux__ @@ -149,6 +150,7 @@ long blockest(struct dinode const *dp) { long blkest, sizeest; + u_quad_t i_size; /* * dp->di_size is the size of the file in bytes. @@ -164,19 +166,20 @@ blockest(struct dinode const *dp) * dump blocks (sizeest vs. blkest in the indirect block * calculation). */ - blkest = howmany(dbtob(dp->di_blocks), TP_BSIZE); - sizeest = howmany(dp->di_size, TP_BSIZE); + blkest = howmany((u_quad_t)dp->di_blocks*fs->blocksize, TP_BSIZE); + i_size = dp->di_size + ((u_quad_t) dp->di_size_high << 32); + sizeest = howmany(i_size, TP_BSIZE); if (blkest > sizeest) blkest = sizeest; #ifdef __linux__ - if (dp->di_size > fs->blocksize * NDADDR) { + if (i_size > fs->blocksize * NDADDR) { /* calculate the number of indirect blocks on the dump tape */ blkest += howmany(sizeest - NDADDR * fs->blocksize / TP_BSIZE, NINDIR(sblock) * EXT2_FRAGS_PER_BLOCK(fs->super)); } #else - if (dp->di_size > sblock->fs_bsize * NDADDR) { + if (i_size > sblock->fs_bsize * NDADDR) { /* calculate the number of indirect blocks on the dump tape */ blkest += howmany(sizeest - NDADDR * sblock->fs_bsize / TP_BSIZE, @@ -682,7 +685,8 @@ struct block_context { * Dump a block to the tape */ static int -dumponeblock(ext2_filsys fs, blk_t *blocknr, int blockcnt, void *private) +dumponeblock(ext2_filsys fs, blk_t *blocknr, e2_blkcnt_t blockcnt, + blk_t ref_block, int ref_offset, void * private) { struct block_context *p; int i; @@ -715,7 +719,7 @@ dumponeblock(ext2_filsys fs, blk_t *blocknr, int blockcnt, void *private) void dumpino(struct dinode *dp, ino_t ino) { - int cnt; + unsigned long cnt; fsizeT size; char buf[TP_BSIZE]; struct old_bsd_inode obi; @@ -724,6 +728,7 @@ dumpino(struct dinode *dp, ino_t ino) #else int ind_level; #endif + u_quad_t i_size = dp->di_size + ((u_quad_t) dp->di_size_high << 32); if (newtape) { newtape = 0; @@ -735,7 +740,7 @@ dumpino(struct dinode *dp, ino_t ino) obi.di_mode = dp->di_mode; obi.di_uid = dp->di_uid; obi.di_gid = dp->di_gid; - obi.di_qsize.v = (u_quad_t)dp->di_size; + obi.di_qsize.v = i_size; obi.di_atime = dp->di_atime; obi.di_mtime = dp->di_mtime; obi.di_ctime = dp->di_ctime; @@ -744,7 +749,7 @@ dumpino(struct dinode *dp, ino_t ino) obi.di_flags = dp->di_flags; obi.di_gen = dp->di_gen; memmove(&obi.di_db, &dp->di_db, (NDADDR + NIADDR) * sizeof(daddr_t)); - if (dp->di_file_acl || dp->di_dir_acl) + if (dp->di_file_acl) warn("ACLs in inode #%ld won't be dumped", (long)ino); memmove(&spcl.c_dinode, &obi, sizeof(obi)); #else /* __linux__ */ @@ -771,8 +776,8 @@ dumpino(struct dinode *dp, ino_t ino) * Check for short symbolic link. */ #ifdef __linux__ - if (dp->di_size > 0 && - dp->di_size < EXT2_N_BLOCKS * sizeof (daddr_t)) { + if (i_size > 0 && + i_size < EXT2_N_BLOCKS * sizeof (daddr_t)) { spcl.c_addr[0] = 1; spcl.c_count = 1; writeheader(ino); @@ -800,7 +805,7 @@ dumpino(struct dinode *dp, ino_t ino) case S_IFDIR: #endif case S_IFREG: - if (dp->di_size > 0) + if (i_size) break; /* fall through */ @@ -815,16 +820,16 @@ dumpino(struct dinode *dp, ino_t ino) msg("Warning: undefined file type 0%o\n", dp->di_mode & IFMT); return; } - if (dp->di_size > NDADDR * sblock->fs_bsize) + if (i_size > NDADDR * sblock->fs_bsize) #ifdef __linux__ cnt = NDADDR * EXT2_FRAGS_PER_BLOCK(fs->super); #else cnt = NDADDR * sblock->fs_frag; #endif else - cnt = howmany(dp->di_size, sblock->fs_fsize); + cnt = howmany(i_size, sblock->fs_fsize); blksout(&dp->di_db[0], cnt, ino); - if ((size = dp->di_size - NDADDR * sblock->fs_bsize) <= 0) + if ((quad_t) (size = i_size - NDADDR * sblock->fs_bsize) <= 0) return; #ifdef __linux__ bc.max = NINDIR(sblock) * EXT2_FRAGS_PER_BLOCK(fs->super); @@ -833,7 +838,7 @@ dumpino(struct dinode *dp, ino_t ino) bc.ino = ino; bc.next_block = NDADDR; - ext2fs_block_iterate (fs, ino, 0, NULL, dumponeblock, (void *)&bc); + ext2fs_block_iterate2(fs, ino, 0, NULL, dumponeblock, (void *)&bc); if (bc.cnt > 0) { blksout (bc.buf, bc.cnt, bc.ino); } @@ -953,7 +958,7 @@ dumpdirino(struct dinode *dp, ino_t ino) obi.di_flags = dp->di_flags; obi.di_gen = dp->di_gen; memmove(&obi.di_db, &dp->di_db, (NDADDR + NIADDR) * sizeof(daddr_t)); - if (dp->di_file_acl || dp->di_dir_acl) + if (dp->di_file_acl) warn("ACLs in inode #%ld won't be dumped", (long)ino); memmove(&spcl.c_dinode, &obi, sizeof(obi)); #else /* __linux__ */ diff --git a/dump/unctime.c b/dump/unctime.c index d05053f..27efcf5 100644 --- a/dump/unctime.c +++ b/dump/unctime.c @@ -41,9 +41,10 @@ #ifndef lint static const char rcsid[] = - "$Id: unctime.c,v 1.9 2000/12/04 15:43:16 stelian Exp $"; + "$Id: unctime.c,v 1.10 2000/12/21 11:14:54 stelian Exp $"; #endif /* not lint */ +#include #include #ifdef __STDC__ #include diff --git a/restore/dirs.c b/restore/dirs.c index 3d91c3c..eb90558 100644 --- a/restore/dirs.c +++ b/restore/dirs.c @@ -46,9 +46,10 @@ #ifndef lint static const char rcsid[] = - "$Id: dirs.c,v 1.12 2000/12/05 15:43:49 stelian Exp $"; + "$Id: dirs.c,v 1.13 2000/12/21 11:14:54 stelian Exp $"; #endif /* not lint */ +#include #include #include #include diff --git a/restore/extern.h b/restore/extern.h index ed19a4b..3bf83f1 100644 --- a/restore/extern.h +++ b/restore/extern.h @@ -5,7 +5,7 @@ * Stelian Pop , 1999-2000 * Stelian Pop - Alcôve , 2000 * - * $Id: extern.h,v 1.10 2000/12/04 15:43:17 stelian Exp $ + * $Id: extern.h,v 1.11 2000/12/21 11:14:54 stelian Exp $ */ /*- @@ -41,6 +41,8 @@ * SUCH DAMAGE. */ +#include + struct entry *addentry __P((char *, ino_t, int)); long addfile __P((char *, ino_t, int)); int addwhiteout __P((char *)); diff --git a/restore/interactive.c b/restore/interactive.c index f2f3ae8..40c0ba5 100644 --- a/restore/interactive.c +++ b/restore/interactive.c @@ -41,9 +41,10 @@ #ifndef lint static const char rcsid[] = - "$Id: interactive.c,v 1.14 2000/12/04 15:43:17 stelian Exp $"; + "$Id: interactive.c,v 1.15 2000/12/21 11:14:54 stelian Exp $"; #endif /* not lint */ +#include #include #include diff --git a/restore/main.c b/restore/main.c index f0f4d7c..b2d8c05 100644 --- a/restore/main.c +++ b/restore/main.c @@ -41,9 +41,10 @@ #ifndef lint static const char rcsid[] = - "$Id: main.c,v 1.14 2000/12/04 15:43:17 stelian Exp $"; + "$Id: main.c,v 1.15 2000/12/21 11:14:54 stelian Exp $"; #endif /* not lint */ +#include #include #include #include diff --git a/restore/restore.c b/restore/restore.c index 3d38150..7197a3d 100644 --- a/restore/restore.c +++ b/restore/restore.c @@ -41,9 +41,10 @@ #ifndef lint static const char rcsid[] = - "$Id: restore.c,v 1.12 2000/12/04 15:43:17 stelian Exp $"; + "$Id: restore.c,v 1.13 2000/12/21 11:14:54 stelian Exp $"; #endif /* not lint */ +#include #include #ifdef __linux__ diff --git a/restore/restore.h b/restore/restore.h index 883fcb2..11d38ec 100644 --- a/restore/restore.h +++ b/restore/restore.h @@ -5,7 +5,7 @@ * Stelian Pop , 1999-2000 * Stelian Pop - Alcôve , 2000 * - * $Id: restore.h,v 1.11 2000/12/04 15:43:17 stelian Exp $ + * $Id: restore.h,v 1.12 2000/12/21 11:14:54 stelian Exp $ */ /* @@ -46,6 +46,7 @@ * SUCH DAMAGE. */ +#include #include /* * Flags diff --git a/restore/symtab.c b/restore/symtab.c index 4e1f5b4..a72b1cb 100644 --- a/restore/symtab.c +++ b/restore/symtab.c @@ -41,7 +41,7 @@ #ifndef lint static const char rcsid[] = - "$Id: symtab.c,v 1.11 2000/12/04 15:43:17 stelian Exp $"; + "$Id: symtab.c,v 1.12 2000/12/21 11:14:54 stelian Exp $"; #endif /* not lint */ /* @@ -53,6 +53,7 @@ static const char rcsid[] = * are needed, by calling "myname". */ +#include #include #include diff --git a/restore/tape.c b/restore/tape.c index 8665e55..4e17130 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -46,9 +46,10 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.21 2000/12/04 15:43:17 stelian Exp $"; + "$Id: tape.c,v 1.22 2000/12/21 11:14:54 stelian Exp $"; #endif /* not lint */ +#include #include #include #include diff --git a/restore/utilities.c b/restore/utilities.c index 04be010..c616872 100644 --- a/restore/utilities.c +++ b/restore/utilities.c @@ -41,9 +41,10 @@ #ifndef lint static const char rcsid[] = - "$Id: utilities.c,v 1.10 2000/12/04 15:43:17 stelian Exp $"; + "$Id: utilities.c,v 1.11 2000/12/21 11:14:54 stelian Exp $"; #endif /* not lint */ +#include #include #include diff --git a/rmt/rmt.c b/rmt/rmt.c index efe8ea8..d1f801f 100644 --- a/rmt/rmt.c +++ b/rmt/rmt.c @@ -41,12 +41,13 @@ #ifndef lint static const char rcsid[] = - "$Id: rmt.c,v 1.11 2000/12/04 15:43:17 stelian Exp $"; + "$Id: rmt.c,v 1.12 2000/12/21 11:14:54 stelian Exp $"; #endif /* not linux */ /* * rmt */ +#include #include #include #include