Many files:

Checkin of e2fsprogs 1.02.
bitmap-optimize
Theodore Ts'o 1997-04-26 14:37:06 +00:00
parent 900e442732
commit 74becf3c0a
109 changed files with 659 additions and 263 deletions

View File

@ -1,3 +1,7 @@
Wed Jan 31 11:06:08 1996 <tytso@rsts-11.mit.edu>
* Release of E2fsprogs version 1.02
Thu Oct 26 11:59:44 1995 <tytso@rsts-11.mit.edu>
* configure.in (LDFALG_STATIC): Add temporary kludge for

View File

@ -25,9 +25,11 @@ INSTALL_DATA = @INSTALL_DATA@
CC = @CC@
DEFS = @DEFS@
LIBS = @LIBS@
CFLAGS = $(CPPFLAGS) $(DEFS) $(WFLAGS) @CFLAGS@ $(XTRA_CFLAGS) \
CFLAGS = @CFLAGS@
ALL_CFLAGS = $(CPPFLAGS) $(DEFS) $(WFLAGS) $(CFLAGS) $(XTRA_CFLAGS) \
-I$(top_builddir)/lib -I$(top_srcdir)/lib $(LINUX_INCLUDE)
LDFLAGS = @LDFLAGS@
ALL_LDFLAGS = $(LDFLAGS)
RM = @RM@
LN = @LN@
MV = @MV@
@ -93,7 +95,7 @@ all::
.depend: Makefile $(SRCS) $(top_srcdir)/depfix.sed
if test -n "$(SRCS)" ; then \
$(CC) -M $(CFLAGS) $(SRCS) | \
$(CC) -M $(ALL_CFLAGS) $(SRCS) | \
sed -f $(top_srcdir)/depfix.sed | \
sed -e 's; $(srcdir)/; $$(srcdir)/;g' | \
sed -e 's; $(top_srcdir)/; $$(top_srcdir)/;g' | \

View File

@ -60,6 +60,16 @@ realclean-local: distclean-local
check:
(cd tests; make check)
distribution_tar_file:
rm -rf /tmp/dest
make DESTDIR=/tmp/dest install
cd ..
cp -r $(srcdir)/README $(srcdir)/install-utils /tmp/dest
cp $(srcdir)/INSTALL.@BINARY_TYPE@ /tmp/dest/INSTALL
(cd /tmp/dest; tar cf - . ) | gzip -9 \
> e2fsprogs-@E2FSPROGS_VERSION@-@BINARY_TYPE@.tar.gz
Makefile: config.status $(srcdir)/Makefile.in
CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status

2
README
View File

@ -1,4 +1,4 @@
This is the new version (1.01) of the second extended file system
This is the new version (1.02) of the second extended file system
management programs.
See the file INSTALL for installation instructions. This is

25
RELEASE-NOTES Normal file
View File

@ -0,0 +1,25 @@
E2fsprogs 1.02 (January 16, 1996)
=================================
Fix to allow e2fsprogs to be compiled on recent 1.3 (pl45+) kernels.
Change e2fsck to print statistics of how many non-contiguous files are
on the system. Note that a file which is larger than 8k blocks, it is
guaranteed to be non-contiguous.
In mke2fs, print a warning message if a user tries to format a whole
disk (/dev/hda versus /dev/hda1). If a user really wants to format a
whole disk, the -F (force) option forces mke2fs to format a whole disk
as a filesytem.
Fix a bug in fsck where in some cases it might start checking
partitions in the next pass before it finishes checking partitions in
the current pass. This still won't cause two partitions on the same
disk will be checked, so it's rarely a problem in real life.
Patch lsattr so that it won't hang when checking a named pipe.
Minor compilation fixes:
* Fix the order of libraries that were linked in debugfs.
* Allow the sources to be compiled with -ansi turned on.

142
configure vendored
View File

@ -11,6 +11,14 @@
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
--with-cc=COMPILER select compiler to use"
ac_help="$ac_help
--with-linker=LINKER select linker to use"
ac_help="$ac_help
--with-ccopts=CCOPTS select compiler command line options"
ac_help="$ac_help
--with-ldopts=LDOPTS select linker command line options"
ac_help="$ac_help
--enable-dll-shlibs select DLL libraries"
ac_help="$ac_help
@ -412,6 +420,83 @@ fi
MCONFIG=./MCONFIG
BINARY_TYPE=bin
E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h \
| awk '{print $3}' | tr \" " " | awk '{print $1}'`
DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \
| tr \" " "`
MONTH=`echo $DATE | awk -F- '{print $2}'`
YEAR=`echo $DATE | awk -F- '{print $3}'`
if expr $YEAR ">" 90 >/dev/null ; then
E2FSPROGS_YEAR=19$YEAR
else
E2FSPROGS_YEAR=20$YEAR
fi
case $MONTH in
Jan) E2FSPROGS_MONTH="January" ;;
Feb) E2FSPROGS_MONTH="February" ;;
Mar) E2FSPROGS_MONTH="March" ;;
Apr) E2FSPROGS_MONTH="April" ;;
May) E2FSPROGS_MONTH="May" ;;
Jun) E2FSPROGS_MONTH="June" ;;
Jul) E2FSPROGS_MONTH="July" ;;
Aug) E2FSPROGS_MONTH="August" ;;
Sep) E2FSPROGS_MONTH="September" ;;
Oct) E2FSPROGS_MONTH="October" ;;
Nov) E2FSPROGS_MONTH="November" ;;
Dec) E2FSPROGS_MONTH="December" ;;
*) echo "Unknown month $MONTH??" ;;
esac
unset DATE MONTH YEAR
echo "Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION"
echo "Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}"
# Check whether --with-cc or --without-cc was given.
withval="$with_cc"
if test -n "$withval"; then
echo "$ac_t""CC=$withval" 1>&6
CC=$withval
else
if test -z "$CC" ; then CC=cc; fi
echo "$ac_t""CC defaults to $CC" 1>&6
fi
export CC
# Check whether --with-linker or --without-linker was given.
withval="$with_linker"
if test -n "$withval"; then
echo "$ac_t""LD=$withval" 1>&6
LD=$withval
else
if test -z "$LD" ; then LD=$CC; fi
echo "$ac_t""LD defaults to $LD" 1>&6
fi
export LD
# Check whether --with-ccopts or --without-ccopts was given.
withval="$with_ccopts"
if test -n "$withval"; then
echo "$ac_t""CCOPTS is $withval" 1>&6
CCOPTS=$withval
CFLAGS="$CFLAGS $withval"
else
CCOPTS=
fi
# Check whether --with-ldopts or --without-ldopts was given.
withval="$with_ldopts"
if test -n "$withval"; then
echo "$ac_t""LDFLAGS is $withval" 1>&6
LDFLAGS=$withval
else
LDFLAGS=
fi
# Check whether --enable-dll-shlibs or --disable-dll-shlibs was given.
enableval="$enable_dll_shlibs"
if test -n "$enableval"; then
@ -423,6 +508,7 @@ then
else
DLL_CMT=
MAKEFILE_DLL=$srcdir/lib/Makefile.dll-lib
BINARY_TYPE=dllbin
echo "Enabling DLL shared libraries"
fi
@ -446,6 +532,7 @@ then
else
ELF_CMT=
MAKEFILE_ELF=$srcdir/lib/Makefile.elf-lib
BINARY_TYPE=elfbin
echo "Enabling ELF shared libraries"
fi
@ -548,6 +635,7 @@ fi
MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
set dummy ${MAKE-make}; ac_make=$2
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
@ -1182,7 +1270,7 @@ else
ac_cv_c_cross=yes
else
cat > conftest.$ac_ext <<EOF
#line 1186 "configure"
#line 1274 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
@ -1213,7 +1301,7 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 1217 "configure"
#line 1305 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
@ -1227,7 +1315,7 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1231 "configure"
#line 1319 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
@ -1252,7 +1340,7 @@ else
fi
echo "$ac_t""$CPP" 1>&6
for ac_hdr in stdlib.h unistd.h stdarg.h errno.h mntent.h dirent.h getopt.h linux/fd.h sys/disklabel.h
for ac_hdr in stdlib.h unistd.h stdarg.h errno.h mntent.h dirent.h getopt.h linux/fd.h linux/major.h sys/disklabel.h
do
ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -1260,7 +1348,7 @@ 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
#line 1264 "configure"
#line 1352 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
@ -1293,7 +1381,7 @@ if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1297 "configure"
#line 1385 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
@ -1341,7 +1429,7 @@ if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1345 "configure"
#line 1433 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
@ -1390,7 +1478,7 @@ if eval "test \"`echo '$''{'e2fsprogs_cv_struct_d_namlen'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1394 "configure"
#line 1482 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <dirent.h>
@ -1432,7 +1520,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 1436 "configure"
#line 1524 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@ -1466,7 +1554,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 1470 "configure"
#line 1558 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@ -1500,7 +1588,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 1504 "configure"
#line 1592 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@ -1537,7 +1625,7 @@ if eval "test \"`echo '$''{'e2fsprogs_cv_struct_st_flags'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1541 "configure"
#line 1629 "configure"
#include "confdefs.h"
#include <sys/stat.h>
int main() { return 0; }
@ -1570,7 +1658,7 @@ 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 <<EOF
#line 1574 "configure"
#line 1662 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -1620,7 +1708,7 @@ 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
#line 1624 "configure"
#line 1712 "configure"
#include "confdefs.h"
#include <linux/fs.h>
EOF
@ -1664,7 +1752,7 @@ if eval "test \"`echo '$''{'ac_cv_have_optreset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1668 "configure"
#line 1756 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
@ -1691,7 +1779,7 @@ if eval "test \"`echo '$''{'e2fsprogs_cv_struct_ext2_inode_frags'+set}'`\" = set
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1695 "configure"
#line 1783 "configure"
#include "confdefs.h"
#include <linux/ext2_fs.h>
int main() { return 0; }
@ -1722,7 +1810,7 @@ if eval "test \"`echo '$''{'e2fsprogs_cv_ioctl_ext2'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1726 "configure"
#line 1814 "configure"
#include "confdefs.h"
#include <linux/ext2_fs.h>
#include <sys/ioctl.h>
@ -1759,7 +1847,7 @@ linux*)
;;
esac
LDFALG_STATIC=
LDFLAG_STATIC=
case "$host_os" in
linux*)
LDFLAG_STATIC=-static
@ -1888,7 +1976,10 @@ ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "MCONFIG include/linux/types.h Makefile lib/et/Makefile
lib/et/compile_et.sh lib/ss/Makefile lib/ss/mk_cmds.sh
lib/ext2fs/Makefile lib/e2p/Makefile misc/Makefile
e2fsck/Makefile debugfs/Makefile tests/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
e2fsck/Makefile debugfs/Makefile tests/Makefile lib/ext2fs/ext2_err.et
debugfs/debugfs.8 e2fsck/e2fsck.8 misc/tune2fs.8 misc/lsattr.1
misc/chattr.1 misc/badblocks.8 misc/dumpe2fs.8 misc/mke2fs.8
misc/fsck.8 misc/mklost+found.8" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
@ -1906,6 +1997,12 @@ s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
/@MCONFIG@/r $MCONFIG
s%@MCONFIG@%%g
s%@E2FSPROGS_YEAR@%$E2FSPROGS_YEAR%g
s%@E2FSPROGS_MONTH@%$E2FSPROGS_MONTH%g
s%@E2FSPROGS_VERSION@%$E2FSPROGS_VERSION%g
s%@CC@%$CC%g
s%@LD@%$LD%g
s%@CCOPTS@%$CCOPTS%g
s%@DLL_CMT@%$DLL_CMT%g
/@MAKEFILE_DLL@/r $MAKEFILE_DLL
s%@MAKEFILE_DLL@%%g
@ -1924,6 +2021,7 @@ s%@MAKEFILE_CHECKER@%%g
s%@W@%$W%g
/@MAKEFILE_LIBRARY@/r $MAKEFILE_LIBRARY
s%@MAKEFILE_LIBRARY@%%g
s%@BINARY_TYPE@%$BINARY_TYPE%g
s%@SET_MAKE@%$SET_MAKE%g
s%@LN@%$LN%g
s%@MV@%$MV%g
@ -1945,7 +2043,6 @@ s%@build_os@%$build_os%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
s%@STRIP@%$STRIP%g
s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@CPP@%$CPP%g
@ -1967,7 +2064,10 @@ cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"MCONFIG include/linux/types.h Makefile lib/et/Makefile
lib/et/compile_et.sh lib/ss/Makefile lib/ss/mk_cmds.sh
lib/ext2fs/Makefile lib/e2p/Makefile misc/Makefile
e2fsck/Makefile debugfs/Makefile tests/Makefile"}
e2fsck/Makefile debugfs/Makefile tests/Makefile lib/ext2fs/ext2_err.et
debugfs/debugfs.8 e2fsck/e2fsck.8 misc/tune2fs.8 misc/lsattr.1
misc/chattr.1 misc/badblocks.8 misc/dumpe2fs.8 misc/mke2fs.8
misc/fsck.8 misc/mklost+found.8"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then

