Merge branch 'maint' into next

Conflicts:

	configure
	lib/ext2fs/ext2_fs.h
	misc/e2image.c
bitmap-optimize
Theodore Ts'o 2008-01-27 20:09:05 -05:00
commit 428f6b32a9
53 changed files with 1075 additions and 321 deletions

1
.gitignore vendored
View File

@ -112,3 +112,4 @@ tests/progs/test_icount_cmds.c
util/gen-tarball
util/subst
util/subst.conf
Meta

View File

@ -76,8 +76,8 @@ LIBSS = $(LIB)/libss@LIB_EXT@
LIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@
LIBE2P = $(LIB)/libe2p@LIB_EXT@
LIBEXT2FS = $(LIB)/libext2fs@LIB_EXT@
LIBUUID = $(LIB)/libuuid@LIB_EXT@ @SOCKET_LIB@
LIBBLKID = $(LIB)/libblkid@LIB_EXT@
LIBUUID = $(LIB)/libuuid@LIB_EXT@ @SOCKET_LIB@
LIBBLKID = $(LIB)/libblkid@LIB_EXT@ @STATIC_BLKID_DEVMAPPER_LIBS@
LIBINTL = @LIBINTL@
DEPLIBUUID = $(LIB)/libuuid@LIB_EXT@
DEPLIBBLKID = $(LIB)/libblkid@LIB_EXT@

View File

@ -99,8 +99,9 @@ mostlyclean: mostlyclean-recursive mostlyclean-local
clean: clean-recursive clean-local clean-doc
$(RM) -f $(SUBS)
distclean: distclean-doc distclean-recursive distclean-local
distclean: distclean-doc distclean-recursive
$(RM) -rf autom4te.cache e2fsprogs.spec ext2ed/Makefile po/stamp-po
$(MAKE) distclean-local
realclean: realclean-recursive realclean-local

View File