View File

@ -1,6 +1,86 @@
AC_INIT(version.h)
MCONFIG=./MCONFIG
AC_SUBST_FILE(MCONFIG)
BINARY_TYPE=bin
dnl
dnl This is to figure out the version number and the date....
dnl
E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h \
| awk '{print $3}' | tr \" " " | awk '{print $1}'`
DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \
| tr \" " "`
MONTH=`echo $DATE | awk -F- '{print $2}'`
YEAR=`echo $DATE | awk -F- '{print $3}'`
if expr $YEAR ">" 90 >/dev/null ; then
E2FSPROGS_YEAR=19$YEAR
else
E2FSPROGS_YEAR=20$YEAR
fi
case $MONTH in
Jan) E2FSPROGS_MONTH="January" ;;
Feb) E2FSPROGS_MONTH="February" ;;
Mar) E2FSPROGS_MONTH="March" ;;
Apr) E2FSPROGS_MONTH="April" ;;
May) E2FSPROGS_MONTH="May" ;;
Jun) E2FSPROGS_MONTH="June" ;;
Jul) E2FSPROGS_MONTH="July" ;;
Aug) E2FSPROGS_MONTH="August" ;;
Sep) E2FSPROGS_MONTH="September" ;;
Oct) E2FSPROGS_MONTH="October" ;;
Nov) E2FSPROGS_MONTH="November" ;;
Dec) E2FSPROGS_MONTH="December" ;;
*) echo "Unknown month $MONTH??" ;;
esac
unset DATE MONTH YEAR
echo "Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION"
echo "Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}"
AC_SUBST(E2FSPROGS_YEAR)
AC_SUBST(E2FSPROGS_MONTH)
AC_SUBST(E2FSPROGS_VERSION)
dnl
dnl set $(CC) from --with-cc=value
dnl
AC_ARG_WITH([cc],
[ --with-cc=COMPILER select compiler to use],
AC_MSG_RESULT(CC=$withval)
CC=$withval,
if test -z "$CC" ; then CC=cc; fi
[AC_MSG_RESULT(CC defaults to $CC)])dnl
export CC
AC_SUBST([CC])
dnl
dnl set $(LD) from --with-linker=value
dnl
AC_ARG_WITH([linker],
[ --with-linker=LINKER select linker to use],
AC_MSG_RESULT(LD=$withval)
LD=$withval,
if test -z "$LD" ; then LD=$CC; fi
[AC_MSG_RESULT(LD defaults to $LD)])dnl
export LD
AC_SUBST([LD])
dnl
dnl set $(CCOPTS) from --with-ccopts=value
dnl
AC_ARG_WITH([ccopts],
[ --with-ccopts=CCOPTS select compiler command line options],
AC_MSG_RESULT(CCOPTS is $withval)
CCOPTS=$withval
CFLAGS="$CFLAGS $withval",
CCOPTS=)dnl
AC_SUBST(CCOPTS)
dnl
dnl set $(LDFLAGS) from --with-ldopts=value
dnl
AC_ARG_WITH([ldopts],
[ --with-ldopts=LDOPTS select linker command line options],
AC_MSG_RESULT(LDFLAGS is $withval)
LDFLAGS=$withval,
LDFLAGS=)dnl
AC_SUBST(LDFLAGS)
dnl
dnl handle --enable-dll-shlibs
dnl
@ -14,6 +94,7 @@ then
else
DLL_CMT=
MAKEFILE_DLL=$srcdir/lib/Makefile.dll-lib
BINARY_TYPE=dllbin
echo "Enabling DLL shared libraries"
fi
,
@ -36,6 +117,7 @@ then
else
ELF_CMT=
MAKEFILE_ELF=$srcdir/lib/Makefile.elf-lib
BINARY_TYPE=elfbin
echo "Enabling ELF shared libraries"
fi
,
@ -136,6 +218,7 @@ AC_SUBST_FILE(MAKEFILE_LIBRARY)
dnl
dnl End of configuration options
dnl
AC_SUBST(BINARY_TYPE)
AC_PROG_MAKE_SET
AC_PATH_PROG(LN, ln, ln)
AC_PATH_PROG(MV, mv, mv)
@ -150,7 +233,7 @@ AC_CHECK_TOOL(STRIP, strip, :)
AC_PROG_CC
AC_PROG_INSTALL
AC_C_CROSS
AC_CHECK_HEADERS(stdlib.h unistd.h stdarg.h errno.h mntent.h dirent.h getopt.h linux/fd.h sys/disklabel.h)
AC_CHECK_HEADERS(stdlib.h unistd.h stdarg.h errno.h mntent.h dirent.h getopt.h linux/fd.h linux/major.h sys/disklabel.h)
AC_FUNC_VPRINTF
dnl
dnl See if struct dirent has a d_namlen field (like bsd systems), implying
@ -276,7 +359,7 @@ dnl See if -static works.
dnl XXX for now, assume that only Linux systems support -static
dnl
AC_REQUIRE([AC_CANONICAL_HOST])
LDFALG_STATIC=
LDFLAG_STATIC=
case "$host_os" in
linux*)
LDFLAG_STATIC=-static
@ -319,4 +402,7 @@ test -d include/linux || mkdir include/linux
AC_OUTPUT(MCONFIG include/linux/types.h Makefile lib/et/Makefile
lib/et/compile_et.sh lib/ss/Makefile lib/ss/mk_cmds.sh
lib/ext2fs/Makefile lib/e2p/Makefile misc/Makefile
e2fsck/Makefile debugfs/Makefile tests/Makefile)
e2fsck/Makefile debugfs/Makefile tests/Makefile lib/ext2fs/ext2_err.et
debugfs/debugfs.8 e2fsck/e2fsck.8 misc/tune2fs.8 misc/lsattr.1
misc/chattr.1 misc/badblocks.8 misc/dumpe2fs.8 misc/mke2fs.8
misc/fsck.8 misc/mklost+found.8)

View File

@ -1,3 +1,12 @@
Wed Jan 31 11:06:08 1996 <tytso@rsts-11.mit.edu>
* Release of E2fsprogs version 1.02
Fri Dec 1 22:42:31 1995 <tytso@rsts-11.mit.edu>
* Makefile.in (LIBS): Rearrange the order of the libraries to be
linked, so that -lext2fs is before -lcom_err.
Thu Oct 26 12:05:06 1995 <tytso@rsts-11.mit.edu>
* Makefile.in (install): Strip programs when they are installed.

View File

@ -21,16 +21,16 @@ SRCS= debug_cmds.c $(srcdir)/debugfs.c $(srcdir)/util.c \
$(srcdir)/ncheck.c $(srcdir)/icheck.c $(srcdir)/lsdel.c \
$(srcdir)/dump.c
LIBS= -L../lib -lss -lcom_err -lext2fs
DEPLIBS= ../lib/libss.a ../lib/libcom_err.a ../lib/libext2fs.a
LIBS= -L../lib -lext2fs -lss -lcom_err
DEPLIBS= ../lib/libext2fs.a ../lib/libss.a ../lib/libcom_err.a
.c.o:
$(CC) -c $(CFLAGS) $< -o $@
$(CC) -c $(ALL_CFLAGS) $< -o $@
all:: $(PROGS)
debugfs: $(DEBUG_OBJS) $(DEPLIBS)
$(CC) $(LDFLAGS) -o debugfs $(DEBUG_OBJS) $(LIBS)
$(CC) $(ALL_LDFLAGS) -o debugfs $(DEBUG_OBJS) $(LIBS)
debug_cmds.c debug_cmds.h: debug_cmds.ct
$(MK_CMDS) $(srcdir)/debug_cmds.ct
@ -45,7 +45,7 @@ install: $(PROGS) $(MANPAGES) installdirs
$(STRIP) $(DESTDIR)$(usbindir)/$$i; \
done
for i in $(MANPAGES); do \
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(man8dir)/$$i; \
$(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
done
uninstall:

View File

@ -2,7 +2,7 @@
.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
.\" This file may be copied under the terms of the GNU Public License.
.\"
.TH DEBUGFS 8 "October 1995" "Version 1.01"
.TH DEBUGFS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
.SH NAME
debugfs \- ext2 file system debugger
.SH SYNOPSIS

View File

@ -1,3 +1,32 @@
Wed Jan 31 11:06:08 1996 <tytso@rsts-11.mit.edu>
* Release of E2fsprogs version 1.02
Wed Dec 15 21:24:26 1996 <tytso@rsts-11.mit.edu>
* pass1.c (process_block): Check to see if a file is "fragmented".
i.e., non-contiguous. Note that any file which is larger
than the block group is guaranteed to be non-contiguous.
We may want to use a different hueristic for deciding
whether or not a file is "fragmented".
* e2fsck.c (show_stats): Print statistics of how many
non-contiguous files are on the system.
Fri Dec 15 19:19:47 1995 <tytso@rsts-11.mit.edu>
* badblocks.c (read_bad_blocks_file, test_disk): Fold
functionality of test_disk() (which runs badblocks) into
read_bad_blocks_file(); test_disk() now calls
read_bad_blocks_file() with a NULL bad_blocks_file
argument.
Mon Nov 20 18:30:10 1995 <tytso@rsts-11.mit.edu>
* e2fsck.c (check_mount): Use #if defined(__linux__) instead of
#if defined(linux). The latter won't work if we're
compiling -ansi.
Mon Oct 30 20:31:17 1995 <tytso@rsts-11.mit.edu>
* e2fsck.c (check_mount): For Linux systems, the check to see if

View File

@ -18,7 +18,7 @@ LIBS= -L../lib -lss -lcom_err -lext2fs $(CHECKLIB)
DEPLIBS= ../lib/libss.a ../lib/libcom_err.a ../lib/libext2fs.a
.c.o:
$(CC) -c $(CFLAGS) $< -o $@
$(CC) -c $(ALL_CFLAGS) $< -o $@
#
# Flags for using Checker
@ -70,16 +70,16 @@ SRCS= $(srcdir)/e2fsck.c \
all:: $(PROGS)
e2fsck: $(OBJS) $(DEPLIBS)
$(LD) $(LDFLAGS) $(LDFLAG_STATIC) -o e2fsck $(OBJS) $(LIBS)
$(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o e2fsck $(OBJS) $(LIBS)
extend: extend.o
$(LD) $(LDFLAGS) -o extend extend.o $(CHECKLIB)
$(LD) $(ALL_LDFLAGS) -o extend extend.o $(CHECKLIB)
flushb: flushb.o
$(LD) $(LDFLAGS) -o flushb flushb.o $(CHECKLIB)
$(LD) $(ALL_LDFLAGS) -o flushb flushb.o $(CHECKLIB)
iscan: iscan.o util.o
$(LD) $(LDFLAGS) -o iscan iscan.o util.o ehandler.o $(LIBS)
$(LD) $(ALL_LDFLAGS) -o iscan iscan.o util.o ehandler.o $(LIBS)
installdirs:
@ -93,8 +93,9 @@ install: $(PROGS) $(MANPAGES) installdirs
done
$(LN) -f $(DESTDIR)$(sbindir)/e2fsck $(DESTDIR)$(sbindir)/fsck.ext2
for i in $(MANPAGES); do \
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(man8dir)/$$i; \
$(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
done
uninstall:
$(RM) -f $(sbindir)/e2fsck
$(RM) -f $(sbindir)/flushb

View File

@ -29,6 +29,7 @@ void read_bad_blocks_file(ext2_filsys fs, const char *bad_blocks_file,
errcode_t retval;
badblocks_list bb_list = 0;
FILE *f;
char buf[1024];
read_bitmaps(fs);
@ -44,7 +45,6 @@ void read_bad_blocks_file(ext2_filsys fs, const char *bad_blocks_file,
fatal_error(0);
}
/*
* If we're appending to the bad blocks inode, read in the
* current bad blocks.
@ -59,16 +59,33 @@ void read_bad_blocks_file(ext2_filsys fs, const char *bad_blocks_file,
}
/*
* Now read in the bad blocks from the file.
* Now read in the bad blocks from the file; if
* bad_blocks_file is null, then try to run the badblocks
* command.
*/
f = fopen(bad_blocks_file, "r");
if (!f) {
com_err("read_bad_blocks_file", errno,
"while trying to open %s", bad_blocks_file);
fatal_error(0);
if (bad_blocks_file) {
f = fopen(bad_blocks_file, "r");
if (!f) {
com_err("read_bad_blocks_file", errno,
"while trying to open %s", bad_blocks_file);
fatal_error(0);
}
} else {
sprintf(buf, "badblocks %s%s %d", preen ? "" : "-s ",
fs->device_name,
fs->super->s_blocks_count);
f = popen(buf, "r");
if (!f) {
com_err("read_bad_blocks_file", errno,
"while trying popen '%s'", buf);
fatal_error(0);
}
}
retval = ext2fs_read_bb_FILE(fs, f, &bb_list, invalid_block);
fclose (f);
if (bad_blocks_file)
fclose(f);
else
pclose(f);
if (retval) {
com_err("ext2fs_read_bb_FILE", retval,
"while reading in list of bad blocks from file");
@ -89,6 +106,11 @@ void read_bad_blocks_file(ext2_filsys fs, const char *bad_blocks_file,
return;
}
void test_disk(ext2_filsys fs)
{
read_bad_blocks_file(fs, 0, 1);
}
static int check_bb_inode_blocks(ext2_filsys fs, blk_t *block_nr, int blockcnt,
void *private)
{
@ -108,58 +130,3 @@ static int check_bb_inode_blocks(ext2_filsys fs, blk_t *block_nr, int blockcnt,
return 0;
}
void test_disk(ext2_filsys fs)
{
errcode_t retval;
badblocks_list bb_list = 0;
FILE *f;
char buf[1024];
read_bitmaps(fs);
/*
* Always read in the current list of bad blocks.
*/
retval = ext2fs_read_bb_inode(fs, &bb_list);
if (retval) {
com_err("ext2fs_read_bb_inode", retval,
"while reading the bad blocks inode");
fatal_error(0);
}
/*
* Now run the bad blocks program
*/
sprintf(buf, "badblocks %s%s %d", preen ? "" : "-s ",
fs->device_name,
fs->super->s_blocks_count);
if (verbose)
printf("Running command: %s\n", buf);
f = popen(buf, "r");
if (!f) {
com_err("popen", errno,
"while trying to run %s", buf);
fatal_error(0);
}
retval = ext2fs_read_bb_FILE(fs, f, &bb_list, invalid_block);
fclose (f);
if (retval) {
com_err("ext2fs_read_bb_FILE", retval,
"while processing list of bad blocks from program");
fatal_error(0);
}
/*
* Finally, update the bad blocks from the bad_block_map
*/
retval = ext2fs_update_bb_inode(fs, bb_list);
if (retval) {
com_err("ext2fs_update_bb_inode", retval,
"while updating bad block inode");
fatal_error(0);
}
badblocks_list_free(bb_list);
return;
}

View File

@ -2,13 +2,13 @@
.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
.\" This file may be copied under the terms of the GNU Public License.
.\"
.TH E2FSCK 8 "October 1995" "Version 1.01"
.TH E2FSCK 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
.SH NAME
e2fsck \- check a Linux second extended file system
.SH SYNOPSIS
.B e2fsck
[
.B \-panyrdfvtFV
.B \-pacnyrdfvtFV
]
[
.B \-b
@ -51,6 +51,13 @@ search can be fooled in some cases. This option forces e2fsck to only
try locating the superblock at a particular blocksize. If the
superblock is not found, e2fsck will terminate with a fatal error.
.TP
.I -c
This option causes e2fsck to run the
.BR badblocks (8)
program to find any blocks
which are bad on the filesystem, and then marks them as bad by adding them
to the bad block inode.
.TP
.I -d
Print debugging output (useless unless you are debugging
.B e2fsck
@ -81,7 +88,8 @@ Open the filesystem read-only, and assume an answer of ``no'' to all
questions. Allows
.B e2fsck
to be used non-interactively. (Note: if the
.I -l
.IR -c ,
.IR -l ,
or
.I -L
options are specified in addition to the

View File

@ -103,13 +103,17 @@ static void show_stats(ext2_filsys fs)
fs->super->s_free_blocks_count);
if (!verbose) {
printf("%s: %d/%d files, %d/%d blocks\n", device_name,
inodes_used, inodes, blocks_used, blocks);
printf("%s: %d/%d files (%3.1f%% non-contiguous), %d/%d blocks\n",
device_name, inodes_used, inodes,
100.00 * fs_fragmented / inodes_used,
blocks_used, blocks);
return;
}
printf ("\n%8d inode%s used (%d%%)\n", inodes_used,
(inodes_used != 1) ? "s" : "",
100 * inodes_used / inodes);
printf ("%8d non-contiguous inodes (%3.1f%%)\n",
fs_fragmented, 100.00 * fs_fragmented / inodes_used);
printf (" # of inodes with ind/dind/tind blocks: %d/%d/%d\n",
fs_ind_count, fs_dind_count, fs_tind_count);
printf ("%8d block%s used (%d%%)\n"
@ -156,7 +160,7 @@ static void check_mount(NOARGS)
if (!(mount_flags & EXT2_MF_MOUNTED))
return;
#if (defined(linux) && defined(HAVE_MNTENT_H))
#if (defined(__linux__) && defined(HAVE_MNTENT_H))
/*
* If the root is mounted read-only, then /etc/mtab is
* probably not correct; so we won't issue a warning based on

View File

@ -138,6 +138,7 @@ extern int fs_sockets_count;
extern int fs_ind_count;
extern int fs_dind_count;
extern int fs_tind_count;
extern int fs_fragmented;
extern struct resource_track global_rtrack;

View File

@ -59,6 +59,7 @@ int fs_sockets_count = 0;
int fs_ind_count = 0;
int fs_dind_count = 0;
int fs_tind_count = 0;
int fs_fragmented = 0;
ext2fs_inode_bitmap inode_used_map = 0; /* Inodes which are in use */
ext2fs_inode_bitmap inode_bad_map = 0; /* Inodes which are bad in some way */
@ -92,11 +93,12 @@ static char *describe_illegal_block(ext2_filsys fs, blk_t block);
struct process_block_struct {
ino_t ino;
int is_dir:1, clear:1, suppress:1;
int is_dir:1, clear:1, suppress:1, fragmented:1;
int num_blocks;
int last_block;
int num_illegal_blocks;
int fix;
blk_t previous_block;
struct ext2_inode *inode;
};
@ -157,6 +159,7 @@ static void unwind_pass1(ext2_filsys fs)
fs_ind_count = 0;
fs_dind_count = 0;
fs_tind_count = 0;
fs_fragmented = 0;
}
void pass1(ext2_filsys fs)
@ -249,6 +252,7 @@ void pass1(ext2_filsys fs)
pb.num_blocks = pb.last_block = 0;
pb.num_illegal_blocks = 0;
pb.suppress = pb.clear = pb.is_dir = 0;
pb.fragmented = 0;
pb.fix = -1;
pb.inode = &inode;
retval = ext2fs_block_iterate(fs, ino, 0, block_buf,
@ -593,6 +597,8 @@ static void check_blocks(ext2_filsys fs, ino_t ino, struct ext2_inode *inode,
pb.num_blocks = pb.last_block = 0;
pb.num_illegal_blocks = 0;
pb.suppress = pb.clear = 0;
pb.fragmented = 0;
pb.previous_block = 0;
pb.is_dir = LINUX_S_ISDIR(inode->i_mode);
pb.fix = -1;
pb.inode = inode;
@ -603,6 +609,9 @@ static void check_blocks(ext2_filsys fs, ino_t ino, struct ext2_inode *inode,
com_err(program_name, retval,
"while calling ext2fs_block_iterate in check_blocks");
if (pb.fragmented && pb.num_blocks < fs->super->s_blocks_per_group)
fs_fragmented++;
if (pb.clear) {
e2fsck_read_inode(fs, ino, inode, "check_blocks");
if (retval) {
@ -756,6 +765,18 @@ int process_block(ext2_filsys fs,
blockcnt);
#endif
/*
* Simplistic fragmentation check. We merely require that the
* file be contiguous. (Which can never be true for really
* big files that are greater than a block group.)
*/
if (p->previous_block) {
if (p->previous_block+1 != blk)
p->fragmented = 1;
}
p->previous_block = blk;
if (blk < fs->super->s_first_data_block ||
blk >= fs->super->s_blocks_count ||
ext2fs_test_block_bitmap(block_illegal_map, blk)) {

View File

@ -1,3 +1,7 @@
Wed Jan 31 11:06:08 1996 <tytso@rsts-11.mit.edu>
* Release of E2fsprogs version 1.02
Mon Sep 4 21:50:12 1995 Remy Card <card@bbj>
* ext2_fs.h: Updated to latest version.

View File

@ -1,3 +1,7 @@
Wed Jan 31 11:06:08 1996 <tytso@rsts-11.mit.edu>
* Release of E2fsprogs version 1.02
Sat Mar 11 18:26:33 1995 Theodore Y. Ts'o <tytso@localhost>
* compile_manpages: Include an exit 0 at the end because some

View File

@ -1,3 +1,7 @@
Wed Jan 31 11:06:08 1996 <tytso@rsts-11.mit.edu>
* Release of E2fsprogs version 1.02
Mon Oct 30 21:11:47 1995 <tytso@rsts-11.mit.edu>
* Makefile.elf-lib: Changes to pass -soname to the linker, so that

View File

@ -81,6 +81,7 @@ installdirs::
install-shlibs install:: $(DLL_IMAGE).so.$(DLL_VERSION) installdirs
$(INSTALL_PROGRAM) $(DLL_IMAGE).so.$(DLL_VERSION) \
$(DESTDIR)$(DLL_INSTALL_DIR)/$(DLL_IMAGE).so.$(DLL_VERSION)
$(STRIP) $(DESTDIR)$(DLL_INSTALL_DIR)/$(DLL_IMAGE).so.$(DLL_VERSION)
-ldconfig
install:: $(DLL_STUB).sa

View File

@ -5,7 +5,7 @@
# In order to use this stub, the following makefile variables must be defined.
#
# ELF_VERSION = 1.0
# ELF_SONAME = 1
# ELF_SO_VERSION = 1
# ELF_IMAGE = libce
# ELF_MYDIR = et
# ELF_INSTALL_DIR = $(SHLIBDIR)
@ -36,6 +36,10 @@ installdirs::
install-shlibs install:: $(ELF_LIB) installdirs
$(INSTALL_PROGRAM) $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
$(STRIP) --strip-debug \
$(DESTDIR)$(DLL_INSTALL_DIR)/$(ELF_LIB)
$(LN) -sf $(ELF_LIB) $(DESTDIR)$(DLL_INSTALL_DIR)/$(ELF_SONAME)
$(LN) -sf $(ELF_SONAME) $(DESTDIR)$(DLL_INSTALL_DIR)/$(ELF_IMAGE).so
-ldconfig
clean::

View File

@ -1,3 +1,16 @@
Wed Jan 31 11:06:08 1996 <tytso@rsts-11.mit.edu>
* Release of E2fsprogs version 1.02
Tue Jan 2 20:50:44 1996 <tytso@rsts-11.mit.edu>
* fgetflags.c (fgetflags):
* fsetflags.c (fsetflags):
* fgetversion.c (fgetversion):
* fsetversion.c (fsetversion): Add the O_NONBLOCK flag to open
call, so that we don't hang trying to open things like
named pipes.
Mon Oct 30 17:44:07 1995 <tytso@rsts-11.mit.edu>
* ls.c (list_super): Use the correct field (s_def_resgid) when

View File

@ -57,13 +57,13 @@ BSDLIB_INSTALL_DIR = $(libdir)
@MAKEFILE_CHECKER@
.c.o:
$(CC) $(CFLAGS) -c $< -o $@
@PROFILE_CMT@ $(CC) $(CFLAGS) -pg -o profiled/$*.o -c $<
@CHECKER_CMT@ $(CC) $(CFLAGS) -checker -g -o checker/$*.o -c $<
@DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) $(CFLAGS) \
$(CC) $(ALL_CFLAGS) -c $< -o $@
@PROFILE_CMT@ $(CC) $(ALL_CFLAGS) -pg -o profiled/$*.o -c $<
@CHECKER_CMT@ $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
@DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) $(ALL_CFLAGS) \
@DLL_CMT@ -o jump/$*.o -c $<)
@ELF_CMT@ $(CC) $(CFLAGS) -fPIC -o elfshared/$*.o -c $<
@BSDLIB_CMT@ $(CC) $(CFLAGS) -fpic -o pic/$*.o -c $<
@ELF_CMT@ $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
@BSDLIB_CMT@ $(CC) $(ALL_CFLAGS) -fpic -o pic/$*.o -c $<
installdirs::
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(ulibdir)

View File

@ -59,7 +59,7 @@ int fgetflags (const char * name, unsigned long * flags)
int fd;
int r;
fd = open (name, O_RDONLY);
fd = open (name, O_RDONLY|O_NONBLOCK);
if (fd == -1)
return -1;
r = ioctl (fd, EXT2_IOC_GETFLAGS, flags);

View File

@ -33,7 +33,7 @@ int fgetversion (const char * name, unsigned long * version)
int fd;
int r;
fd = open (name, O_RDONLY);
fd = open (name, O_RDONLY|O_NONBLOCK);
if (fd == -1)
return - 1;
r = ioctl (fd, EXT2_IOC_GETVERSION, version);

View File

@ -55,7 +55,7 @@ int fsetflags (const char * name, unsigned long flags)
int fd;
int r;
fd = open (name, O_RDONLY);
fd = open (name, O_RDONLY|O_NONBLOCK);
if (fd == -1)
return -1;
r = ioctl (fd, EXT2_IOC_SETFLAGS, &flags);

View File

@ -33,7 +33,7 @@ int fsetversion (const char * name, unsigned long version)
int fd;
int r;
fd = open (name, O_RDONLY);
fd = open (name, O_RDONLY|O_NONBLOCK);
if (fd == -1)
return -1;
r = ioctl (fd, EXT2_IOC_SETVERSION, &version);

View File

@ -1,3 +1,7 @@
Wed Jan 31 11:06:08 1996 <tytso@rsts-11.mit.edu>
* Release of E2fsprogs version 1.02
Mon Sep 4 21:44:47 1995 Remy Card <card@bbj>
* Makefile.in: Added support for BSD shared libraries.

View File

@ -45,13 +45,13 @@ BSDLIB_INSTALL_DIR = $(libdir)
# what to build...
#
.c.o:
$(CC) $(CFLAGS) -c $< -o $@
@PROFILE_CMT@ $(CC) $(CFLAGS) -pg -o profiled/$*.o -c $<
@CHECKER_CMT@ $(CC) $(CFLAGS) -checker -g -o checker/$*.o -c $<
@DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) $(CFLAGS) \
$(CC) $(ALL_CFLAGS) -c $< -o $@
@PROFILE_CMT@ $(CC) $(ALL_CFLAGS) -pg -o profiled/$*.o -c $<
@CHECKER_CMT@ $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
@DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) $(ALL_CFLAGS) \
@DLL_CMT@ -o jump/$*.o -c $<)
@ELF_CMT@ $(CC) $(CFLAGS) -fPIC -o elfshared/$*.o -c $<
@BSDLIB_CMT@ $(CC) $(CFLAGS) -fpic -o pic/$*.o -c $<
@ELF_CMT@ $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
@BSDLIB_CMT@ $(CC) $(ALL_CFLAGS) -fpic -o pic/$*.o -c $<
@MAKEFILE_LIBRARY@
@MAKEFILE_DLL@

View File

@ -1,3 +1,17 @@
Wed Jan 31 11:06:08 1996 <tytso@rsts-11.mit.edu>
* Release of E2fsprogs version 1.02
Sat Dec 9 09:57:50 1995 <tytso@rsts-11.mit.edu>
* rw_bitops.c (ext2fs_write_block_bitmap):
* bitops.c (ext2fs_test_bit, ext2fs_clear_bit, ext2fs_set_bit):
* bitops.h (ext2fs_test_bit, ext2fs_clear_bit, ext2fs_set_bit):
Rename {test,set,clear}_bit to ext2fs_{test,set,clear}_bit,
to avoid conflicts with with kernel include files. Also
rename ADDR and CONST_ADDR to EXT2FS_ADDR and
EXT2FS_CONST_ADDR.
Thu Oct 26 12:09:16 1995 <tytso@rsts-11.mit.edu>
* ext2_err.et: Updated message in EXT2_ET_BASE to say version 0.5c

View File

@ -102,20 +102,20 @@ BSDLIB_INSTALL_DIR = $(libdir)
@MAKEFILE_CHECKER@
.c.o:
$(CC) $(CFLAGS) -c $< -o $@
@PROFILE_CMT@ $(CC) $(CFLAGS) -pg -o profiled/$*.o -c $<
@CHECKER_CMT@ $(CC) $(CFLAGS) -checker -g -o checker/$*.o -c $<
@DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) $(CFLAGS) \
$(CC) $(ALL_CFLAGS) -c $< -o $@
@PROFILE_CMT@ $(CC) $(ALL_CFLAGS) -pg -o profiled/$*.o -c $<
@CHECKER_CMT@ $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
@DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) $(ALL_CFLAGS) \
@DLL_CMT@ -o jump/$*.o -c $<)
@ELF_CMT@ $(CC) $(CFLAGS) -fPIC -o elfshared/$*.o -c $<
@BSDLIB_CMT@ $(CC) $(CFLAGS) -fpic -o pic/$*.o -c $<
@ELF_CMT@ $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
@BSDLIB_CMT@ $(CC) $(ALL_CFLAGS) -fpic -o pic/$*.o -c $<
COMPILE_ET=../et/compile_et
DISTFILES= Makefile *.c *.h image
ext2_err.c ext2_err.h: $(srcdir)/ext2_err.et
$(COMPILE_ET) $(srcdir)/ext2_err.et
ext2_err.c ext2_err.h: ext2_err.et
$(COMPILE_ET) ext2_err.et
installdirs::
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(ulibdir) \

View File

@ -27,7 +27,7 @@
* systems, as well as non-32 bit systems.
*/
int set_bit(int nr,void * addr)
int ext2fs_set_bit(int nr,void * addr)
{
int mask, retval;
unsigned char *ADDR = (unsigned char *) addr;
@ -39,7 +39,7 @@ int set_bit(int nr,void * addr)
return retval;
}
int clear_bit(int nr, void * addr)
int ext2fs_clear_bit(int nr, void * addr)
{
int mask, retval;
unsigned char *ADDR = (unsigned char *) addr;
@ -51,7 +51,7 @@ int clear_bit(int nr, void * addr)
return retval;
}
int test_bit(int nr, const void * addr)
int ext2fs_test_bit(int nr, const void * addr)
{
int mask;
const unsigned char *ADDR = (const unsigned char *) addr;

View File

@ -9,9 +9,9 @@
*/
extern int set_bit(int nr,void * addr);
extern int clear_bit(int nr, void * addr);
extern int test_bit(int nr, const void * addr);
extern int ext2fs_set_bit(int nr,void * addr);
extern int ext2fs_clear_bit(int nr, void * addr);
extern int ext2fs_test_bit(int nr, const void * addr);
extern __u16 ext2fs_swab16(__u16 val);
extern __u32 ext2fs_swab32(__u32 val);
@ -95,40 +95,40 @@ extern blk_t ext2fs_get_inode_bitmap_end(ext2fs_inode_bitmap bitmap);
* Some hacks to defeat gcc over-optimizations..
*/
struct __dummy_h { unsigned long a[100]; };
#define ADDR (*(struct __dummy_h *) addr)
#define CONST_ADDR (*(const struct __dummy_h *) addr)
#define EXT2FS_ADDR (*(struct __dummy_h *) addr)
#define EXT2FS_CONST_ADDR (*(const struct __dummy_h *) addr)
_INLINE_ int set_bit(int nr, void * addr)
_INLINE_ int ext2fs_set_bit(int nr, void * addr)
{
int oldbit;
__asm__ __volatile__("btsl %2,%1\n\tsbbl %0,%0"
:"=r" (oldbit),"=m" (ADDR)
:"=r" (oldbit),"=m" (EXT2FS_ADDR)
:"r" (nr));
return oldbit;
}
_INLINE_ int clear_bit(int nr, void * addr)
_INLINE_ int ext2fs_clear_bit(int nr, void * addr)
{
int oldbit;
__asm__ __volatile__("btrl %2,%1\n\tsbbl %0,%0"
:"=r" (oldbit),"=m" (ADDR)
:"=r" (oldbit),"=m" (EXT2FS_ADDR)
:"r" (nr));
return oldbit;
}
_INLINE_ int test_bit(int nr, const void * addr)
_INLINE_ int ext2fs_test_bit(int nr, const void * addr)
{
int oldbit;
__asm__ __volatile__("btl %2,%1\n\tsbbl %0,%0"
:"=r" (oldbit)
:"m" (CONST_ADDR),"r" (nr));
:"m" (EXT2FS_CONST_ADDR),"r" (nr));
return oldbit;
}
#undef ADDR
#undef EXT2FS_ADDR
#endif /* i386 */
@ -136,7 +136,7 @@ _INLINE_ int test_bit(int nr, const void * addr)
#define _EXT2_HAVE_ASM_BITOPS_
_INLINE_ int set_bit(int nr,void * addr)
_INLINE_ int ext2fs_set_bit(int nr,void * addr)
{
char retval;
@ -146,7 +146,7 @@ _INLINE_ int set_bit(int nr,void * addr)
return retval;
}
_INLINE_ int clear_bit(int nr, void * addr)
_INLINE_ int ext2fs_clear_bit(int nr, void * addr)
{
char retval;
@ -156,7 +156,7 @@ _INLINE_ int clear_bit(int nr, void * addr)
return retval;
}
_INLINE_ int test_bit(int nr, const void * addr)
_INLINE_ int ext2fs_test_bit(int nr, const void * addr)
{
char retval;
@ -172,7 +172,7 @@ _INLINE_ int test_bit(int nr, const void * addr)
#define _EXT2_HAVE_ASM_BITOPS_
_INLINE_ int set_bit(int nr, void *addr)
_INLINE_ int ext2fs_set_bit(int nr, void *addr)
{
int mask, retval;
unsigned long *ADDR = (unsigned long *) addr;
@ -184,7 +184,7 @@ _INLINE_ int set_bit(int nr, void *addr)
return retval;
}
_INLINE_ int clear_bit(int nr, void *addr)
_INLINE_ int ext2fs_clear_bit(int nr, void *addr)
{
int mask, retval;
unsigned long *ADDR = (unsigned long *) addr;
@ -196,7 +196,7 @@ _INLINE_ int clear_bit(int nr, void *addr)
return retval;
}
_INLINE_ int test_bit(int nr, const void *addr)
_INLINE_ int ext2fs_test_bit(int nr, const void *addr)
{
int mask;
const unsigned long *ADDR = (const unsigned long *) addr;
@ -231,7 +231,7 @@ _INLINE_ void ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap,
bitmap->description);
return;
}
set_bit(block - bitmap->start, bitmap->bitmap);
ext2fs_set_bit(block - bitmap->start, bitmap->bitmap);
}
_INLINE_ void ext2fs_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
@ -242,7 +242,7 @@ _INLINE_ void ext2fs_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
block, bitmap->description);
return;
}
clear_bit(block - bitmap->start, bitmap->bitmap);
ext2fs_clear_bit(block - bitmap->start, bitmap->bitmap);
}
_INLINE_ int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap,
@ -253,7 +253,7 @@ _INLINE_ int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap,
block, bitmap->description);
return 0;
}
return test_bit(block - bitmap->start, bitmap->bitmap);
return ext2fs_test_bit(block - bitmap->start, bitmap->bitmap);
}
_INLINE_ void ext2fs_mark_inode_bitmap(ext2fs_inode_bitmap bitmap,
@ -264,7 +264,7 @@ _INLINE_ void ext2fs_mark_inode_bitmap(ext2fs_inode_bitmap bitmap,
inode, bitmap->description);
return;
}
set_bit(inode - bitmap->start, bitmap->bitmap);
ext2fs_set_bit(inode - bitmap->start, bitmap->bitmap);
}
_INLINE_ void ext2fs_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap,
@ -275,7 +275,7 @@ _INLINE_ void ext2fs_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap,
inode, bitmap->description);
return;
}
clear_bit(inode - bitmap->start, bitmap->bitmap);
ext2fs_clear_bit(inode - bitmap->start, bitmap->bitmap);
}
_INLINE_ int ext2fs_test_inode_bitmap(ext2fs_inode_bitmap bitmap,
@ -286,7 +286,7 @@ _INLINE_ int ext2fs_test_inode_bitmap(ext2fs_inode_bitmap bitmap,
inode, bitmap->description);
return 0;
}
return test_bit(inode - bitmap->start, bitmap->bitmap);
return ext2fs_test_bit(inode - bitmap->start, bitmap->bitmap);
}
_INLINE_ void ext2fs_fast_mark_block_bitmap(ext2fs_block_bitmap bitmap,
@ -299,7 +299,7 @@ _INLINE_ void ext2fs_fast_mark_block_bitmap(ext2fs_block_bitmap bitmap,
return;
}
#endif
set_bit(block - bitmap->start, bitmap->bitmap);
ext2fs_set_bit(block - bitmap->start, bitmap->bitmap);
}
_INLINE_ void ext2fs_fast_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
@ -312,7 +312,7 @@ _INLINE_ void ext2fs_fast_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
return;
}
#endif
clear_bit(block - bitmap->start, bitmap->bitmap);
ext2fs_clear_bit(block - bitmap->start, bitmap->bitmap);
}
_INLINE_ int ext2fs_fast_test_block_bitmap(ext2fs_block_bitmap bitmap,
@ -325,7 +325,7 @@ _INLINE_ int ext2fs_fast_test_block_bitmap(ext2fs_block_bitmap bitmap,
return 0;
}
#endif
return test_bit(block - bitmap->start, bitmap->bitmap);
return ext2fs_test_bit(block - bitmap->start, bitmap->bitmap);
}
_INLINE_ void ext2fs_fast_mark_inode_bitmap(ext2fs_inode_bitmap bitmap,
@ -338,7 +338,7 @@ _INLINE_ void ext2fs_fast_mark_inode_bitmap(ext2fs_inode_bitmap bitmap,
return;
}
#endif
set_bit(inode - bitmap->start, bitmap->bitmap);
ext2fs_set_bit(inode - bitmap->start, bitmap->bitmap);
}
_INLINE_ void ext2fs_fast_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap,
@ -351,7 +351,7 @@ _INLINE_ void ext2fs_fast_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap,
return;
}
#endif
clear_bit(inode - bitmap->start, bitmap->bitmap);
ext2fs_clear_bit(inode - bitmap->start, bitmap->bitmap);
}
_INLINE_ int ext2fs_fast_test_inode_bitmap(ext2fs_inode_bitmap bitmap,
@ -364,7 +364,7 @@ _INLINE_ int ext2fs_fast_test_inode_bitmap(ext2fs_inode_bitmap bitmap,
return 0;
}
#endif
return test_bit(inode - bitmap->start, bitmap->bitmap);
return ext2fs_test_bit(inode - bitmap->start, bitmap->bitmap);
}
_INLINE_ blk_t ext2fs_get_block_bitmap_start(ext2fs_block_bitmap bitmap)