@ -1,3 +1,92 @@
E2fsprogs 1.40.5 (January 27, 2008)
===================================
Fix a potential overflow big in e2image if the device name is too
long.
Mke2fs will now create new filesystems with 256 byte inodes and the
ext_attr feature flag by default. This allows for much better future
compatibity with ext4 and speeds up extended attributes even on ext3
filesystems.
Teach e2fsck to ignore certain "safe" filesystem features which are
set automatically by the kernel. Having the kernel set features
automagically behind the user's back is a bad idea, and we should try
to break the kernel of this habit, especially for the newer ext4
feature flags. But for now, we will try to avoid needless full checks
which can annoy users who are doing fresh installs.
Add support in tune2fs and mke2fs for making a filesystem as being "ok
to be used with test kernel code". This will be needed for using test
filesystems with the latest ext4 kernel code.
Change e2fsck -fD so that it sorts non-htree directories by inode
numbers instead of by name, since that optimizes performances much
more significantly. (Addresses-Sourceforge-Feature-Request: #532439)
If e2image fills the disk, fix it so it exits right away instead of
spewing large numbers of error messages.
(Addresses-Sourceforge-Feature-Request: #606508)
If ftruncate64() is not available for resize2fs, let it use ftrucate()
instead, but have it check to see if the size would get truncated, and
skip calling ftruncate in that case.
Add support for detecting HFS+ filesystems in the blkid library.
Add supprt in the blkid library for ext4/ext4dev filesystems.
Fix a bug in blkid where it could die on a floating point exception
when presented with a corrupt reiserfs image.
Fix blkid's handling of ntfs UUID's so that leading zeros are printed
such that UUID string is a fixed length.
Add sample python bindings for the uuid library to the contrib
directory. (Addresses-Sourceforge-Patches: #778817)
Fix debugfs's 'lsdel' command so it uses ext2fs_block_iterate2 so it
will work with large files. (Addresses Sourceforge Feature Request:
#1257500 and Sourceforge Support Request: #1253511)
Allow the debugfs 'undel' command to undelete an inode without linking
it to a specific destination directory, since this might require
allocating blocks that could overwrite some yet-to-be-recovered
deleted files. (Addresses-Sourceforge-Feature-Request: #967141)
Update Swedish translations from the Translation Project.
Programmer's Notes:
-------------------
Fix configure handling of --sbindir (which should rarely be used, but
someone did complain, so let's fix it). (Addresses Sourceforge Bug:
#498381)
Updated e2fsprogs.spec file to include a new uuidd package
Use pkg-config to determine where to find the devmapper library so we
can find out where it is located on different distributions.
Fix Makefile race so that "make -j3 distclean" works correctly
Fix portability problems on non-Linux/non-Hurd/non-Masix systems,
especially on MacOS X systems. (Addresses Sourceforge Bugs: #1861633,
#1819034, #1863819)
Fixed spelling mistakes, typos, and otherwise clarified man pages.
Fixed various Debian packaging issues --- see debian/changelog for
details. (Addresses Debian Bugs: #459403, #459475, #459614)
Remove the --enable-dynamic-static configure option, and build e2fsck
dynamically by default. If the user wants e2fsck.static, he/she will
need to build it via "make -C e2fsck e2fsck.static"
Fix various build warnings due to missing prototypes.
(Addresses Sourceforge Patch: #1861663, #1861659)
E2fsprogs 1.40.4 (December 31, 2007)
====================================

45
aclocal.m4 vendored
View File

@ -2649,3 +2649,48 @@ AC_DEFUN([AX_TLS], [
fi
AC_MSG_RESULT($ac_cv_tls)
])
# Excerpted from pkg.m4 - Macros to locate and utilise pkg-config
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG

271
configure vendored
View File

@ -687,15 +687,16 @@ PROFILED_LIB_EXT
DEBUGFS_CMT
IMAGER_CMT
RESIZER_CMT
E2FSCK_TYPE
FSCK_PROG
FSCK_MAN
E2INITRD_PROG
E2INITRD_MAN
PKG_CONFIG
DEVMAPPER_REQ
DEVMAPPER_PC_LIBS
DEVMAPPER_LIBS
STATIC_DEVMAPPER_LIBS
STATIC_BLKID_DEVMAPPER_LIBS
UUIDD_CMT
GETTEXT_PACKAGE
PACKAGE
@ -785,7 +786,8 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
CPP'
CPP
PKG_CONFIG'
# Initialize some variables set by options.
@ -1371,7 +1373,6 @@ Optional Features:
--disable-debugfs disable support of debugfs program
--disable-imager disable support of e2image program
--disable-resizer disable support of e2resize program
--enable-dynamic-e2fsck build e2fsck dynamically
--enable-fsck build fsck wrapper program
--enable-e2initrd-helper build e2initrd-helper program
--enable-blkid-devmapper build with device-mapper support
@ -1405,6 +1406,7 @@ Some influential environment variables:
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
PKG_CONFIG path to pkg-config utility
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@ -3833,6 +3835,7 @@ echo "Enabling htree directory support by default"
fi
E2_PKG_CONFIG_STATIC=--static
# Check whether --enable-elf-shlibs was given.
if test "${enable_elf_shlibs+set}" = set; then
enableval=$enable_elf_shlibs; if test "$enableval" = "no"
@ -3841,6 +3844,7 @@ then
MAKEFILE_ELF=/dev/null
echo "Disabling ELF shared libraries"
else
E2_PKG_CONFIG_STATIC=
ELF_CMT=
MAKEFILE_ELF=$srcdir/lib/Makefile.elf-lib
case "$host_os" in
@ -3870,6 +3874,7 @@ then
MAKEFILE_BSDLIB=/dev/null
echo "Disabling BSD shared libraries"
else
E2_PKG_CONFIG_STATIC=
BSDLIB_CMT=
MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib
LIB_EXT=.so
@ -4047,24 +4052,6 @@ RESIZER_CMT=
fi
# Check whether --enable-dynamic-e2fsck was given.
if test "${enable_dynamic_e2fsck+set}" = set; then
enableval=$enable_dynamic_e2fsck; if test "$enableval" = "no"
then
E2FSCK_TYPE=static
echo "Building e2fsck statically"
else
E2FSCK_TYPE=shared
echo "Building e2fsck dynamically"
fi
else
E2FSCK_TYPE=static
echo "Building e2fsck statically by default"
fi
# Check whether --enable-fsck was given.
if test "${enable_fsck+set}" = set; then
enableval=$enable_fsck; if test "$enableval" = "no"
@ -4110,6 +4097,7 @@ fi
STATIC_BLKID_DEVMAPPER_LIBS=''
# Check whether --enable-blkid-devmapper was given.
if test "${enable_blkid_devmapper+set}" = set; then
enableval=$enable_blkid_devmapper; if test "$enableval" = "no"
@ -4125,11 +4113,217 @@ _ACEOF
echo "Enabling device-mapper support"
DEVMAPPER_REQ='libselinux libsepol'
DEVMAPPER_PC_LIBS='-ldevmapper'
DEVMAPPER_LIBS='-ldevmapper -lselinux -lsepol -lpthread'
STATIC_DEVMAPPER_LIBS='/usr/lib/libdevmapper.a /usr/lib/libselinux.a /usr/lib/libsepol.a -lpthread'
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
fi
if test -z "$ac_cv_path_PKG_CONFIG"; then
ac_pt_PKG_CONFIG=$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
{ echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
if test "x$ac_pt_PKG_CONFIG" = x; then
PKG_CONFIG=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
PKG_CONFIG=$ac_pt_PKG_CONFIG
fi
else
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=0.9.0
{ echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
PKG_CONFIG=""
fi
fi
if test -z "$PKG_CONFIG"; then
echo "pkg-config not installed; please install it."
exit 1;
fi
{ echo "$as_me:$LINENO: checking for dm_tree_create in -ldevmapper" >&5
echo $ECHO_N "checking for dm_tree_create in -ldevmapper... $ECHO_C" >&6; }
if test "${ac_cv_lib_devmapper_dm_tree_create+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldevmapper $DEVMAPPER_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char dm_tree_create ();
int
main ()
{
return dm_tree_create ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_devmapper_dm_tree_create=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_devmapper_dm_tree_create=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_devmapper_dm_tree_create" >&5
echo "${ECHO_T}$ac_cv_lib_devmapper_dm_tree_create" >&6; }
if test $ac_cv_lib_devmapper_dm_tree_create = yes; then
DEVMAPPER_LIBS=`$PKG_CONFIG --libs devmapper`;
STATIC_DEVMAPPER_LIBS=`$PKG_CONFIG --static --libs devmapper`;
DEVMAPPER_REQ="devmapper";
DEVMAPPER_PC_LIBS="-ldevmapper"
else
{ { echo "$as_me:$LINENO: error: device-mapper library not found" >&5
echo "$as_me: error: device-mapper library not found" >&2;}
{ (exit 1); exit 1; }; }
fi
# work around stupid devmapper.pc bug in Debian
case "$STATIC_DEVMAPPER_LIBS" in
*pthread*)
;;
*)
echo "Working around Debian bug #390243..."
STATIC_DEVMAPPER_LIBS="-pthread $STATIC_DEVMAPPER_LIBS"
;;
esac
if test "$E2_PKG_CONFIG_STATIC" = "--static"; then
DEVMAPPER_LIBS="$STATIC_DEVMAPPER_LIBS"
STATIC_BLKID_DEVMAPPER_LIBS="$STATIC_DEVMAPPER_LIBS"
fi
fi
else
@ -4141,6 +4335,7 @@ fi
# Check whether --enable-tls was given.
if test "${enable_tls+set}" = set; then
enableval=$enable_tls; if test "$enableval" = "no"
@ -14617,7 +14812,8 @@ fi
for ac_func in chflags getrusage llseek lseek64 open64 fstat64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid
for ac_func in chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
@ -14948,6 +15144,22 @@ else
root_libdir='${root_prefix}/lib'
root_sysconfdir='${root_prefix}/etc'
fi
if test "$bindir" != '${exec_prefix}/bin'; then
root_bindir=$bindir
echo "Setting root_bindir to $root_bindir"
fi
if test "$sbindir" != '${exec_prefix}/sbin'; then
root_sbindir=$sbindir
echo "Setting root_sbindir to $root_sbindir"
fi
if test "$libdir" != '${exec_prefix}/lib'; then
root_libdir=$libdir
echo "Setting root_libdir to $root_libdir"
fi
if test "$sysconfdir" != '${prefix}/etc'; then
root_sysconfdir=$sysconfdir
echo "Setting root_sysconfdir to $root_sysconfdir"
fi
@ -15796,8 +16008,8 @@ PROFILED_LIB_EXT!$PROFILED_LIB_EXT$ac_delim
DEBUGFS_CMT!$DEBUGFS_CMT$ac_delim
IMAGER_CMT!$IMAGER_CMT$ac_delim
RESIZER_CMT!$RESIZER_CMT$ac_delim
E2FSCK_TYPE!$E2FSCK_TYPE$ac_delim
FSCK_PROG!$FSCK_PROG$ac_delim
FSCK_MAN!$FSCK_MAN$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 76; then
@ -15867,13 +16079,14 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
FSCK_MAN!$FSCK_MAN$ac_delim
E2INITRD_PROG!$E2INITRD_PROG$ac_delim
E2INITRD_MAN!$E2INITRD_MAN$ac_delim
PKG_CONFIG!$PKG_CONFIG$ac_delim
DEVMAPPER_REQ!$DEVMAPPER_REQ$ac_delim
DEVMAPPER_PC_LIBS!$DEVMAPPER_PC_LIBS$ac_delim
DEVMAPPER_LIBS!$DEVMAPPER_LIBS$ac_delim
STATIC_DEVMAPPER_LIBS!$STATIC_DEVMAPPER_LIBS$ac_delim
STATIC_BLKID_DEVMAPPER_LIBS!$STATIC_BLKID_DEVMAPPER_LIBS$ac_delim
UUIDD_CMT!$UUIDD_CMT$ac_delim
GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
PACKAGE!$PACKAGE$ac_delim
@ -15950,7 +16163,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 81; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 82; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

View File

@ -207,6 +207,10 @@ echo "Enabling htree directory support by default"
)
AC_SUBST(HTREE_CMT)
dnl
dnl This needs to be before all of the --enable-*-shlibs options
dnl
E2_PKG_CONFIG_STATIC=--static
dnl
dnl handle --enable-elf-shlibs
dnl
AC_ARG_ENABLE([elf-shlibs],
@ -217,6 +221,7 @@ then
MAKEFILE_ELF=/dev/null
echo "Disabling ELF shared libraries"
else
E2_PKG_CONFIG_STATIC=
ELF_CMT=
MAKEFILE_ELF=$srcdir/lib/Makefile.elf-lib
[case "$host_os" in
@ -246,6 +251,7 @@ then
MAKEFILE_BSDLIB=/dev/null
echo "Disabling BSD shared libraries"
else
E2_PKG_CONFIG_STATIC=
BSDLIB_CMT=
MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib
LIB_EXT=.so
@ -415,24 +421,6 @@ RESIZER_CMT=
)
AC_SUBST(RESIZER_CMT)
dnl
dnl handle --enable-dynamic-e2fsck
dnl
AC_ARG_ENABLE([dynamic-e2fsck],
[ --enable-dynamic-e2fsck build e2fsck dynamically],
if test "$enableval" = "no"
then
E2FSCK_TYPE=static
echo "Building e2fsck statically"
else
E2FSCK_TYPE=shared
echo "Building e2fsck dynamically"
fi
,
E2FSCK_TYPE=static
echo "Building e2fsck statically by default"
)
AC_SUBST(E2FSCK_TYPE)
dnl
dnl See whether to install the `fsck' wrapper program (that calls e2fsck)
dnl
AC_ARG_ENABLE([fsck],
@ -479,6 +467,7 @@ AC_SUBST(E2INITRD_PROG)
AC_SUBST(E2INITRD_MAN)
dnl handle --enable-blkid-devmapper
dnl
STATIC_BLKID_DEVMAPPER_LIBS=''
AC_ARG_ENABLE([blkid-devmapper],
[ --enable-blkid-devmapper build with device-mapper support],
[if test "$enableval" = "no"
@ -491,11 +480,33 @@ else
AC_DEFINE(HAVE_DEVMAPPER)
echo "Enabling device-mapper support"
DEVMAPPER_REQ='libselinux libsepol'
DEVMAPPER_PC_LIBS='-ldevmapper'
DEVMAPPER_LIBS='-ldevmapper -lselinux -lsepol -lpthread'
STATIC_DEVMAPPER_LIBS='/usr/lib/libdevmapper.a /usr/lib/libselinux.a /usr/lib/libsepol.a -lpthread'
PKG_PROG_PKG_CONFIG()
if test -z "$PKG_CONFIG"; then
echo "pkg-config not installed; please install it."
exit 1;
fi
AC_CHECK_LIB(devmapper, dm_tree_create,
[DEVMAPPER_LIBS=`$PKG_CONFIG --libs devmapper`;
STATIC_DEVMAPPER_LIBS=`$PKG_CONFIG --static --libs devmapper`;
DEVMAPPER_REQ="devmapper";
DEVMAPPER_PC_LIBS="-ldevmapper"],
[AC_MSG_ERROR([device-mapper library not found])],
[$DEVMAPPER_LIBS])
# work around stupid devmapper.pc bug in Debian
case "$STATIC_DEVMAPPER_LIBS" in
*pthread*)
;;
*)
echo "Working around Debian bug #390243..."
STATIC_DEVMAPPER_LIBS="-pthread $STATIC_DEVMAPPER_LIBS"
;;
esac
if test "$E2_PKG_CONFIG_STATIC" = "--static"; then
DEVMAPPER_LIBS="$STATIC_DEVMAPPER_LIBS"
STATIC_BLKID_DEVMAPPER_LIBS="$STATIC_DEVMAPPER_LIBS"
fi
fi]
,
echo "Disabling device-mapper support by default"
@ -504,6 +515,7 @@ AC_SUBST(DEVMAPPER_REQ)
AC_SUBST(DEVMAPPER_PC_LIBS)
AC_SUBST(DEVMAPPER_LIBS)
AC_SUBST(STATIC_DEVMAPPER_LIBS)
AC_SUBST(STATIC_BLKID_DEVMAPPER_LIBS)
dnl
dnl
dnl
@ -697,7 +709,7 @@ AC_CHECK_MEMBER(struct sockaddr.sa_len,
[#include <sys/types.h>
#include <sys/socket.h>])
dnl
AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 fstat64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid)
AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid)
dnl
dnl Check to see if -lsocket is required (solaris) to make something
dnl that uses socket() to compile; this is needed for the UUID library
@ -803,6 +815,22 @@ else
root_libdir='${root_prefix}/lib'
root_sysconfdir='${root_prefix}/etc'
fi
if test "$bindir" != '${exec_prefix}/bin'; then
root_bindir=$bindir
echo "Setting root_bindir to $root_bindir"
fi
if test "$sbindir" != '${exec_prefix}/sbin'; then
root_sbindir=$sbindir
echo "Setting root_sbindir to $root_sbindir"
fi
if test "$libdir" != '${exec_prefix}/lib'; then
root_libdir=$libdir
echo "Setting root_libdir to $root_libdir"
fi
if test "$sysconfdir" != '${prefix}/etc'; then
root_sysconfdir=$sysconfdir
echo "Setting root_sysconfdir to $root_sysconfdir"
fi
AC_SUBST(root_prefix)
AC_SUBST(root_bindir)
AC_SUBST(root_sbindir)

11
contrib/python-uuid/setup.py Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/python
from distutils.core import setup, Extension
uuid = Extension('e2fsprogs_uuid',
sources = ['uuid.c'],
libraries = ['uuid'])
setup (name = 'e2fsprogs_uuid',
version = '1.0',
description = 'This is python uuid interface',
ext_modules = [uuid])

18
contrib/python-uuid/test.py Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/python
import e2fsprogs_uuid
import time
print "Generating uuid...",
try:
time = time.time()
u = e2fsprogs_uuid.generate()
except:
u = "FAIL"
print u, "...", time
print "Calling generate with param...",
try:
e2fsprogs_uuid.generate("param")
print "FAIL."
except:
print "OK"

View File

@ -0,0 +1,23 @@
#include <Python.h>
#include <time.h>
#include <uuid/uuid.h>
static PyObject * _uuid_generate(PyObject *self, PyObject *args)
{
uuid_t u;
char uuid[37];
if (!PyArg_ParseTuple(args, "")) return NULL;
uuid_generate(u);
uuid_unparse(u, uuid);
return Py_BuildValue("s", uuid);
}
static PyMethodDef _uuid_methods[] = {
{"generate", _uuid_generate, METH_VARARGS, "Generate UUID"},
{NULL, NULL, 0, NULL}
};
void inite2fsprogs_uuid(void)
{
(void) Py_InitModule("e2fsprogs_uuid", _uuid_methods);
}

37
debian/changelog vendored
View File

@ -1,3 +1,38 @@
e2fsprogs (1.40.5-1) unstable; urgency=low
* New upstream release.
* Mke2fs will now create new filesystems with 256 byte inodes and the
ext_attr feature flag by default. This allows for much better
future compatibity with ext4 and speeds up extended attributes
even on ext3 filesystems.
* Teach mke2fs and tune2fs to set a "test_fs" flag, which indicates
that it is ok to use the filesystem on in-development kernel
code (i.e., ext4dev)
* E2fsck now optimizes non-htree directories by sorting them by inode
number.
* Add support for detecting HFS+ and ext4/ext4dev filesystems in blkid
* Fix blkid's ntfs UUID handling so it is compatible with vol_id
* Avoid a floating point exception when blkid tries to probe a corrpt
reiserfs filesystem.
* Fix potential overflow problem in e2image if the device name is
too long.
* Cause e2image to exit immediately with an error message on a disk
full situation.
* Fix a minor typos in the resize2fs and uuidd manpages.
* E2fsck will no longer backup superblocks when the kernel makes
certain "safe" feature set changes behind the user's back.
* Fix debugfs's lsdel command so it works on large files
* Allow a user to undelete an inode with linking to a destination
directory.
* Update Swedish translation file from the Translation Project
* The libuuid1 and uuid-runtime packages requires passwd package, so
declare it as a dependency. (Closes: #459403)
* Fix a FTBFS problem on x86_64 caused by the fact that dietlibc
doesn't provide llseek on the x86_64. (Closes: #459614)
* Don't use dietlibc on platforms that don't support it (Closes: #459475)
-- Theodore Y. Ts'o <tytso@mit.edu> Sun, 27 Jan 2008 16:57:34 -0500
e2fsprogs (1.40.4-1) unstable; urgency=low
* Make sure that programs like tune2fs, when modifying a mounted
@ -426,7 +461,7 @@ e2fsprogs (1.38+1.39-WIP-2005.12.10-1) unstable; urgency=low
* Updated Dutch translation
* E2fsck will stop and print a warning if the user tries running a
read/write badblocks test on a read-only mounted root filesystem.
* Add resize2fs and badblocks to the e2fsprogs udeb
* Add resize2fs and badblocks to the e2fsprogs udeb
(Closes: #290429, #310950)
* Avoid trying to mount the root device if it is an NFS device.
(Closes: #310428)

6
debian/control vendored
View File

@ -2,7 +2,7 @@ Source: e2fsprogs
Section: admin
Priority: required
Maintainer: Theodore Y. Ts'o <tytso@mit.edu>
Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, dietlibc-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libsepol1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libdevmapper-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libselinux1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], debhelper (>= 4)
Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, pkg-config, dietlibc-dev [alpha amd64 arm hppa i386 ia64 mips mipsel powerpc ppc64 s390 sparc], libsepol1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libdevmapper-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libselinux1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], debhelper (>= 4)
Standards-Version: 3.7.3.0
Package: e2fsck-static
@ -77,7 +77,7 @@ Description: command-line interface parsing library - headers and static librari
Package: libuuid1
Section: libs
Priority: required
Depends: ${shlibs:Depends}
Depends: passwd, ${shlibs:Depends}
Recommends: uuid-runtime
Replaces: e2fsprogs (<< 1.34-1)
Architecture: any
@ -88,7 +88,7 @@ Description: universally unique id library
Package: uuid-runtime
Section: libs
Priority: optional
Depends: libuuid1 (>> 1.40.3-1), ${shlibs:Depends}
Depends: passwd, libuuid1 (>> 1.40.3-1), ${shlibs:Depends}
Replaces: e2fsprogs (<= 1.40.3-1ubuntu1)
Architecture: any
Description: universally unique id library

View File

@ -1,5 +1,6 @@
#!/bin/sh
set -e
groupadd -f -K GID_MIN=1 -K GID_MAX=999 libuuid
if ! grep -q libuuid /etc/passwd; then
useradd -d /var/lib/libuuid -K UID_MIN=1 -K UID_MAX=499 -g libuuid libuuid

49
debian/rules vendored
View File

@ -97,8 +97,7 @@ endif
BF_CCOPTS = -Os -fomit-frame-pointer
COMMON_CONF_FLAGS = \
--enable-elf-shlibs --enable-dynamic-e2fsck \
--infodir=/usr/share/info --enable-fsck
--enable-elf-shlibs --infodir=/usr/share/info --enable-fsck
STD_CONF_FLAGS = --with-ccopts="${CCOPTS}" --enable-compression \
${DEVMAPPER}
@ -112,7 +111,7 @@ STATIC_CONF_FLAGS = --with-ccopts="${CCOPTS}" \
--disable-nls --disable-imager \
--disable-uuidd --disable-tls \
--disable-e2initrd-helper \
--with-diet-libc --with-ccopts=-fno-stack-protector
--with-ccopts=-fno-stack-protector
MIPS_NOPIC_CONF_FLAGS = --with-ccopts="${CCOPTS}" \
--disable-nls --disable-imager \
@ -179,6 +178,9 @@ ${CFGSTATICSTAMP}:
mkdir -p ${staticbuilddir}
ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
if type diet > /dev/null 2>&1 ; then \
STATIC_CONF_FLAGS="$STATIC_CONF_FLAGS --with-diet-libc"; \
fi
cd ${staticbuilddir} && AWK=/usr/bin/awk \
${topdir}/configure ${STATIC_CONF_FLAGS}
else
@ -194,21 +196,22 @@ build: build-std build-bf $(BUILD_STATIC)
build-std: ${BUILDSTDSTAMP}
${BUILDSTDSTAMP}: ${CFGSTDSTAMP}
dh_testdir
make -C ${stdbuilddir} all
$(MAKE) -C ${stdbuilddir} all
$(MAKE) -C ${stdbuilddir}/e2fsck e2fsck.static
( cd ${stdbuilddir}/doc && \
texi2html -split_chapter ${topdir}/doc/libext2fs.texinfo )
( cd ${stdbuilddir}/lib/et && make com_err.info && \
( cd ${stdbuilddir}/lib/et && $(MAKE) com_err.info && \
texi2html -split_chapter -expandinfo ${topdir}/lib/et/com_err.texinfo )
# specially-built MIPS libs
ifneq ($(ismips),)
make -C ${mipsbuilddir}/util
make -C ${mipsbuilddir} \
$(MAKE) -C ${mipsbuilddir}/util
$(MAKE) -C ${mipsbuilddir} \
CFLAGS="${CCOPTS} ${MIPS_CFLAGS}" \
LIB_SUBDIRS="lib/et lib/ext2fs" libs
make -C ${mipsbuilddir64}/util
make -C ${mipsbuilddir64} \
$(MAKE) -C ${mipsbuilddir64}/util
$(MAKE) -C ${mipsbuilddir64} \
CFLAGS="${CCOPTS} ${MIPS_CFLAGS_64}" \
LIB_SUBDIRS="lib/et lib/ext2fs" libs
endif
@ -218,24 +221,24 @@ endif
build-bf: ${BUILDBFSTAMP}
${BUILDBFSTAMP}: ${CFGBFSTAMP}
dh_testdir
make -C ${bfbuilddir} libs
make -C ${bfbuilddir}/e2fsck all
make -C ${bfbuilddir}/misc all
$(MAKE) -C ${bfbuilddir} libs
$(MAKE) -C ${bfbuilddir}/e2fsck all
$(MAKE) -C ${bfbuilddir}/misc all
touch ${BUILDBFSTAMP}
build-static: ${BUILDSTATICSTAMP}
${BUILDSTATICSTAMP}: ${CFGSTATICSTAMP}
dh_testdir
make -C ${staticbuilddir} libs
make -C ${staticbuilddir}/e2fsck all
$(MAKE) -C ${staticbuilddir} libs
$(MAKE) -C ${staticbuilddir}/e2fsck all e2fsck.static
touch ${BUILDSTATICSTAMP}
clean:
dh_testdir
rm -rf ${STAMPSDIR}
[ ! -f ${stdbuilddir}/Makefile ] || make -C ${stdbuilddir} distclean
[ ! -f ${bfbuilddir}/Makefile ] || make -C ${bfbuilddir} distclean
[ ! -f ${staticbuilddir}/Makefile ] || make -C ${staticbuilddir} distclean
[ ! -f ${stdbuilddir}/Makefile ] || $(MAKE) -C ${stdbuilddir} distclean
[ ! -f ${bfbuilddir}/Makefile ] || $(MAKE) -C ${bfbuilddir} distclean
[ ! -f ${staticbuilddir}/Makefile ] || $(MAKE) -C ${staticbuilddir} distclean
rm -rf ${stdbuilddir} ${bfbuilddir} ${staticbuilddir} ${mipsbuilddir} ${mipsbuilddir64}
rm -f doc/libext2fs/*.html lib/et/com_err/*.html debian/*.substvars
dh_clean
@ -257,10 +260,10 @@ install-std: build
dh_installdirs
mkdir -p ${tmpdir}/sbin
make -C ${stdbuilddir} install DESTDIR=${tmpdir} \
$(MAKE) -C ${stdbuilddir} install DESTDIR=${tmpdir} \
INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
# static libs and .h files
make -C ${stdbuilddir} install-libs DESTDIR=${tmpdir} LDCONFIG=true
$(MAKE) -C ${stdbuilddir} install-libs DESTDIR=${tmpdir} LDCONFIG=true
# statically-linked fsck
${INSTALL_PROGRAM} $(E2FSCK_STATIC) ${tmpdir}/sbin
@ -284,13 +287,13 @@ install-udeb: build
dh_testdir
dh_testroot
make -C ${bfbuilddir} install-shlibs-libs-recursive DESTDIR=${udebdir} \
$(MAKE) -C ${bfbuilddir} install-shlibs-libs-recursive DESTDIR=${udebdir} \
INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
make -C ${bfbuilddir}/e2fsck install DESTDIR=${udebdir} \
$(MAKE) -C ${bfbuilddir}/e2fsck install DESTDIR=${udebdir} \
INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
make -C ${bfbuilddir}/misc install DESTDIR=${udebdir} \
$(MAKE) -C ${bfbuilddir}/misc install DESTDIR=${udebdir} \
INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
make -C ${bfbuilddir}/resize install DESTDIR=${udebdir} \
$(MAKE) -C ${bfbuilddir}/resize install DESTDIR=${udebdir} \
INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
rm -rf ${udebdir}/usr

View File

@ -1,5 +1,6 @@
#!/bin/sh
set -e
groupadd -f -K GID_MIN=1 -K GID_MAX=999 libuuid
if ! grep -q libuuid /etc/passwd; then
useradd -d /var/lib/libuuid -K UID_MIN=1 -K UID_MAX=499 -g libuuid libuuid

View File

@ -26,15 +26,15 @@ struct deleted_info {
__u32 uid;
__u64 size;
time_t dtime;
int num_blocks;
int free_blocks;
e2_blkcnt_t num_blocks;
e2_blkcnt_t free_blocks;
};
struct lsdel_struct {
ext2_ino_t inode;
int num_blocks;
int free_blocks;
int bad_blocks;
e2_blkcnt_t num_blocks;
e2_blkcnt_t free_blocks;
e2_blkcnt_t bad_blocks;
};
static int deleted_info_compare(const void *a, const void *b)
@ -49,7 +49,9 @@ static int deleted_info_compare(const void *a, const void *b)
static int lsdel_proc(ext2_filsys fs,
blk_t *block_nr,
int blockcnt EXT2FS_ATTR((unused)),
e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
blk_t ref_block EXT2FS_ATTR((unused)),
int ref_offset EXT2FS_ATTR((unused)),
void *private)
{
struct lsdel_struct *lsd = (struct lsdel_struct *) private;
@ -138,11 +140,11 @@ void do_lsdel(int argc, char **argv)
lsd.free_blocks = 0;
lsd.bad_blocks = 0;
retval = ext2fs_block_iterate(current_fs, ino, 0, block_buf,
lsdel_proc, &lsd);
retval = ext2fs_block_iterate2(current_fs, ino, 0, block_buf,
lsdel_proc, &lsd);
if (retval) {
com_err("ls_deleted_inodes", retval,
"while calling ext2fs_block_iterate");
"while calling ext2fs_block_iterate2");
goto next;
}
if (lsd.free_blocks && !lsd.bad_blocks) {
@ -184,16 +186,17 @@ void do_lsdel(int argc, char **argv)
out = open_pager();
fprintf(out, " Inode Owner Mode Size Blocks Time deleted\n");
fprintf(out, " Inode Owner Mode Size Blocks Time deleted\n");
qsort(delarray, num_delarray, sizeof(struct deleted_info),
deleted_info_compare);
for (i = 0; i < num_delarray; i++) {
fprintf(out, "%6u %6d %6o %6llu %4d/%4d %s", delarray[i].ino,
delarray[i].uid, delarray[i].mode, delarray[i].size,
delarray[i].free_blocks, delarray[i].num_blocks,
time_to_string(delarray[i].dtime));
fprintf(out, "%6u %6d %6o %6llu %6lld/%6lld %s",
delarray[i].ino,
delarray[i].uid, delarray[i].mode, delarray[i].size,
delarray[i].free_blocks, delarray[i].num_blocks,
time_to_string(delarray[i].dtime));
}
fprintf(out, "%d deleted inodes found.\n", num_delarray);
close_pager(out);

View File

@ -1,7 +1,7 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename libext2fs.info
@settitle The EXT2FS Library (version 1.40.4)
@settitle The EXT2FS Library (version 1.40.5)
@synindex tp fn
@comment %**end of header
@ -59,8 +59,8 @@ by the author.
@title The EXT2FS Library
@subtitle The EXT2FS Library
@subtitle Version 1.40.4
@subtitle December 2007
@subtitle Version 1.40.5
@subtitle January 2008
@author by Theodore Ts'o
@ -101,7 +101,7 @@ by the Foundation.
@top The EXT2FS Library
This manual documents the EXT2FS Library, version 1.40.4.
This manual documents the EXT2FS Library, version 1.40.5.
@end ifinfo

View File

@ -103,7 +103,7 @@ SRCS= $(srcdir)/e2fsck.c \
prof_err.c \
$(MTRACE_SRC)
all:: profiled $(PROGS) e2fsck.static e2fsck.shared $(MANPAGES) $(FMANPAGES)
all:: profiled $(PROGS) e2fsck $(MANPAGES) $(FMANPAGES)
@PROFILE_CMT@all:: e2fsck.profiled
@ -111,19 +111,15 @@ prof_err.c prof_err.h: prof_err.et
@echo " COMPILE_ET prof_err.et"
@$(COMPILE_ET) $(srcdir)/prof_err.et
e2fsck: e2fsck.@E2FSCK_TYPE@
@echo " CP $@"
@$(CP) e2fsck.@E2FSCK_TYPE@ e2fsck
e2fsck: $(OBJS) $(DEPLIBS)
@echo " LD $@"
@$(LD) $(ALL_LDFLAGS) -o e2fsck $(OBJS) $(LIBS)
e2fsck.static: $(OBJS) $(STATIC_DEPLIBS)
e2fsck.static: $(OBJS) $(STATIC_DEPLIBS)
@echo " LD $@"
@$(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o e2fsck.static $(OBJS) \
$(STATIC_LIBS)
e2fsck.shared: $(OBJS) $(DEPLIBS)
@echo " LD $@"
@$(LD) $(ALL_LDFLAGS) -o e2fsck.shared $(OBJS) $(LIBS)
e2fsck.profiled: $(PROFILED_OBJS) $(PROFILED_DEPLIBS)
@echo " LD $@"
@$(LD) $(ALL_LDFLAGS) -g -pg -o e2fsck.profiled $(PROFILED_OBJS) \

View File

@ -778,8 +778,26 @@ void check_super_block(e2fsck_t ctx)
/*
* Check to see if we should backup the master sb to the backup super
* blocks.
* blocks. Returns non-zero if the sb should be backed up.
*/
/*
* A few flags are set on the fly by the kernel, but only in the
* primary superblock. This is actually a bad thing, and we should
* try to discourage it in the future. In particular, for the newer
* ext4 files, especially EXT4_FEATURE_RO_COMPAT_DIR_NLINK and
* EXT3_FEATURE_INCOMPAT_EXTENTS. So some of these may go away in the
* future.
*
* The kernel will set EXT2_FEATURE_COMPAT_EXT_ATTR, but
* unfortunately, we shouldn't ignore it since if it's not set in the
* backup, the extended attributes in the filesystem will be stripped
* away.
*/
#define FEATURE_RO_COMPAT_IGNORE (EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
EXT4_FEATURE_RO_COMPAT_DIR_NLINK)
#define FEATURE_INCOMPAT_IGNORE (EXT3_FEATURE_INCOMPAT_EXTENTS)
int check_backup_super_block(e2fsck_t ctx)
{
ext2_filsys fs = ctx->fs;
@ -819,10 +837,18 @@ int check_backup_super_block(e2fsck_t ctx)
continue;
}
#define SUPER_DIFFERENT(x) (fs->super->x != tfs->super->x)
#define SUPER_INCOMPAT_DIFFERENT(x) \
(( fs->super->x & ~FEATURE_INCOMPAT_IGNORE) != \
(tfs->super->x & ~FEATURE_INCOMPAT_IGNORE))
#define SUPER_RO_COMPAT_DIFFERENT(x) \
(( fs->super->x & ~FEATURE_RO_COMPAT_IGNORE) != \
(tfs->super->x & ~FEATURE_RO_COMPAT_IGNORE))
#define SUPER_DIFFERENT(x) \
(fs->super->x != tfs->super->x)
if (SUPER_DIFFERENT(s_feature_compat) ||
SUPER_DIFFERENT(s_feature_incompat) ||
SUPER_DIFFERENT(s_feature_ro_compat) ||
SUPER_INCOMPAT_DIFFERENT(s_feature_incompat) ||
SUPER_RO_COMPAT_DIFFERENT(s_feature_ro_compat) ||
SUPER_DIFFERENT(s_blocks_count) ||
SUPER_DIFFERENT(s_inodes_count) ||
memcmp(fs->super->s_uuid, tfs->super->s_uuid,

View File

@ -1,16 +1,16 @@
Begin3
Title: EXT2 Filesystem utilities
Version: 1.40.4
Entered-date: 31Dec2007
Version: 1.40.5
Entered-date: 27Jan2008
Description: The filesystem utilities for the EXT2 filesystem, including
e2fsck, mke2fs, dumpe2fs, fsck, and others.
Keywords: utilities, fsck, filesystem, Ext2fs
Author: tytso@mit.edu (Theodore Tso)
Maintained-by: tytso@mit.edu (Theodore Tso)
Primary-site: download.sourceforge.net /pub/sourceforge/e2fsprogs
3960kB e2fsprogs-1.40.4.tar.gz
436kB e2fsprogs-libs-1.40.4.tar.gz
1kB e2fsprogs-1.40.4.lsm
3972kB e2fsprogs-1.40.5.tar.gz
440kB e2fsprogs-libs-1.40.5.tar.gz
1kB e2fsprogs-1.40.5.lsm
Alternate-site:
Platforms: linux 1.2.x/1.3.x/2.0.x/2.1.x/2.2.x/2.3.x/2.4.x/2.5.x/2.6.x
Copying-policy: GPL/LGPL

View File

@ -46,6 +46,18 @@ You should install e2fsprogs-devel if you want to develop ext2
filesystem-specific programs. If you install e2fsprogs-devel, you'll
also want to install e2fsprogs.
%package -n uuidd
Summary: helper daemon to guarantee uniqueness of time-based UUIDs
Group: System Environment/Daemons
License: GPLv2
Requires: e2fsprogs = %{version}
Requires(pre): shadow-utils
%description -n uuidd
The uuidd package contains a userspace daemon (uuidd) which guarantees
uniqueness of time-based UUID generation even at very high rates on
SMP systems.
%prep
%setup
@ -60,6 +72,10 @@ export PATH=/sbin:$PATH
make install install-libs DESTDIR="$RPM_BUILD_ROOT" \
root_sbindir=%{_root_sbindir} root_libdir=%{_root_libdir}
/sbin/ldconfig -n ${RPM_BUILD_ROOT}%{_libdir}
# Add a dir that uuidd needs that the Makefiles don't create
install -d $RPM_BUILD_ROOT/var/lib/libuuid
%find_lang %{name}
%clean
@ -81,6 +97,13 @@ if [ $1 = 0 -a -x /sbin/install-info -a -f %{_infodir}/libext2fs.info.gz ]; then
fi
exit 0
%pre -n uuidd
getent group uuidd >/dev/null || groupadd -r uuidd
getent passwd uuidd >/dev/null || \
useradd -r -g uuidd -d /var/lib/libuuid -s /sbin/nologin \
-c "UUID generator helper daemon" uuidd
exit 0
%files -f %{name}.lang
%defattr(-,root,root)
%doc README RELEASE-NOTES
@ -195,3 +218,11 @@ exit 0
%{_mandir}/man3/uuid_time.3*
%{_mandir}/man3/uuid_unparse.3*
%files -n uuidd
%defattr(-,root,root)
# if you want to run via init
# /etc/init.d/uuidd
%{_mandir}/man8/uuidd.8*
%attr(6755, uuidd, uuidd) %{_sbindir}/uuidd
%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid

View File

@ -10,9 +10,9 @@
# BSDLIB_INSTALL_DIR = $(SHLIBDIR)
#
all:: pic image
all:: image
real-subdirs:: pic
real-subdirs:: Makefile
@echo " MKDIR pic"
@mkdir -p pic

View File

@ -1,4 +1,4 @@
all:: checker $(LIBRARY)_chk.a
all:: $(LIBRARY)_chk.a
real-subdirs:: Makefile
@echo " MKDIR checker"

View File

@ -10,7 +10,7 @@
# BSDLIB_INSTALL_DIR = $(SHLIBDIR)
#
all:: pic image
all:: image
real-subdirs:: Makefile
@echo " MKDIR pic"

View File

@ -1,7 +1,7 @@
all:: profiled $(LIBRARY)_p.a
all:: $(LIBRARY)_p.a
real-subdirs:: Makefile
@echo " MKDIR $@"
@echo " MKDIR profiled"
@mkdir -p profiled
clean::

View File

@ -11,7 +11,7 @@
# ELF_INSTALL_DIR = $(SHLIBDIR)
# ELF_OTHER_LIBS = -lc
all:: elfshared image
all:: image
real-subdirs:: Makefile
@echo " MKDIR elfshared"

View File

@ -45,11 +45,11 @@ extern long long llseek(int fd, long long offset, int origin);
#else /* ! HAVE_LLSEEK */
#if defined(__alpha__) || defined(__ia64__)
#if SIZEOF_LONG == SIZEOF_LONG_LONG
#define llseek lseek
#else /* !__alpha__ && !__ia64__*/
#else /* SIZEOF_LONG != SIZEOF_LONG_LONG */
#include <linux/unistd.h>

View File

@ -131,7 +131,8 @@ static void set_uuid(blkid_dev dev, uuid_t uuid, const char *tag)
}
}
static void get_ext2_info(blkid_dev dev, unsigned char *buf)
static void get_ext2_info(blkid_dev dev, struct blkid_magic *id,
unsigned char *buf)
{
struct ext2_super_block *es = (struct ext2_super_block *) buf;
const char *label = 0;
@ -146,61 +147,123 @@ static void get_ext2_info(blkid_dev dev, unsigned char *buf)
blkid_set_tag(dev, "LABEL", label, sizeof(es->s_volume_name));
set_uuid(dev, es->s_uuid, 0);
if ((es->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) &&
!uuid_is_null(es->s_journal_uuid))
set_uuid(dev, es->s_journal_uuid, "EXT_JOURNAL");
if (strcmp(id->bim_type, "ext2") &&
((blkid_le32(es->s_feature_incompat) &
EXT2_FEATURE_INCOMPAT_UNSUPPORTED) == 0))
blkid_set_tag(dev, "SEC_TYPE", "ext2", sizeof("ext2"));
}
static int probe_ext3(struct blkid_probe *probe,
struct blkid_magic *id __BLKID_ATTR((unused)),
unsigned char *buf)
static int probe_ext4dev(struct blkid_probe *probe,
struct blkid_magic *id,
unsigned char *buf)
{
struct ext2_super_block *es;
es = (struct ext2_super_block *)buf;
/* Distinguish between jbd and ext2/3 fs */
if (blkid_le32(es->s_feature_incompat) &
/* Distinguish between ext4dev and other filesystems */
if ((blkid_le32(es->s_flags) & EXT2_FLAGS_TEST_FILESYS) == 0)
return -BLKID_ERR_PARAM;
/* Distinguish from jbd */
if (blkid_le32(es->s_feature_incompat) &
EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)
return -BLKID_ERR_PARAM;
/* Distinguish between ext3 and ext2 */
/* ext4dev requires a journal */
if (!(blkid_le32(es->s_feature_compat) &
EXT3_FEATURE_COMPAT_HAS_JOURNAL))
return -BLKID_ERR_PARAM;
get_ext2_info(probe->dev, buf);
if ((es->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) &&
!uuid_is_null(es->s_journal_uuid))
set_uuid(probe->dev, es->s_journal_uuid, "EXT_JOURNAL");
blkid_set_tag(probe->dev, "SEC_TYPE", "ext2", sizeof("ext2"));
get_ext2_info(probe->dev, id, buf);
return 0;
}
static int probe_ext2(struct blkid_probe *probe,
struct blkid_magic *id __BLKID_ATTR((unused)),
static int probe_ext4(struct blkid_probe *probe, struct blkid_magic *id,
unsigned char *buf)
{
struct ext2_super_block *es;
es = (struct ext2_super_block *)buf;
/* Distinguish from ext4dev */
if (blkid_le32(es->s_flags) & EXT2_FLAGS_TEST_FILESYS)
return -BLKID_ERR_PARAM;
/* Distinguish from jbd */
if (blkid_le32(es->s_feature_incompat) &
EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)
return -BLKID_ERR_PARAM;
/* ext4 requires journal */
if (!(blkid_le32(es->s_feature_compat) &
EXT3_FEATURE_COMPAT_HAS_JOURNAL))
return -BLKID_ERR_PARAM;
/* Ext4 has at least one feature which ext3 doesn't understand */
if (!(blkid_le32(es->s_feature_ro_compat) &
EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) &&
!(blkid_le32(es->s_feature_incompat) &
EXT3_FEATURE_INCOMPAT_UNSUPPORTED))
return -BLKID_ERR_PARAM;
get_ext2_info(probe->dev, id, buf);
return 0;
}
static int probe_ext3(struct blkid_probe *probe, struct blkid_magic *id,
unsigned char *buf)
{
struct ext2_super_block *es;
es = (struct ext2_super_block *)buf;
/* Distinguish from ext4dev */
if (blkid_le32(es->s_flags) & EXT2_FLAGS_TEST_FILESYS)
return -BLKID_ERR_PARAM;
/* ext3 requires journal */
if (!(blkid_le32(es->s_feature_compat) &
EXT3_FEATURE_COMPAT_HAS_JOURNAL))
return -BLKID_ERR_PARAM;
/* Any features which ext3 doesn't understand */
if ((blkid_le32(es->s_feature_ro_compat) &
EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) ||
(blkid_le32(es->s_feature_incompat) &
EXT3_FEATURE_INCOMPAT_UNSUPPORTED))
return -BLKID_ERR_PARAM;
get_ext2_info(probe->dev, id, buf);
return 0;
}
static int probe_ext2(struct blkid_probe *probe, struct blkid_magic *id,
unsigned char *buf)
{
struct ext2_super_block *es;
es = (struct ext2_super_block *)buf;
/* Distinguish between jbd and ext2/3 fs */
if (blkid_le32(es->s_feature_incompat) &
EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)
return -BLKID_ERR_PARAM;
/* Distinguish between ext3 and ext2 */
if ((blkid_le32(es->s_feature_compat) &
EXT3_FEATURE_COMPAT_HAS_JOURNAL))
return -BLKID_ERR_PARAM;
get_ext2_info(probe->dev, buf);
/* Any features which ext2 doesn't understand */
if ((blkid_le32(es->s_feature_ro_compat) &
EXT2_FEATURE_RO_COMPAT_UNSUPPORTED) ||
(blkid_le32(es->s_feature_incompat) &
EXT2_FEATURE_INCOMPAT_UNSUPPORTED))
return -BLKID_ERR_PARAM;
get_ext2_info(probe->dev, id, buf);
return 0;
}
static int probe_jbd(struct blkid_probe *probe,
struct blkid_magic *id __BLKID_ATTR((unused)),
static int probe_jbd(struct blkid_probe *probe, struct blkid_magic *id,
unsigned char *buf)
{
struct ext2_super_block *es = (struct ext2_super_block *) buf;
@ -209,7 +272,7 @@ static int probe_jbd(struct blkid_probe *probe,
EXT3_FEATURE_INCOMPAT_JOURNAL_DEV))
return -BLKID_ERR_PARAM;
get_ext2_info(probe->dev, buf);
get_ext2_info(probe->dev, id, buf);
return 0;
}
@ -500,7 +563,7 @@ static int probe_ntfs(struct blkid_probe *probe,
}
}
sprintf(uuid_str, "%llX", blkid_le64(ns->volume_serial));
sprintf(uuid_str, "%016llX", blkid_le64(ns->volume_serial));
blkid_set_tag(probe->dev, "UUID", uuid_str, 0);
if (label_str[0])
blkid_set_tag(probe->dev, "LABEL", label_str, 0);
@ -533,6 +596,10 @@ static int probe_reiserfs(struct blkid_probe *probe,
blocksize = blkid_le16(rs->rs_blocksize);
/* The blocksize must be at least 1k */
if ((blocksize >> 10) == 0)
return -BLKID_ERR_PARAM;
/* If the superblock is inside the journal, we have the wrong one */
if (id->bim_kboff/(blocksize>>10) > blkid_le32(rs->rs_journal_block))
return -BLKID_ERR_BIG;
@ -815,6 +882,19 @@ static int probe_gfs2(struct blkid_probe *probe,
return 1;
}
static int probe_hfsplus(struct blkid_probe *probe,
struct blkid_magic *id __BLKID_ATTR((unused)),
unsigned char *buf)
{
struct hfs_mdb *sbd = (struct hfs_mdb *)buf;
/* Check for a HFS+ volume embedded in a HFS volume */
if (memcmp(sbd->embed_sig, "H+", 2) == 0)
return 0;
return 1;
}
/*
* BLKID_BLK_OFFS is at least as large as the highest bim_kboff defined
* in the type_array table below + bim_kbalign.
@ -834,6 +914,8 @@ static struct blkid_magic type_array[] = {
{ "oracleasm", 0, 32, 8, "ORCLDISK", probe_oracleasm },
{ "ntfs", 0, 3, 8, "NTFS ", probe_ntfs },
{ "jbd", 1, 0x38, 2, "\123\357", probe_jbd },
{ "ext4dev", 1, 0x38, 2, "\123\357", probe_ext4dev },
{ "ext4", 1, 0x38, 2, "\123\357", probe_ext4 },
{ "ext3", 1, 0x38, 2, "\123\357", probe_ext3 },
{ "ext2", 1, 0x38, 2, "\123\357", probe_ext2 },
{ "reiserfs", 8, 0x34, 8, "ReIsErFs", probe_reiserfs },
@ -872,6 +954,8 @@ static struct blkid_magic type_array[] = {
{ "iso9660", 32, 1, 5, "CD001", probe_iso9660 },
{ "iso9660", 32, 9, 5, "CDROM", probe_iso9660 },
{ "jfs", 32, 0, 4, "JFS1", probe_jfs },
{ "hfsplus", 1, 0, 2, "BD", probe_hfsplus },
{ "hfsplus", 1, 0, 2, "H+", 0 },
{ "hfs", 1, 0, 2, "BD", 0 },
{ "ufs", 8, 0x55c, 4, "T\031\001\000", 0 },
{ "hpfs", 8, 0, 4, "I\350\225\371", 0 },

View File

@ -82,11 +82,61 @@ struct ext2_super_block {
__u32 s_first_meta_bg;
__u32 s_mkfs_time;
__u32 s_jnl_blocks[17];
__u32 s_reserved[172];
__u32 s_blocks_count_hi;
__u32 s_r_blocks_count_hi;
__u32 s_free_blocks_hi;
__u16 s_min_extra_isize;
__u16 s_want_extra_isize;
__u32 s_flags;
__u16 s_raid_stride;
__u16 s_mmp_interval;
__u64 s_mmp_block;
__u32 s_raid_stripe_width;
__u32 s_reserved[163];
};
#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x00000004
#define EXT3_FEATURE_INCOMPAT_RECOVER 0x00000004
#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x00000008
/* for s_flags */
#define EXT2_FLAGS_TEST_FILESYS 0x0004
/* for s_feature_compat */
#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
/* for s_feature_ro_compat */
#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
#define EXT2_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
#define EXT4_FEATURE_RO_COMPAT_HUGE_FILE 0x0008
#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010
#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020
#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040
/* for s_feature_incompat */
#define EXT2_FEATURE_INCOMPAT_FILETYPE 0x0002
#define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004
#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008
#define EXT2_FEATURE_INCOMPAT_META_BG 0x0010
#define EXT4_FEATURE_INCOMPAT_EXTENTS 0x0040 /* extents support */
#define EXT4_FEATURE_INCOMPAT_64BIT 0x0080
#define EXT4_FEATURE_INCOMPAT_MMP 0x0100
#define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
#define EXT2_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
#define EXT2_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE| \
EXT2_FEATURE_INCOMPAT_META_BG)
#define EXT2_FEATURE_INCOMPAT_UNSUPPORTED ~EXT2_FEATURE_INCOMPAT_SUPP
#define EXT2_FEATURE_RO_COMPAT_UNSUPPORTED ~EXT2_FEATURE_RO_COMPAT_SUPP
#define EXT3_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
#define EXT3_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE| \
EXT3_FEATURE_INCOMPAT_RECOVER| \
EXT2_FEATURE_INCOMPAT_META_BG)
#define EXT3_FEATURE_INCOMPAT_UNSUPPORTED ~EXT3_FEATURE_INCOMPAT_SUPP
#define EXT3_FEATURE_RO_COMPAT_UNSUPPORTED ~EXT3_FEATURE_RO_COMPAT_SUPP
struct xfs_super_block {
unsigned char xs_magic[4];
@ -440,6 +490,48 @@ struct file_attribute {
#define MFT_RECORD_ATTR_OBJECT_ID 0x40
#define MFT_RECORD_ATTR_END 0xffffffffu
/* HFS / HFS+ */
struct hfs_finder_info {
__u32 boot_folder;
__u32 start_app;
__u32 open_folder;
__u32 os9_folder;
__u32 reserved;
__u32 osx_folder;
__u8 id[8];
} __attribute__((packed));
struct hfs_mdb {
__u8 signature[2];
__u32 cr_date;
__u32 ls_Mod;
__u16 atrb;
__u16 nm_fls;
__u16 vbm_st;
__u16 alloc_ptr;
__u16 nm_al_blks;
__u32 al_blk_size;
__u32 clp_size;
__u16 al_bl_st;
__u32 nxt_cnid;
__u16 free_bks;
__u8 label_len;
__u8 label[27];
__u32 vol_bkup;
__u16 vol_seq_num;
__u32 wr_cnt;
__u32 xt_clump_size;
__u32 ct_clump_size;
__u16 num_root_dirs;
__u32 file_count;
__u32 dir_count;
struct hfs_finder_info finder_info;
__u8 embed_sig[2];
__u16 embed_startblock;
__u16 embed_blockcount;
} __attribute__((packed));
/*
* Byte swap functions
*/

View File

@ -147,11 +147,15 @@ static void print_super_flags(struct ext2_super_block * s, FILE *f)
fputs("Filesystem flags: ", f);
if (s->s_flags & EXT2_FLAGS_SIGNED_HASH) {
fputs("signed directory hash ", f);
fputs("signed_directory_hash ", f);
flags_found++;
}
if (s->s_flags & EXT2_FLAGS_UNSIGNED_HASH) {
fputs("unsigned directory hash ", f);
fputs("unsigned_directory_hash ", f);
flags_found++;
}
if (s->s_flags & EXT2_FLAGS_TEST_FILESYS) {
fputs("test_filesystem ", f);
flags_found++;
}
if (flags_found)

View File

@ -431,18 +431,22 @@ struct ext2_inode_large {
#define inode_uid(inode) ((inode).i_uid | (inode).osd2.linux2.l_i_uid_high << 16)
#define inode_gid(inode) ((inode).i_gid | (inode).osd2.linux2.l_i_gid_high << 16)
#define ext2fs_set_i_uid_high(inode,x) ((inode).osd2.linux2.l_i_uid_high = (x))
#define ext2fs_set_i_gid_high(inode,x) ((inode).osd2.linux2.l_i_gid_high = (x))
/*
* File system states
*/
#define EXT2_VALID_FS 0x0001 /* Unmounted cleanly */
#define EXT2_ERROR_FS 0x0002 /* Errors detected */
#define EXT4_ORPHAN_FS 0x0004 /* Orphans being recovered */
/*
* Misc. filesystem flags
*/
#define EXT2_FLAGS_SIGNED_HASH 0x0001 /* Signed dirhash in use */
#define EXT2_FLAGS_UNSIGNED_HASH 0x0002 /* Unsigned dirhash in use */
#define EXT2_FLAGS_TEST_FILESYS 0x0004 /* OK for use on development code */
/*
* Mount flags

View File

@ -156,6 +156,7 @@ errcode_t ext2fs_initialize(const char *name, int flags,
set_field(s_feature_incompat, 0);
set_field(s_feature_ro_compat, 0);
set_field(s_first_meta_bg, 0);
set_field(s_flags, 0);
if (super->s_feature_incompat & ~EXT2_LIB_FEATURE_INCOMPAT_SUPP) {
retval = EXT2_ET_UNSUPP_FEATURE;
goto cleanup;

View File

@ -46,11 +46,11 @@ extern long long llseek (int fd, long long offset, int origin);
#else /* ! HAVE_LLSEEK */
#if defined(__alpha__) || defined (__ia64__)
#if SIZEOF_LONG == SIZEOF_LONG_LONG
#define llseek lseek
#else /* !__alpha__ && !__ia64__*/
#else /* SIZEOF_LONG != SIZEOF_LONG_LONG */
#include <linux/unistd.h>

View File

@ -409,7 +409,8 @@ static int get_uuid_via_daemon(int op, uuid_t out, int *num)
access_ret = access(uuidd_path, X_OK);
if (access_ret == 0 && start_attempts++ < 5) {
if ((pid = fork()) == 0) {
execl(uuidd_path, "uuidd", "-qT", "300", 0);
execl(uuidd_path, "uuidd", "-qT", "300",
(char *) NULL);
exit(1);
}
(void) waitpid(pid, 0, 0);

View File

@ -126,7 +126,8 @@ static void write_image_file(ext2_filsys fs, int fd)
hdr.magic_number = EXT2_ET_MAGIC_E2IMAGE;
strcpy(hdr.magic_descriptor, "Ext2 Image 1.0");
gethostname(hdr.fs_hostname, sizeof(hdr.fs_hostname));
strncat(hdr.fs_device_name, device_name, sizeof(hdr.fs_device_name) - 1);
strncpy(hdr.fs_device_name, device_name, sizeof(hdr.fs_device_name)-1);
hdr.fs_device_name[sizeof(hdr.fs_device_name) - 1] = 0;
hdr.fs_blocksize = fs->blocksize;
if (stat(device_name, &st) == 0)

View File

@ -187,6 +187,10 @@ filesystem blocks per stripe.
.BI resize= max-online-resize
Reserve enough space so that the block group descriptor table can grow
to support a filesystem that has max-online-resize blocks.
.TP
.B test_fs
Set a flag in the filesystem superblock indicating that it may be
mounted using experimental kernel code, such as the ext4dev filesystem.
.RE
.TP
.BI \-f " fragment-size"

View File

@ -495,11 +495,11 @@ static void create_root_dir(ext2_filsys fs)
}
uid = getuid();
inode.i_uid = uid;
inode.i_uid_high = uid >> 16;
ext2fs_set_i_uid_high(inode, uid >> 16);
if (uid) {
gid = getgid();
inode.i_gid = gid;
inode.i_gid_high = gid >> 16;
ext2fs_set_i_gid_high(inode, gid >> 16);
}
retval = ext2fs_write_new_inode(fs, EXT2_ROOT_INO, &inode);
if (retval) {
@ -849,6 +849,8 @@ static void parse_extended_opts(struct ext2_super_block *param,
param->s_reserved_gdt_blocks = rsv_gdb;
}
} else if (!strcmp(token, "test_fs")) {
param->s_flags |= EXT2_FLAGS_TEST_FILESYS;
} else
r_usage++;
}
@ -859,7 +861,8 @@ static void parse_extended_opts(struct ext2_super_block *param,
"\tis set off by an equals ('=') sign.\n\n"
"Valid extended options are:\n"
"\tstride=<stride length in blocks>\n"
"\tresize=<resize maximum size in blocks>\n\n"));
"\tresize=<resize maximum size in blocks>\n"
"\ttest_fs\n"));
free(buf);
exit(1);
}
@ -870,7 +873,8 @@ static __u32 ok_features[3] = {
EXT3_FEATURE_COMPAT_HAS_JOURNAL |
EXT2_FEATURE_COMPAT_RESIZE_INODE |
EXT2_FEATURE_COMPAT_DIR_INDEX |
EXT2_FEATURE_COMPAT_LAZY_BG, /* Compat */
EXT2_FEATURE_COMPAT_LAZY_BG |
EXT2_FEATURE_COMPAT_EXT_ATTR, /* Compat */
EXT2_FEATURE_INCOMPAT_FILETYPE| /* Incompat */
EXT3_FEATURE_INCOMPAT_JOURNAL_DEV|
EXT2_FEATURE_INCOMPAT_META_BG|
@ -1557,6 +1561,9 @@ int main (int argc, char *argv[])
exit(1);
}
if (fs_param.s_flags & EXT2_FLAGS_TEST_FILESYS)
fs->super->s_flags |= EXT2_FLAGS_TEST_FILESYS;
/*
* Wipe out the old on-disk superblock
*/

View File

@ -1,15 +1,19 @@
[defaults]
base_features = sparse_super,filetype,resize_inode,dir_index
base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr
blocksize = 4096
inode_ratio = 8192
inode_size = 256
inode_ratio = 16384
[fs_types]
small = {
blocksize = 1024
inode_size = 128
inode_ratio = 4096
}
floppy = {
blocksize = 1024
inode_size = 128
inode_ratio = 8192
}
news = {
inode_ratio = 4096

View File

@ -61,6 +61,10 @@ tune2fs \- adjust tunable filesystem parameters on ext2/ext3 filesystems
.I mount-count
]
[
.B \-E
.I extended-options
]
[
.B \-L
.I volume-name
]
@ -144,6 +148,21 @@ Remount filesystem read-only.
Cause a kernel panic.
.RE
.TP
.BI \-E " extended-options"
Set extended options for the filesystem. Extended options are comma
separated, and may take an argument using the equals ('=') sign. The
following extended options are supported:
.RS 1.2i
.TP
.B test_fs
Set a flag in the filesystem superblock indicating that it may be
mounted using experimental kernel code, such as the ext4dev filesystem.
.TP
.B ^test_fs
Clear the test_fs flag, indicating the filesystem should only be mounted
using production-level filesystem code.
.RE
.TP
.B \-f
Force the tune2fs operation to complete even in the face of errors. This
option is useful when removing the

View File

@ -71,6 +71,7 @@ static unsigned short errors;
static int open_flag;
static char *features_cmd;
static char *mntopts_cmd;
static char *extended_cmd;
int journal_size, journal_flags;
char *journal_device;
@ -87,10 +88,10 @@ static void usage(void)
"\t[-i interval[d|m|w]] [-j] [-J journal_options]\n"
"\t[-l] [-s sparse_flag] [-m reserved_blocks_percent]\n"
"\t[-o [^]mount_options[,...]] [-r reserved_blocks_count]\n"
"\t[-u user] [-C mount_count] [-L volume_label] "
"[-M last_mounted_dir]\n"
"\t[-O [^]feature[,...]] [-T last_check_time] [-U UUID]"
" device\n"), program_name);
"\t[-u user] [-C mount_count] [-L volume_label]\n"
"\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
"\t[-E extended-option[,...]] [-T last_check_time] "
"[-U UUID] device\n"), program_name);
exit (1);
}
@ -519,7 +520,7 @@ static void parse_tune2fs_options(int argc, char **argv)
struct passwd * pw;
printf("tune2fs %s (%s)\n", E2FSPROGS_VERSION, E2FSPROGS_DATE);
while ((c = getopt(argc, argv, "c:e:fg:i:jlm:o:r:s:u:C:J:L:M:O:T:U:")) != EOF)
while ((c = getopt(argc, argv, "c:e:fg:i:jlm:o:r:s:u:C:E:J:L:M:O:T:U:")) != EOF)
switch (c)
{
case 'c':
@ -562,6 +563,10 @@ static void parse_tune2fs_options(int argc, char **argv)
e_flag = 1;
open_flag = EXT2_FLAG_RW;
break;
case 'E':
extended_cmd = optarg;
open_flag = EXT2_FLAG_RW;
break;
case 'f': /* Force */
f_flag = 1;
break;
@ -753,6 +758,57 @@ void do_findfs(int argc, char **argv)
exit(0);
}
static void parse_extended_opts(ext2_filsys fs, const char *opts)
{
char *buf, *token, *next, *p, *arg;
int len;
int r_usage = 0;
len = strlen(opts);
buf = malloc(len+1);
if (!buf) {
fprintf(stderr,
_("Couldn't allocate memory to parse options!\n"));
exit(1);
}
strcpy(buf, opts);
for (token = buf; token && *token; token = next) {
p = strchr(token, ',');
next = 0;
if (p) {
*p = 0;
next = p+1;
}
arg = strchr(token, '=');
if (arg) {
*arg = 0;
arg++;
}
if (!strcmp(token, "test_fs")) {
fs->super->s_flags |= EXT2_FLAGS_TEST_FILESYS;
printf("Setting test filesystem flag\n");
ext2fs_mark_super_dirty(fs);
} else if (!strcmp(token, "^test_fs")) {
fs->super->s_flags &= ~EXT2_FLAGS_TEST_FILESYS;
printf("Clearing test filesystem flag\n");
ext2fs_mark_super_dirty(fs);
} else
r_usage++;
}
if (r_usage) {
fprintf(stderr, _("\nBad options specified.\n\n"
"Extended options are separated by commas, "
"and may take an argument which\n"
"\tis set off by an equals ('=') sign.\n\n"
"Valid extended options are:\n"
"\ttest_fs\n"
"\t^test_fs\n"));
free(buf);
exit(1);
}
free(buf);
}
int main (int argc, char ** argv)
{
@ -916,6 +972,8 @@ int main (int argc, char ** argv)
update_mntopts(fs, mntopts_cmd);
if (features_cmd)
update_feature_set(fs, features_cmd);
if (extended_cmd)
parse_extended_opts(fs, extended_cmd);
if (journal_size || journal_device)
add_journal(fs);

View File

@ -64,11 +64,11 @@ UUID's.
.TP
.BI \-p " pidfile"
Specify the pathname where the pid file should be written. By default,
the pid file is written to /var/run/uuidd.pid.
the pid file is written to /var/lib/libuuid/uuidd.pid.
.TP
.BI \-s " socketpath"
Specify the pathname used for the unix-domain socket used by uuidd. By
qdefault, the pathname used is /var/run/uuidd.sock. This is primarily
default, the pathname used is /var/lib/libuuid/request. This is primarily
for debugging purposes, since the pathname is hard-coded in the libuuid
library.
.TP

BIN
po/sv.gmo

Binary file not shown.

177
po/sv.po
View File

@ -1,8 +1,9 @@
# Swedish messages for e2fsprogs.
# Copyright © 2003, 2005, 2006 Free Software Foundation, Inc.
# Göran Uddeborg <goeran@uddeborg.se>, 2003, 2005, 2006.
# Copyright © 2003, 2005, 2006, 2008 Free Software Foundation, Inc.
# This file is distributed under the same license as the e2fsprogs package.
# Göran Uddeborg <goeran@uddeborg.se>, 2003, 2005, 2006, 2008.
#
# $Revision: 1.29 $
# $Revision: 1.34 $
#
#. The strings in e2fsck's problem.c can be very hard to translate,
#. since the strings are expanded in two different ways. First of all,
@ -64,10 +65,10 @@
#.
msgid ""
msgstr ""
"Project-Id-Version: e2fsprogs 1.40.1\n"
"Project-Id-Version: e2fsprogs 1.40.4\n"
"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
"POT-Creation-Date: 2007-12-05 19:25-0500\n"
"PO-Revision-Date: 2007-07-24 23:06+0200\n"
"PO-Revision-Date: 2008-01-20 15:15+0100\n"
"Last-Translator: Göran Uddeborg <goeran@uddeborg.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"MIME-Version: 1.0\n"
@ -890,8 +891,7 @@ msgstr "Extern journal st
#: e2fsck/problem.c:212
msgid ""
"Ext3 @j @S is unknown type %N (unsupported).\n"
"It is likely that your copy of e2fsck is old and/or doesn't support this @j "
"format.\n"
"It is likely that your copy of e2fsck is old and/or doesn't support this @j format.\n"
"It is also possible the @j @S is corrupt.\n"
msgstr ""
"Ext3-journalsuperblock är av okänd typ %N (ej stött).\n"
@ -913,8 +913,7 @@ msgstr "superblock har inte har-journal-flagga, men har ext3-journal %s.\n"
#. @-expanded: superblock has ext3 needs_recovery flag set, but no journal.\n
#: e2fsck/problem.c:230
msgid "@S has ext3 needs_recovery flag set, but no @j.\n"
msgstr ""
"superblock har ext3-behöver-rättas-flagga satt, men har ext3-journal %s.\n"
msgstr "superblock har ext3-behöver-rättas-flagga satt, men har ext3-journal %s.\n"
#. @-expanded: ext3 recovery flag is clear, but journal has data.\n
#: e2fsck/problem.c:235
@ -939,8 +938,7 @@ msgstr "R
#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
#: e2fsck/problem.c:255
msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
msgstr ""
"%s föräldralös inod %i (uid=%Iu, gid=%Ig, rättighet=%Im, storlek=%Is)\n"
msgstr "%s föräldralös inod %i (uid=%Iu, gid=%Ig, rättighet=%Im, storlek=%Is)\n"
#. @-expanded: illegal block #%B (%b) found in orphaned inode %i.\n
#: e2fsck/problem.c:260
@ -967,8 +965,7 @@ msgstr "Ogiltig inod %i i f
#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
#: e2fsck/problem.c:280 e2fsck/problem.c:613
msgid "@f has feature flag(s) set, but is a revision 0 @f. "
msgstr ""
"filsystemet har funktionsflaggor satta, men är ett revision 0-filsystem. "
msgstr "filsystemet har funktionsflaggor satta, men är ett revision 0-filsystem. "
#. @-expanded: Ext3 journal superblock has an unknown read-only feature flag set.\n
#: e2fsck/problem.c:285
@ -1043,8 +1040,7 @@ msgstr ""
#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
#: e2fsck/problem.c:327
msgid "Resize_@i not enabled, but the resize @i is non-zero. "
msgstr ""
"Resize_inode är inte aktiverat, men storleksändringsinoden är inte noll. "
msgstr "Resize_inode är inte aktiverat, men storleksändringsinoden är inte noll. "
#. @-expanded: Resize inode not valid.
#: e2fsck/problem.c:332
@ -1118,20 +1114,17 @@ msgstr "Inod %i
#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
#: e2fsck/problem.c:392
msgid "@g %g's @b @B at %b @C.\n"
msgstr ""
"Grupp %g:s blockbitkarta vid %b står i konflikt med annat filsystemblock.\n"
msgstr "Grupp %g:s blockbitkarta vid %b står i konflikt med annat filsystemblock.\n"
#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
#: e2fsck/problem.c:397
msgid "@g %g's @i @B at %b @C.\n"
msgstr ""
"Grupp %g:s inodbitkarta vid %b står i konflikt med annat filsystemblock.\n"
msgstr "Grupp %g:s inodbitkarta vid %b står i konflikt med annat filsystemblock.\n"
#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
#: e2fsck/problem.c:402
msgid "@g %g's @i table at %b @C.\n"
msgstr ""
"Grupp %g:s inodtabell vid %b står i konflikt med annat filsystemblock.\n"
msgstr "Grupp %g:s inodtabell vid %b står i konflikt med annat filsystemblock.\n"
#. @-expanded: group %g's block bitmap (%b) is bad.
#: e2fsck/problem.c:407
@ -1193,8 +1186,7 @@ msgstr "Duplicerat eller felaktigt block anv
#. @-expanded: Bad block %b used as bad block inode indirect block.
#: e2fsck/problem.c:462
msgid "Bad @b %b used as bad @b @i indirect @b. "
msgstr ""
"Felaktigt block %b använt som indirektblock för inod för dåliga block. "
msgstr "Felaktigt block %b använt som indirektblock för inod för dåliga block. "
#. @-expanded: \n
#. @-expanded: The bad block inode has probably been corrupted. You probably\n
@ -1243,8 +1235,7 @@ msgstr "Det prim
#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
#: e2fsck/problem.c:490
msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
msgstr ""
"Block %b i de primära gruppbeskrivarna är på listan över dåliga block\n"
msgstr "Block %b i de primära gruppbeskrivarna är på listan över dåliga block\n"
#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
#: e2fsck/problem.c:496
@ -1254,21 +1245,17 @@ msgstr "Varning: Grupp %g:s superblock (%b)
#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
#: e2fsck/problem.c:501
msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
msgstr ""
"Varning: Grupp %g:s kopia av gruppbeskrivarna har ett dåligt block (%b).\n"
msgstr "Varning: Grupp %g:s kopia av gruppbeskrivarna har ett dåligt block (%b).\n"
#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
#: e2fsck/problem.c:507
msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
msgstr ""
"Programmeringsfel? Block nr. %b tas i anspråk utan anledning i "
"process_bad_block.\n"
msgstr "Programmeringsfel? Block nr. %b tas i anspråk utan anledning i process_bad_block.\n"
#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
#: e2fsck/problem.c:513
msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
msgstr ""
"Fel vid allokering av %N konsekutiva block i blockgrupp %g för %s: %m\n"
msgstr "Fel vid allokering av %N konsekutiva block i blockgrupp %g för %s: %m\n"
#. @-expanded: error allocating block buffer for relocating %s\n
#: e2fsck/problem.c:518
@ -1339,9 +1326,7 @@ msgstr "Fel vid lagring av inodsr
#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
#: e2fsck/problem.c:578
msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
msgstr ""
"Fel vid lagring av katalogblocksinformation (inod=%i, block=%b, antal=%N): %"
"m\n"
msgstr "Fel vid lagring av katalogblocksinformation (inod=%i, block=%b, antal=%N): %m\n"
#. @-expanded: Error reading inode %i: %m\n
#: e2fsck/problem.c:584
@ -1370,8 +1355,7 @@ msgstr ""
#: e2fsck/problem.c:603
#, c-format
msgid "@i %i has @cion flag set on @f without @cion support. "
msgstr ""
"Inod %i har kompressionsflagga satt på filsystem utan kompressionsstöd. "
msgstr "Inod %i har kompressionsflagga satt på filsystem utan kompressionsstöd. "
#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
#: e2fsck/problem.c:608
@ -1549,16 +1533,12 @@ msgstr "Ut
#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
#: e2fsck/problem.c:774
msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
msgstr ""
"Utökat attribut i inod %i har ett värdeblock (%N) som är ogiltigt (måste "
"vara 0)\n"
msgstr "Utökat attribut i inod %i har ett värdeblock (%N) som är ogiltigt (måste vara 0)\n"
#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid (must be 0)\n
#: e2fsck/problem.c:779
msgid "@a in @i %i has a hash (%N) which is @n (must be 0)\n"
msgstr ""
"Utökat attribut i inod %i har en kontrollsumma (%N) som är ogiltig (måste "
"vara 0)\n"
msgstr "Utökat attribut i inod %i har en kontrollsumma (%N) som är ogiltig (måste vara 0)\n"
#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
#: e2fsck/problem.c:784
@ -1575,8 +1555,7 @@ msgid ""
"Pass 1B: Rescanning for @m @bs\n"
msgstr ""
"\n"
"Kör ytterliggare pass för att lösa upp block som används av mer än en "
"inod ...\n"
"Kör ytterliggare pass för att lösa upp block som används av mer än en inod ...\n"
"Pass 1B: Söker igen efter block som används flera gånger\n"
#. @-expanded: multiply-claimed block(s) in inode %i:
@ -1605,15 +1584,12 @@ msgstr "Fel vid iterering
#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
#: e2fsck/problem.c:827 e2fsck/problem.c:1143
msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
msgstr ""
"Fel vid justering av referensräknare för externa attribut-block %b (inod %"
"i): %m\n"
msgstr "Fel vid justering av referensräknare för externa attribut-block %b (inod %i): %m\n"
#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
#: e2fsck/problem.c:833
msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
msgstr ""
"Pass 1C: Söker kataloger efter inoder med flerfaldigt ianspråkstagna block\n"
msgstr "Pass 1C: Söker kataloger efter inoder med flerfaldigt ianspråkstagna block\n"
#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
#: e2fsck/problem.c:839
@ -1694,8 +1670,7 @@ msgstr "Post \"%Dn\" i %p (%i)
#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
#: e2fsck/problem.c:909
msgid "@E points to @i (%Di) located in a bad @b.\n"
msgstr ""
"Post \"%Dn\" i %p (%i) pekar på inod (%Di) som finns i ett trasigt block.\n"
msgstr "Post \"%Dn\" i %p (%i) pekar på inod (%Di) som finns i ett trasigt block.\n"
#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
#: e2fsck/problem.c:914
@ -1727,8 +1702,7 @@ msgstr "\"..\" saknas i kataloginod %i.\n"
#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
#: e2fsck/problem.c:939
msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
msgstr ""
"Första post \"%Dn\" (inod=%Di) i kataloginod %i (%p) skulle varit \".\"\n"
msgstr "Första post \"%Dn\" (inod=%Di) i kataloginod %i (%p) skulle varit \".\"\n"
#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
#: e2fsck/problem.c:944
@ -1881,8 +1855,7 @@ msgstr "S
#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
#: e2fsck/problem.c:1084
msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
msgstr ""
"Post \"%Dn\" i %p (%i) har felaktig filtyp (var %Dt, skulle varit %N).\n"
msgstr "Post \"%Dn\" i %p (%i) har felaktig filtyp (var %Dt, skulle varit %N).\n"
#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
#: e2fsck/problem.c:1089
@ -1907,9 +1880,7 @@ msgstr "Ut
#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
#: e2fsck/problem.c:1109
msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
msgstr ""
"Filsystem innehåller stora filer, men saknar flaggan LARGE_FILE i "
"superblock.\n"
msgstr "Filsystem innehåller stora filer, men saknar flaggan LARGE_FILE i superblock.\n"
#. @-expanded: problem in HTREE directory inode %d: node (%B) not referenced\n
#: e2fsck/problem.c:1114
@ -1962,8 +1933,7 @@ msgstr ""
#. @-expanded: problem in HTREE directory inode %d: node (%B) has an unordered hash table\n
#: e2fsck/problem.c:1163
msgid "@p @h %d: node (%B) has an unordered hash table\n"
msgstr ""
"Problem i HTREE-katalognod %d (%q): not (%B) har en oordnat hash-tabell\n"
msgstr "Problem i HTREE-katalognod %d (%q): not (%B) har en oordnat hash-tabell\n"
#. @-expanded: problem in HTREE directory inode %d: node (%B) has invalid depth\n
#: e2fsck/problem.c:1168
@ -2079,8 +2049,7 @@ msgstr "ext2fs_new_dir_block: %m n
#: e2fsck/problem.c:1260
#, c-format
msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
msgstr ""
"ext2fs_write_dir_block: %m vid skrivning av katalogblocket för /lost+found\n"
msgstr "ext2fs_write_dir_block: %m vid skrivning av katalogblocket för /lost+found\n"
#. @-expanded: Error while adjusting inode count on inode %i\n
#: e2fsck/problem.c:1265
@ -2107,8 +2076,7 @@ msgid ""
"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
"\n"
msgstr ""
"Kunde inte rätta förälder till inod %i: Kunde inte hitta "
"förälderkatalogpost\n"
"Kunde inte rätta förälder till inod %i: Kunde inte hitta förälderkatalogpost\n"
"\n"
#. @-expanded: Error creating root directory (%s): %m\n
@ -2187,8 +2155,7 @@ msgid ""
"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
msgstr ""
"VARNING: PROGRAMMERINGSFEL I E2FSCK!\n"
" ELLER NÅGON KLANTSKALLE (DU) KONTROLLERAR ETT MONTERAT (AKTIVT) "
"FILSYSTEM.\n"
" ELLER NÅGON KLANTSKALLE (DU) KONTROLLERAR ETT MONTERAT (AKTIVT) FILSYSTEM.\n"
"inod_link_info[%i] är %N, inod.i_links_count är %Il. De skulle vara samma!\n"
#. @-expanded: Pass 5: Checking group summary information\n
@ -2244,9 +2211,7 @@ msgstr "Antal fria block
#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
#. @-expanded: endpoints (%i, %j)\n
#: e2fsck/problem.c:1458
msgid ""
"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
"endpoints (%i, %j)\n"
msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
msgstr ""
"PROGRAMMERINGSFEL: filsystem (nr. %N) bitkartas ändpunkter (%b, %c) stämmer\n"
"inte med beräknade bitkarteändpunkter (%i, %j)\n"
@ -2377,8 +2342,7 @@ msgid ""
" -p Automatic repair (no questions)\n"
" -n Make no changes to the filesystem\n"
" -y Assume \"yes\" to all questions\n"
" -c Check for bad blocks and add them to the badblock "
"list\n"
" -c Check for bad blocks and add them to the badblock list\n"
" -f Force checking even if filesystem is marked clean\n"
msgstr ""
"\n"
@ -2387,8 +2351,7 @@ msgstr ""
" -n Gör inga förändringar av filsystemet\n"
" -y Anta \"ja\" som svar på alla frågor\n"
" -c Leta efter dåliga block och lägg till dem i listan\n"
" -f Framtvinga kontroll även om filsystemet är markerat "
"rent\n"
" -f Framtvinga kontroll även om filsystemet är markerat rent\n"
#: e2fsck/unix.c:86
#, c-format
@ -2475,7 +2438,7 @@ msgstr " var inte fl
#: e2fsck/unix.c:284
msgid " primary superblock features different from backup"
msgstr ""
msgstr " det primära superblockets egenskaper skiljer från reservens"
#: e2fsck/unix.c:288
#, c-format
@ -2554,8 +2517,7 @@ msgstr "Flaggan -t st
#: e2fsck/unix.c:747
#, c-format
msgid "Byte-swapping filesystems not compiled in this version of e2fsck\n"
msgstr ""
"Byteväxling av filsystem är inte inkompilerat i denna version av e2fsck\n"
msgstr "Byteväxling av filsystem är inte inkompilerat i denna version av e2fsck\n"
#: e2fsck/unix.c:770 misc/tune2fs.c:459 misc/tune2fs.c:717 misc/tune2fs.c:734
#, c-format
@ -2578,6 +2540,8 @@ msgid ""
"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
"\n"
msgstr ""
"E2FSCK_JBD_DEBUG \"%s\" är inte ett heltal\n"
"\n"
#: e2fsck/unix.c:864
#, c-format
@ -2586,6 +2550,9 @@ msgid ""
"Invalid non-numeric argument to -%c (\"%s\")\n"
"\n"
msgstr ""
"\n"
"Ogiltigt ickenumerikst argument till -%c (\"%s\")\n"
"\n"
#: e2fsck/unix.c:903
#, c-format
@ -2606,13 +2573,13 @@ msgid "need terminal for interactive repairs"
msgstr "behöver terminal för interaktiva reparationer"
#: e2fsck/unix.c:977
#, fuzzy, c-format
#, c-format
msgid "%s: %s trying backup blocks...\n"
msgstr "%s försöker med reservblock ...\n"
msgstr "%s: %s försöker med reservblock ...\n"
#: e2fsck/unix.c:979
msgid "Superblock invalid,"
msgstr ""
msgstr "Superblocket är ogiltigt,"
#: e2fsck/unix.c:980
msgid "Group descriptors look bad..."
@ -2669,12 +2636,8 @@ msgstr "vid kontroll av ext3-journal f
#: e2fsck/unix.c:1109
#, c-format
msgid ""
"Warning: skipping journal recovery because doing a read-only filesystem "
"check.\n"
msgstr ""
"Varning: hoppar över journalåterhämtning eftersom en läsningskontroll av "
"filsystem görs.\n"
msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
msgstr "Varning: hoppar över journalåterhämtning eftersom en läsningskontroll av filsystem görs.\n"
#: e2fsck/unix.c:1122
#, c-format
@ -2928,13 +2891,11 @@ msgstr "klar \n"
#, c-format
msgid ""
"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnf]\n"
" [-c blocks_at_once] [-p num_passes] [-t test_pattern [-t test_pattern "
"[...]]]\n"
" [-c blocks_at_once] [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
" device [last_block [start_block]]\n"
msgstr ""
"Användning: %s [-b blockstorlek] [-i infil] [-o utfile] [-svwnf]\n"
" [-c block_åt_gången] [-p antal_pass] [-t testmönster [-t testmönster "
"[...]]]\n"
" [-c block_åt_gången] [-p antal_pass] [-t testmönster [-t testmönster [...]]]\n"
" enhet [sista_block [start_block]]\n"
#: misc/badblocks.c:88
@ -3444,10 +3405,8 @@ msgstr "Kunde inte allokera minne f
#: misc/fsck.c:875
#, c-format
msgid ""
"%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass "
"number\n"
msgstr ""
msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
msgstr "%s: hoppar över felaktig rad i /etc/fstab: bind-montering med fsck-passnummer som inte är noll\n"
#: misc/fsck.c:902
#, c-format
@ -3464,11 +3423,8 @@ msgid "--waiting-- (pass %d)\n"
msgstr "--väntar-- (pass %d)\n"
#: misc/fsck.c:1064
msgid ""
"Usage: fsck [-ANPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
msgstr ""
"Användning: fsck [-ANPRTV] [ -C [ fh ] ] [-t fstyp] [fs-flaggor] "
"[filsys ...]\n"
msgid "Usage: fsck [-ANPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
msgstr "Användning: fsck [-ANPRTV] [ -C [ fh ] ] [-t fstyp] [fs-flaggor] [filsys ...]\n"
#: misc/fsck.c:1106
#, c-format
@ -3496,7 +3452,7 @@ msgid "While reading version on %s"
msgstr "Vid läsning av version på %s"
#: misc/mke2fs.c:97
#, fuzzy, c-format
#, c-format
msgid ""
"Usage: %s [-c|-t|-l filename] [-b block-size] [-f fragment-size]\n"
"\t[-i bytes-per-inode] [-I inode-size] [-j] [-J journal-options]\n"
@ -3509,7 +3465,7 @@ msgstr ""
"\t[-i byte-per-inod] [-I inodstorlek] [-j] [-J journalflaggor]\n"
"\t[-N antal-inoder] [-m reservade-block-procent] [-o skapar-os]\n"
"\t[-g block-per-grupp] [-L volymetikett] [-M senast-monterad-katalog]\n"
"\t[-O funktion[,...]] [-r fs-revision] [-R flaggor] [-qvSV]\n"
"\t[-O funktion[,...]] [-r fs-revision] [-E utökad-flagga[,...]] [-qvSV]\n"
"\tenhet [blockantal]\n"
#: misc/mke2fs.c:197
@ -3727,8 +3683,7 @@ msgstr "Ogiltig storleks
#: misc/mke2fs.c:819
#, c-format
msgid "The resize maximum must be greater than the filesystem size.\n"
msgstr ""
"Storleksändringens maximum måste vara större än filsystemets storlek.\n"
msgstr "Storleksändringens maximum måste vara större än filsystemets storlek.\n"
#: misc/mke2fs.c:843
#, c-format
@ -3752,8 +3707,7 @@ msgstr ""
"\n"
"Felaktiga flaggor angivna.\n"
"\n"
"Utökade flaggor separeras med komman, och kan ta ett argument som avdelas "
"med\n"
"Utökade flaggor separeras med komman, och kan ta ett argument som avdelas med\n"
"\tett likhetstecken (\"=\").\n"
"\n"
"Giltiga utökade flaggor är:\n"
@ -3849,10 +3803,8 @@ msgstr "%d-byteblock f
#: misc/mke2fs.c:1211
#, c-format
msgid ""
"Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
msgstr ""
"Varning: %d-byteblock för stort för systemet (max %d), tvingas fortsätta\n"
msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
msgstr "Varning: %d-byteblock för stort för systemet (max %d), tvingas fortsätta\n"
# "Ett" för att detta sätts in i annan sträng där det föregås av "a".
# Även "journal" kan sättas in på samma plats. Felrapporterat.
@ -3909,9 +3861,7 @@ msgstr "vid f
#: misc/mke2fs.c:1428
msgid "reserved online resize blocks not supported on non-sparse filesystem"
msgstr ""
"reserverade block för storleksändring under drift stöds inte på icke-glesa "
"filsystem"
msgstr "reserverade block för storleksändring under drift stöds inte på icke-glesa filsystem"
#: misc/mke2fs.c:1437
msgid "blocks per group count out of range"
@ -4546,6 +4496,3 @@ msgstr "metadatablock"
#, c-format
msgid "Should never happen: resize inode corrupt!\n"
msgstr "Skulle aldrig inträffa: storleksändringsinoden trasig!\n"
#~ msgid "Couldn't find ext2 superblock,"
#~ msgstr "Kunde inte hitta ext2-superblock,"

View File

@ -413,10 +413,12 @@ int main (int argc, char ** argv)
if ((st_buf.st_size > new_file_size) &&
(fd > 0)) {
#ifdef HAVE_FSTAT64
#ifdef HAVE_FTRUNCATE64
ftruncate64(fd, new_file_size);
#else
ftruncate(fd, (off_t) new_file_size);
/* Only truncate if new_file_size doesn't overflow off_t */
if (((off_t) new_file_size) == new_file_size)
ftruncate(fd, (off_t) new_file_size);
#endif
}
if (fd > 0)

View File

@ -60,7 +60,7 @@ parameter is not specified, it will default to the size of the partition.
The
.B resize2fs
program does not manipulate the size of partitions. If you wish to enlarge
a filesystem, you must first make sure you can expand the size of the
a filesystem, you must make sure you can expand the size of the
underlying partition first. This can be done using
.BR fdisk (8)
by deleting the partition and recreating it with a larger size or using

View File

@ -15,7 +15,7 @@ Superblock backups stored on blocks:
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Filesystem features: resize_inode dir_index filetype sparse_super
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
@ -29,7 +29,7 @@ Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: resize_inode dir_index filetype sparse_super
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue

View File

@ -1,3 +1,4 @@
Warning: 256-byte inodes not usable on older systems
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
@ -13,21 +14,21 @@ Maximum filesystem blocks=16777216
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Filesystem features: resize_inode dir_index filetype sparse_super large_file
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super large_file
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/64 files (9.1% non-contiguous), 15/16384 blocks
test_filesys: 11/64 files (9.1% non-contiguous), 17/16384 blocks
Exit status is 0
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: resize_inode dir_index filetype sparse_super large_file
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super large_file
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
@ -35,7 +36,7 @@ Filesystem OS type: Linux
Inode count: 64
Block count: 16384
Reserved block count: 819
Free blocks: 16369
Free blocks: 16367
Free inodes: 53
First block: 0
Block size: 4096
@ -44,13 +45,13 @@ Reserved GDT blocks: 3
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 64
Inode blocks per group: 2
Inode blocks per group: 4
Mount count: 0
Check interval: 15552000 (6 months)
Reserved blocks uid: 0
Reserved blocks gid: 0
First inode: 11
Inode size: 128
Inode size: 256
Default directory hash: tea
@ -58,7 +59,7 @@ Group 0: (Blocks 0-16383)
Primary superblock at 0, Group descriptors at 1-1
Reserved GDT blocks at 2-4
Block bitmap at 5 (+5), Inode bitmap at 6 (+6)
Inode table at 7-8 (+7)
16369 free blocks, 53 free inodes, 2 directories
Free blocks: 15-16383
Inode table at 7-10 (+7)
16367 free blocks, 53 free inodes, 2 directories
Free blocks: 17-16383
Free inodes: 12-64

View File

@ -15,7 +15,7 @@ Superblock backups stored on blocks:
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Filesystem features: resize_inode dir_index filetype meta_bg sparse_super
Filesystem features: ext_attr resize_inode dir_index filetype meta_bg sparse_super
Pass 1: Checking inodes, blocks, and sizes
Reserved inode 9 (<Reserved inode 9>) has invalid mode. Clear? yes
@ -71,7 +71,7 @@ Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: resize_inode dir_index filetype meta_bg sparse_super
Filesystem features: ext_attr resize_inode dir_index filetype meta_bg sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue

View File

@ -15,7 +15,7 @@ Superblock backups stored on blocks:
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Filesystem features: resize_inode dir_index filetype meta_bg sparse_super
Filesystem features: ext_attr resize_inode dir_index filetype meta_bg sparse_super
Resize inode not valid. Recreate? yes
@ -133,7 +133,7 @@ Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: resize_inode dir_index filetype meta_bg sparse_super
Filesystem features: ext_attr resize_inode dir_index filetype meta_bg sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue

View File

@ -15,7 +15,7 @@ Superblock backups stored on blocks:
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Filesystem features: resize_inode dir_index filetype sparse_super
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
@ -29,7 +29,7 @@ Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: resize_inode dir_index filetype sparse_super
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue

View File

@ -18,7 +18,7 @@ Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: resize_inode dir_index filetype sparse_super
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
@ -319,7 +319,7 @@ Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: resize_inode dir_index filetype sparse_super
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
@ -856,7 +856,7 @@ Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: resize_inode dir_index filetype sparse_super
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
@ -1629,7 +1629,7 @@ Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: resize_inode dir_index filetype sparse_super
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue

View File

@ -16,7 +16,7 @@ Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: resize_inode dir_index filetype sparse_super
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
@ -464,7 +464,7 @@ Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: resize_inode dir_index filetype sparse_super
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
@ -621,7 +621,7 @@ Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: resize_inode dir_index filetype sparse_super
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue

View File

@ -7,5 +7,5 @@
* redistributed under the GNU Public License.
*/
#define E2FSPROGS_VERSION "1.40.4"
#define E2FSPROGS_DATE "31-Dec-2007"
#define E2FSPROGS_VERSION "1.40.5"
#define E2FSPROGS_DATE "27-Jan-2008"