View File

@ -38,9 +38,9 @@
00000000 T _ext2fs_new_block libext2fs alloc
00000000 T _ext2fs_get_free_blocks libext2fs alloc
00000000 T _ext2fs_expand_dir libext2fs expanddir
00000000 T _set_bit libext2fs inline
00000000 T _clear_bit libext2fs inline
00000000 T _test_bit libext2fs inline
00000000 T _ext2fs_set_bit libext2fs inline
00000000 T _ext2fs_clear_bit libext2fs inline
00000000 T _ext2fs_test_bit libext2fs inline
00000000 T _ext2fs_mark_block_bitmap libext2fs inline
00000000 T _ext2fs_unmark_block_bitmap libext2fs inline
00000000 T _ext2fs_test_block_bitmap libext2fs inline

View File

@ -1,11 +1,11 @@
#
# Copyright (C) 1993, 1994 Theodore Ts'o. This file may be redistributed
# under the terms of the GNU Public License.
# Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o. This file may be
# redistributed under the terms of the GNU Public License.
#
error_table ext2
ec EXT2_ET_BASE,
"EXT2FS Library version 0.5c"
"EXT2FS Library version @E2FSPROGS_VERSION@"
ec EXT2_ET_MAGIC_EXT2FS_FILSYS,
"Wrong magic number for ext2_filsys structure"

View File

@ -85,7 +85,7 @@ errcode_t ext2fs_write_block_bitmap (ext2_filsys fs)
% EXT2_BLOCKS_PER_GROUP(fs->super);
if (nbits)
for (j = nbits; j < fs->blocksize * 8; j++)
set_bit(j, bitmap_block);
ext2fs_set_bit(j, bitmap_block);
}
retval = io_channel_write_blk(fs->io,
fs->group_desc[i].bg_block_bitmap, 1,

View File

@ -1,3 +1,7 @@
Wed Jan 31 11:06:08 1996 <tytso@rsts-11.mit.edu>
* Release of E2fsprogs version 1.02
Wed Oct 25 11:58:20 1995 <tytso@rsts-11.mit.edu>
* ss_internal.h: Removed malloc, realloc, free definitions, and

View File

@ -44,13 +44,13 @@ MK_CMDS=./mk_cmds
XTRA_CFLAGS=-DPOSIX_SIGNALS -I$(srcdir)/../et
.c.o:
$(CC) $(CFLAGS) -c $<
@PROFILE_CMT@ $(CC) $(CFLAGS) -pg -o profiled/$*.o -c $<
@CHECKER_CMT@ $(CC) $(CFLAGS) -checker -g -o checker/$*.o -c $<
@DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) $(CFLAGS) \
@DLL_CMT@ -o jump/$*.o -c $<)
@ELF_CMT@ $(CC) $(CFLAGS) -fPIC -o elfshared/$*.o -c $<
@BSDLIB_CMT@ $(CC) $(CFLAGS) -fpic -o pic/$*.o -c $<
$(CC) $(ALL_CFLAGS) -c $<
@PROFILE_CMT@ $(CC) $(ALL_CFLAGS) -pg -o profiled/$*.o -c $<
@CHECKER_CMT@ $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
@DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) \
@DLL_CMT@ $(ALL_CFLAGS) -o jump/$*.o -c $<)
@ELF_CMT@ $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
@BSDLIB_CMT@ $(CC) $(ALL_CFLAGS) -fpic -o pic/$*.o -c $<
# for the library

View File

@ -9,8 +9,8 @@
* $Locker$
*
* $Log$
* Revision 1.4 1997/04/26 14:25:12 tytso
* Checked in e2fsprogs 1.01.
* Revision 1.5 1997/04/26 14:35:55 tytso
* Checkin of e2fsprogs 1.02.
*
* Revision 1.1 1993/06/03 12:31:25 tytso
* Initial revision

View File

@ -1,3 +1,26 @@
Wed Jan 31 11:06:08 1996 <tytso@rsts-11.mit.edu>
* Release of E2fsprogs version 1.02
Tue Oct 30 21:14:12 1995 <tytso@rsts-11.mit.edu>
* mke2fs.c (check_plausibility): Add check to warn user if they
are trying to mke2fs the whole disk. (/dev/hda
vs. /dev/hda1)
Fri Dec 15 19:09:56 1995 <tytso@rsts-11.mit.edu>
* fsck.c (check_all): If we break out of the loop because we are
serializing and have just started at fsck we haven't
finished the pass. We need to go round again in case there
are more filesystems to be done in this pass. (Patch
submitted by Mike Jagdis)
Sat Dec 9 10:07:16 1995 <tytso@rsts-11.mit.edu>
* dumpe2fs.c (in_use): test_bit() was renamed to
ext2fs_test_bit().
Mon Oct 30 20:21:18 1995 <tytso@rsts-11.mit.edu>
* fsck.c (fsck_device): Check fstype instead of type; this was a

View File

@ -34,36 +34,36 @@ LIBS= -L../lib -lext2fs -le2p -lcom_err
DEPLIBS= ../lib/libext2fs.a ../lib/libe2p.a ../lib/libcom_err.a
.c.o:
$(CC) -c $(CFLAGS) $< -o $@
$(CC) -c $(ALL_CFLAGS) $< -o $@
all:: $(SPROGS) $(UPROGS) $(USPROGS)
tune2fs: $(TUNE2FS_OBJS) $(DEPLIBS)
$(CC) $(LDFLAGS) -o tune2fs $(TUNE2FS_OBJS) $(LIBS)
$(CC) $(ALL_LDFLAGS) -o tune2fs $(TUNE2FS_OBJS) $(LIBS)
mklost+found: $(MKLPF_OBJS)
$(CC) $(LDFLAGS) -o mklost+found $(MKLPF_OBJS)
$(CC) $(ALL_LDFLAGS) -o mklost+found $(MKLPF_OBJS)
mke2fs: $(MKE2FS_OBJS) $(DEPLIBS)
$(CC) $(LDFLAGS) -o mke2fs $(MKE2FS_OBJS) $(LIBS)
$(CC) $(ALL_LDFLAGS) -o mke2fs $(MKE2FS_OBJS) $(LIBS)
mke2fs.static: $(MKE2FS_OBJS) $(DEPLIBS)
$(CC) $(LDFLAGS) -static -o mke2fs.static $(MKE2FS_OBJS) $(LIBS)
$(CC) $(ALL_LDFLAGS) -static -o mke2fs.static $(MKE2FS_OBJS) $(LIBS)
chattr: $(CHATTR_OBJS) $(DEPLIBS)
$(CC) $(LDFLAGS) -o chattr $(CHATTR_OBJS) $(LIBS)
$(CC) $(ALL_LDFLAGS) -o chattr $(CHATTR_OBJS) $(LIBS)
lsattr: $(LSATTR_OBJS) $(DEPLIBS)
$(CC) $(LDFLAGS) -o lsattr $(LSATTR_OBJS) $(LIBS)
$(CC) $(ALL_LDFLAGS) -o lsattr $(LSATTR_OBJS) $(LIBS)
dumpe2fs: $(DUMPE2FS_OBJS) $(DEPLIBS)
$(CC) $(LDFLAGS) -o dumpe2fs $(DUMPE2FS_OBJS) $(LIBS)
$(CC) $(ALL_LDFLAGS) -o dumpe2fs $(DUMPE2FS_OBJS) $(LIBS)
fsck: $(FSCK_OBJS) $(DEPLIBS)
$(CC) $(LDFLAGS) -o fsck $(FSCK_OBJS) $(LIBS)
$(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS) $(LIBS)
badblocks: $(BADBLOCKS_OBJS) $(DEPLIBS)
$(CC) $(LDFLAGS) -o badblocks $(BADBLOCKS_OBJS) $(LIBS)
$(CC) $(ALL_LDFLAGS) -o badblocks $(BADBLOCKS_OBJS) $(LIBS)
installdirs:
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) \
@ -85,10 +85,10 @@ install: all $(SMANPAGES) $(UMANPAGES) installdirs
$(STRIP) $(DESTDIR)$(ubindir)/$$i; \
done
for i in $(SMANPAGES); do \
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(man8dir)/$$i; \
$(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
done
for i in $(UMANPAGES); do \
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(man1dir)/$$i; \
$(INSTALL_DATA) $$i $(DESTDIR)$(man1dir)/$$i; \
done
uninstall:

View File

@ -1,5 +1,5 @@
.\" -*- nroff -*-
.TH BADBLOCKS 8 "October 1995" "Version 1.01"
.TH BADBLOCKS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
.SH NAME
badblocks \- search a device for bad blocks
.SH SYNOPSIS

View File

@ -1,5 +1,5 @@
.\" -*- nroff -*-
.TH CHATTR 1 "October 1995" "Version 1.01"
.TH CHATTR 1 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
.SH NAME
chattr \- change file attributes on a Linux second extended file system
.SH SYNOPSIS

View File

@ -2,7 +2,7 @@
.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
.\" This file may be copied under the terms of the GNU Public License.
.\"
.TH DUMPE2FS 8 "October 1995" "Version 0.5c"
.TH DUMPE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
.SH NAME
dumpe2fs \- dump filesystem information
.SH SYNOPSIS

View File

@ -32,7 +32,7 @@
#include "../version.h"
#define in_use(m, x) (test_bit ((x), (m)))
#define in_use(m, x) (ext2fs_test_bit ((x), (m)))
const char * program_name = "dumpe2fs";
char * device_name = NULL;

View File

@ -2,7 +2,7 @@
.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
.\" This file may be copied under the terms of the GNU Public License.
.\"
.TH FSCK 8 "October 1995" "Version 0.5c"
.TH FSCK 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
.SH NAME
fsck \- check and repair a Linux file system
.SH SYNOPSIS

View File

@ -607,8 +607,11 @@ static int check_all(NOARGS)
fsck_device(fs->device);
fs->flags |= FLAG_DONE;
if (serialize)
if (serialize) {
pass_done = 0;
break; /* Only do one filesystem at a time */
}
}
inst = wait_one();
if (inst) {

View File

@ -1,5 +1,5 @@
.\" -*- nroff -*-
.TH LSATTR 1 "October 1995" "Version 1.01"
.TH LSATTR 1 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
.SH NAME
lsattr \- list file attributes on a Linux second extended file system
.SH SYNOPSIS

View File

@ -2,7 +2,7 @@
.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
.\" This file may be copied under the terms of the GNU Public License.
.\"
.TH MKE2FS 8 "October 1995" "Version 1.01"
.TH MKE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
.SH NAME
mke2fs \- create a Linux second extended file system
.SH SYNOPSIS
@ -39,6 +39,9 @@ reserved-blocks-percentage
.B \-v
]
[
.B \-F
]
[
.B \-S
]
device
@ -96,6 +99,9 @@ Quiet execution. Useful if mke2fs is run in a script.
.TP
.I -v
Verbose execution.
.IP
.I -F
Force mke2fs to run, even if the specified device
.TP
.I -S
Write superblock and group descriptors only. This is useful if all of

View File

@ -35,12 +35,16 @@
#include <malloc.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#ifdef HAVE_LINUX_FS_H
#include <linux/fs.h>
#endif
#include <linux/ext2_fs.h>
#ifdef HAVE_LINUX_MAJOR_H
#include <linux/major.h>
#endif
#include "et/com_err.h"
#include "ext2fs/ext2fs.h"
@ -59,6 +63,7 @@ int cflag = 0;
int verbose = 0;
int quiet = 0;
int super_only = 0;
int force = 0;
char *bad_blocks_filename = 0;
struct ext2_super_block param;
@ -86,6 +91,38 @@ static int log2(int arg)
return l;
}
static void check_plausibility(NOARGS)
{
#ifdef HAVE_LINUX_MAJOR_H
int val;
struct stat s;
val = stat(device_name, &s);
if(val == -1) {
perror("stat");
exit(1);
}
if(!S_ISBLK(s.st_mode)) {
printf("%s is not a block special device.\n", device_name);
printf("Proceed anyway? (y,n) ");
if (getchar() != 'y')
exit(1);
return;
}
if ((MAJOR(s.st_rdev) == HD_MAJOR && MINOR(s.st_rdev)%64 == 0) ||
(MAJOR(s.st_rdev) == SCSI_DISK_MAJOR &&
MINOR(s.st_rdev)%16 == 0)) {
printf("%s is entire device, not just one partition!\n",
device_name);
printf("Proceed anyway? (y,n) ");
if (getchar() != 'y')
exit(1);
return;
}
#endif
}
static void check_mount(NOARGS)
{
errcode_t retval;
@ -495,7 +532,7 @@ static void PRS(int argc, char *argv[])
EXT2FS_VERSION, EXT2FS_DATE);
if (argc && *argv)
program_name = *argv;
while ((c = getopt (argc, argv, "b:cf:g:i:l:m:qtvS")) != EOF)
while ((c = getopt (argc, argv, "b:cf:g:i:l:m:qtvSF")) != EOF)
switch (c) {
case 'b':
size = strtoul(optarg, &tmp, 0);
@ -575,6 +612,9 @@ static void PRS(int argc, char *argv[])
case 'q':
quiet = 1;
break;
case 'F':
force = 1;
break;
case 'S':
super_only = 1;
break;
@ -596,6 +636,8 @@ static void PRS(int argc, char *argv[])
if (optind < argc)
usage();
if (!force)
check_plausibility();
check_mount();
param.s_log_frag_size = param.s_log_block_size;

View File

@ -2,7 +2,7 @@
.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
.\" This file may be copied under the terms of the GNU Public License.
.\"
.TH MKLOST+FOUND 8 "October 1995" "Version 1.01"
.TH MKLOST+FOUND 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
.SH NAME
mklost+found \- create a lost+found directory on a mounted Linux
second extended file system

View File

@ -2,8 +2,7 @@
.\" Initial revision
.\"
.\"
.TH TUNE2FS 8 "October 1995" "Version 1.01"
.TH TUNE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
.SH NAME
tune2fs \- adjust tunable filesystem parameters on second extended filesystems
.SH SYNOPSIS

View File

@ -1,3 +1,7 @@
Wed Jan 31 11:06:08 1996 <tytso@rsts-11.mit.edu>
* Release of E2fsprogs version 1.02
Mon Sep 4 23:06:06 1995 Remy Card <card@bbj>
* Makefile.in (clean, distclean): Use the -f option when removing

View File

@ -16,5 +16,5 @@ Free blocks count wrong for group 0 (78, counted=77). FIXED
Free blocks count wrong (78, counted=77). FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32 files, 23/100 blocks
test_filesys: 11/32 files (0.0% non-contiguous), 23/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/32 files, 23/100 blocks
test_filesys: 11/32 files (0.0% non-contiguous), 23/100 blocks
Exit status is 0

View File

@ -35,5 +35,5 @@ Directories count wrong for group #0 (4, counted=3). FIXED
Free inodes count wrong (19, counted=20). FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 12/32 files, 23/100 blocks
test_filesys: 12/32 files (0.0% non-contiguous), 23/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 12/32 files, 23/100 blocks
test_filesys: 12/32 files (0.0% non-contiguous), 23/100 blocks
Exit status is 0

View File

@ -44,5 +44,5 @@ Free blocks count wrong for group 0 (72, counted=73). FIXED
Free blocks count wrong (72, counted=73). FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 16/32 files, 27/100 blocks
test_filesys: 16/32 files (0.0% non-contiguous), 27/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 16/32 files, 27/100 blocks
test_filesys: 16/32 files (0.0% non-contiguous), 27/100 blocks
Exit status is 0

View File

@ -21,5 +21,5 @@ Free inodes count wrong for group #0 (19, counted=20). FIXED
Free inodes count wrong (19, counted=20). FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 12/32 files, 23/100 blocks
test_filesys: 12/32 files (0.0% non-contiguous), 23/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 12/32 files, 23/100 blocks
test_filesys: 12/32 files (0.0% non-contiguous), 23/100 blocks
Exit status is 0

View File

@ -13,5 +13,5 @@ Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 29/32 files, 32/100 blocks
test_filesys: 29/32 files (0.0% non-contiguous), 32/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 29/32 files, 32/100 blocks
test_filesys: 29/32 files (0.0% non-contiguous), 32/100 blocks
Exit status is 0

View File

@ -21,5 +21,5 @@ Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32 files, 22/100 blocks
test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/32 files, 22/100 blocks
test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
Exit status is 0

View File

@ -33,5 +33,5 @@ Directories count wrong for group #0 (2, counted=3). FIXED
Free inodes count wrong (20, counted=19). FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 13/32 files, 24/100 blocks
test_filesys: 13/32 files (0.0% non-contiguous), 24/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 13/32 files, 24/100 blocks
test_filesys: 13/32 files (0.0% non-contiguous), 24/100 blocks
Exit status is 0

View File

@ -25,5 +25,5 @@ Free blocks count wrong for group 0 (78, counted=74). FIXED
Free blocks count wrong (78, counted=74). FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32 files, 26/100 blocks
test_filesys: 11/32 files (0.0% non-contiguous), 26/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/32 files, 26/100 blocks
test_filesys: 11/32 files (0.0% non-contiguous), 26/100 blocks
Exit status is 0

View File

@ -40,5 +40,5 @@ Free blocks count wrong for group 0 (57, counted=41). FIXED
Free blocks count wrong (57, counted=41). FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 12/32 files, 59/100 blocks
test_filesys: 12/32 files (0.0% non-contiguous), 59/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 12/32 files, 59/100 blocks
test_filesys: 12/32 files (8.3% non-contiguous), 59/100 blocks
Exit status is 0

View File

@ -9,5 +9,5 @@ Block bitmap differences: +12 -20 +41 -50. FIXED
Inode bitmap differences: +11 -15. FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32 files, 22/100 blocks
test_filesys: 11/32 files (9.1% non-contiguous), 22/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/32 files, 22/100 blocks
test_filesys: 11/32 files (9.1% non-contiguous), 22/100 blocks
Exit status is 0

View File

@ -8,5 +8,5 @@ Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 13/32 files, 24/100 blocks
test_filesys: 13/32 files (0.0% non-contiguous), 24/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 13/32 files, 24/100 blocks
test_filesys: 13/32 files (0.0% non-contiguous), 24/100 blocks
Exit status is 0

View File

@ -30,5 +30,5 @@ Padding at end of block bitmap is not set. Fix? yes
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 13/16 files, 40/100 blocks
test_filesys: 13/16 files (7.7% non-contiguous), 40/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 13/16 files, 40/100 blocks
test_filesys: 13/16 files (7.7% non-contiguous), 40/100 blocks
Exit status is 0

View File

@ -38,5 +38,5 @@ Padding at end of block bitmap is not set. Fix? yes
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 16/16 files, 78/100 blocks
test_filesys: 16/16 files (6.2% non-contiguous), 78/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 16/16 files, 78/100 blocks
test_filesys: 16/16 files (12.5% non-contiguous), 78/100 blocks
Exit status is 0

View File

@ -27,5 +27,5 @@ Free blocks count wrong for group 0 (77, counted=74). FIXED
Free blocks count wrong (77, counted=74). FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 12/32 files, 26/100 blocks
test_filesys: 12/32 files (8.3% non-contiguous), 26/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 12/32 files, 26/100 blocks
test_filesys: 12/32 files (0.0% non-contiguous), 26/100 blocks
Exit status is 0

View File

@ -17,5 +17,5 @@ Free blocks count wrong for group 0 (61, counted=64). FIXED
Free blocks count wrong (61, counted=64). FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 12/32 files, 36/100 blocks
test_filesys: 12/32 files (8.3% non-contiguous), 36/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 12/32 files, 36/100 blocks
test_filesys: 12/32 files (8.3% non-contiguous), 36/100 blocks
Exit status is 0

View File

@ -10,5 +10,5 @@ Padding at end of block bitmap is not set. Fix? yes
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 12/16 files, 37/100 blocks
test_filesys: 12/16 files (0.0% non-contiguous), 37/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 12/16 files, 37/100 blocks
test_filesys: 12/16 files (0.0% non-contiguous), 37/100 blocks
Exit status is 0

View File

@ -583,5 +583,5 @@ Directories count wrong for group #0 (2, counted=3). FIXED
Free inodes count wrong (1, counted=0). FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 104/104 files, 33/100 blocks
test_filesys: 104/104 files (0.0% non-contiguous), 33/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 104/104 files, 33/100 blocks
test_filesys: 104/104 files (0.0% non-contiguous), 33/100 blocks
Exit status is 0

View File

@ -27,5 +27,5 @@ Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32 files, 22/100 blocks
test_filesys: 11/32 files (9.1% non-contiguous), 22/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/32 files, 22/100 blocks
test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
Exit status is 0

View File

@ -15,5 +15,5 @@ Padding at end of block bitmap is not set. Fix? yes
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32 files, 22/100 blocks
test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/32 files, 22/100 blocks
test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
Exit status is 0

View File

@ -12,5 +12,5 @@ Fix summary information? yes
Inode bitmap differences: +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11. FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32 files, 22/100 blocks
test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/32 files, 22/100 blocks
test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
Exit status is 0

View File

@ -42,5 +42,5 @@ Free inodes count wrong for group #0 (20, counted=21). FIXED
Free inodes count wrong (20, counted=21). FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32 files, 42/100 blocks
test_filesys: 11/32 files (0.0% non-contiguous), 42/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/32 files, 42/100 blocks
test_filesys: 11/32 files (0.0% non-contiguous), 42/100 blocks
Exit status is 0

View File

@ -35,5 +35,5 @@ Padding at end of block bitmap is not set. Fix? yes
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 15/16 files, 62/100 blocks
test_filesys: 15/16 files (6.7% non-contiguous), 62/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 15/16 files, 62/100 blocks
test_filesys: 15/16 files (6.7% non-contiguous), 62/100 blocks
Exit status is 0

View File

@ -29,5 +29,5 @@ Free blocks count wrong for group 0 (68, counted=75). FIXED
Free blocks count wrong (68, counted=75). FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 29/32 files, 25/100 blocks
test_filesys: 29/32 files (3.4% non-contiguous), 25/100 blocks
Exit status is 1

View File

@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 29/32 files, 25/100 blocks
test_filesys: 29/32 files (0.0% non-contiguous), 25/100 blocks
Exit status is 0

Some files were not shown because too many files have changed in this diff Show More