Commit Graph

3817 Commits (2b1cae7a2697ec841c41579d29cdcb0ab39ef73e)

Author SHA1 Message Date
Eric Sandeen 3859977a6b debugfs.8: add documentation of the mmp commands
Document the dump_mmp and set_mmp_value commands in
the debugfs manpage.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-11-11 21:06:04 -05:00
Theodore Ts'o a9f46078c4 libext2fs: use HAVE_FSTAT64 instead of HAVE_STAT64 for ext2fs_stat()
Commit 6b56f3d92d introduced the use of HAVE_STAT64 without arranging
that it be defined in configure.in.  Previously ext4.h used
HAVE_OPEN64, but apparently there are (broken) platforms that have
open64() but not stat64().  Go figure.

We do need to consistently use a single test for ext2fs_stat(),
ext2fs_fstat(), and struct ext2fs_struct_stat, or we could end up
passing a struct stat64 to a fstat() system call, or some such.  I've
elected to use HAVE_FSTAT64 because: (a) it's already defined in the
configure script, and (b) if we ever come across a really broken
platform that defines fstat64() but not stat64(), we can always
emulate stat64() using open64() followed by a fstat64().

This commit fixed a bug whose symptoms were that mke2fs would not work
if given a file > 2GB on 32-bit platforms.

Addresses-Debian-Bug: #647245

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-11-10 07:33:02 -05:00
Eric Sandeen fc4fd955f7 libext2: advance group in ext2fs_open2 during swapping
Without this change, we go back to getting group descriptor
"0" each time we go around the "for i" loop.  It must properly
advance through the filesystem.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-11-10 07:02:04 -05:00
Theodore Ts'o 1e40ef8ee4 po: rebuild the .gmo files in the debian/rules file
This commit reverts commit aff534958b and transfers the
responsibility of rebuilding the .gmo files to the debian/rules file,
as updating the gmo files can cause problems for other distribution's
building systems.  (We do this because we don't update the .gmo files
when doing a mid-release snapshot, since binary files can't be
represented in diff files.  So we only update the .po files, and let
the package build process take care of the .gmo files.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-11-06 20:27:04 -05:00
Theodore Ts'o d1b75fd60c libext2fs: don't leak tdb_null out of the shared library namespace
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-11-05 14:55:30 -04:00
Theodore Ts'o 6b967cd6f1 Update for e2fsprogs 1.42-WIP-1016 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-16 22:12:07 -04:00
Gran Uddeborg c2c2b959bd po: update sv.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-16 21:53:39 -04:00
Jakub Bogusz 74ecc734c3 po: update pl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-16 21:53:39 -04:00
Benno Schulenberg ced4b912f5 po: update nl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-16 21:53:39 -04:00
Samuel Thibault 403ab4ba7e po: update fr.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-16 21:53:39 -04:00
Philipp Thomas 294dd5a350 po: update de.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-16 21:53:39 -04:00
Petr Pisar 629d0198fb po: update cs.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-16 21:53:39 -04:00
Theodore Ts'o 7f21666a3d libext2fs: allow ext2fs_get_memalign() to compile w/o posix_memalign()
Addresses-Sourceforge-Bug: #3219173

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-16 21:50:26 -04:00
Theodore Ts'o 0c80c44bd0 libext2fs: ext2fs_[set_]file_acl_block needs to check for 64-bit feature flag
The ext2fs_file_acl_block() and ext2fs_set_file_acl_block() needs to
only check i_file_acl_high if the 64-bit flag is set.  This is needed
because otherwise we will run into problems on Hurd systems which
actually use that field for h_i_mode_high.

This involves an ABI change since we need to pass ext2_filsys to these
functions.  Fortunately these functions were first included in the
1.42-WIP series, so it's OK for us to change them now.  (This is why
we have 1.42-WIP releases.  :-)

Addresses-Sourceforge-Bug: #3379227

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-16 20:46:49 -04:00
Theodore Ts'o 515e555a0c resize2fs: don't fail when shrinking an empty file system
This commit fixes a failure when running the commands:

dd if=/dev/zero of=fs bs=1k count=100k; mke2fs fs; resize2fs -Mp fs

We should not try truncating the file system if there is only a single
block group in the file system.

Addresses-Sourceforge-Bug: #3404051

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-16 19:29:40 -04:00
Lukas Czerner cacad7d641 resize2fs: Do not fail if EXT4_IOC_RESIZE_FS ioctl doesn't exist
Commit 9f6ba888f0 added support for new online resize ioctl
EXT4_IOC_RESIZE_FS. It is also trying to avoid failure when this
ioctl() is not supported by the kernel however it is checking wrong
error code (EINVAL).

When the ioctl does not exist, errno is set to ENOTTY, so we should
check for that, rather than EINVAL which means that ioctl arguments
are not valid. So change the code to check for ENOTTY and allow
resize2fs to try to use the old approach. Also add some comments.

Addresses-Red-Hat-Bugzilla: #746284
Addresses-Debian-Bug: #644989

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-16 18:18:51 -04:00
Theodore Ts'o 3871db6d14 Update for e2fsprogs 1.42-WIP-1009 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-09 22:25:01 -04:00
Theodore Ts'o db86523790 debian: Add explicit source format to specify 3.0 (quilt)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-09 22:24:13 -04:00
Gran Uddeborg a4cf6fc9fe po: update sv.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-09 22:23:57 -04:00
Samuel Thibault d9ac75de77 po: update fr.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-09 22:23:57 -04:00
Petr Pisar e7653f6cf8 po: update cs.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-09 22:23:57 -04:00
Theodore Ts'o 605cf6edaf filefrag: fix infinite loop in filefrag
Commit a00be17e47 was missing a patch hunk needed to prevent
filefrag from looping forever when it is run without the -v option.

Addresses-Debian-Bug: #644792

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-09 18:18:01 -04:00
Theodore Ts'o 3fcd8fe8ac Fix more spelling errors found by translators and add pluralization
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-09 17:54:23 -04:00
Theodore Ts'o d4d03cd3ff po: add @-expansion for @q to the at-expand.pl script
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-09 16:13:50 -04:00
Theodore Ts'o 5a1a785efe e2fsck: fix problem message for PR_1_QUOTA_BAD_MODE
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-09 15:13:34 -04:00
Theodore Ts'o d1c9b6ea5e dumpe2fs.8.in: add man page warning about mounted file systems
This should be obvious, but apparently not to all users...

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-08 13:50:10 -04:00
Darrick J. Wong 79a4dddbf7 e2fsck: recover revoke blocks on 64bit filesystems correctly
Since the advent of 64bit filesystems, revoke blocks store 64-bit
block numbers instead of 32-bit block numbers.  Therefore we need to
be able to handle that case.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-08 13:37:08 -04:00
Theodore Ts'o 84888e5543 Fix spelling errors pointed out by translators
Also remove the _("<foo>") marker from a string that was all numbers
and hence didn't need punctuation.

Thanks to Philipp Thomas and Goeran Uddeborg for reporting these
buglets.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-08 13:32:00 -04:00
Theodore Ts'o 9d0be127e9 debian: fix gcc-multilib dependency for mipsel as well as mips
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-08 13:28:53 -04:00
Theodore Ts'o 394550c81c debian: update the changelog for the e2fsprogs 1.42~WIP-2011-10-05-2 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-07 18:44:27 -04:00
Theodore Ts'o ee0de3e3e6 debian: add a mips-specific dependency on gcc-multilib
The debian mips package has to do some wierd things to include a
64-bit library in the 32-bit binary package.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-07 18:01:31 -04:00
Theodore Ts'o c4012e5a7a libext2fs: make ext2fs_open_file() always use 3 arguments instead of varargs
Some architectures have narrow mode_t's which can cause some
portability warnings with varargs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-06 13:28:07 -04:00
Theodore Ts'o f123e66549 debian: Add a dependency on the 1.42~WIP-2011-1005-1 version of libcom_err
Addresses-Debian-Bug: #644425

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05 15:32:36 -04:00
Theodore Ts'o 60e1c71d3c uuidgen: don't use set_com_err_gettext()
The uuidgen program doesn't use libcom_err.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05 15:03:59 -04:00
Theodore Ts'o 048c0e46d4 e2fsck: make e2fsck sigcatcher use SIGCHLD rather than SIGCLD
SIGCHLD is more portable than SIGCLD, which is a Linux specific thing

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05 14:47:09 -04:00
Theodore Ts'o b5ba6f5b9d libquota: remove flag argument to commit_dquot()
The flag parameter wasn't being used, and using it meant that we had
to define the COMMIT_* flags, which relied on the QIF_* flags being
present.  Removing this allows for increased portability.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05 13:26:59 -04:00
Theodore Ts'o d730094243 debian: update libcomerr2.symbols
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05 03:04:41 -04:00
Theodore Ts'o 299a1e8efa libcom_err: declare com_err_gettext to be static
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05 03:03:44 -04:00
Theodore Ts'o fd7c37fec1 Update for e2fsprogs 1.42-WIP-1005 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05 02:40:11 -04:00
Theodore Ts'o 6a287f7f66 Update e2fsprogs.pot file for translators
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05 02:08:10 -04:00
Philipp Thomas cfbdca17c0 po: update de.po (from translationproject.org)
Addresses-Debian-Bug: #520985

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-05 02:06:50 -04:00
Eric Sandeen 28e2cb9e72 mke2fs: Fix up usage & error text for cluster size specification
Commit c6ed60cd removed "f" (fragment size) from the getopt string,
and re-used its spot in the getopt switch, but didn't update the
usage message or the error message during parsing.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05 01:02:53 -04:00
Theodore Ts'o 9d4507c5b6 Pass the gettext() function to libcom_err
For those e2fsprogs programs which use libcom_err and are
internationalized, pass the gettext() function to libcom_err during
program initialization.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05 01:00:30 -04:00
Theodore Ts'o 4259052093 libcom_err: add set_com_err_gettext()
This function allows programs to pass in a pointer to the gettext
function so that error table strings will can be internationalized.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05 00:58:40 -04:00
Theodore Ts'o 789cb34d1a po: add prof_err.c, ext2_err.c and uuidd.c to POTFILES.in
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05 00:46:29 -04:00
Theodore Ts'o da5a6b4317 compile_et: generate *_err.c files that have strings marked for xgettext
This allows error code strings to be internationalized.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05 00:39:40 -04:00
Theodore Ts'o c93c1bc24b libquota: remove NLS support
In general libraries should never (a) call exit() or (b) print output
directly to the stdout (they might be used by GUI programs.  From (b)
follows (c), should never call internationalization functions
directly.

Also, since po/POTFILES.in wasn't edited, these strings weren't
getting included in e2fsprogs.pot for translation, so the _()
indirection didn't actually buy us anything.

We eventually need to nuke all of the log_fatal() and log_err() from
libquota, so best thing to do for now is remove NLS support
completely; no point whipsawing the translators with strings to
translate that will be disappearing soon anyway!

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-04 19:18:15 -04:00
Theodore Ts'o d6120a2a5e libquota: use ext2_loff_t instead of loff_t
The type loff_t is not portable.  Use ext2_loff_t which handles this
for us.

Cc: Aditya Kali <adityakali@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-04 19:18:15 -04:00
Theodore Ts'o 36e4e21f51 libquota: remove get_qf_name()
The get_qf_name() function used PATH_MAX, which is non-portable.
Worse, it blindly assumed that PATH_MAX was the size of the buffer
passed to it --- which in the one and only place where it was used in
libquota, was a buffer declared to a fixed size 256 bytes.

Fix this by simply getting rid of the function altogether.

Cc: Aditya Kali <adityakali@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-04 18:51:43 -04:00
Theodore Ts'o edbfd75d8f libquota: clean up some gcc -Wall warnings
Remove unused variables, places where 'return' was used with no value
in a non-void function, missing function declarations, etc.  Don't
assume that all systems have quotactl(), and use <sys/quota.h> if it
exists to define the quotactl interfaces.

One of the unused variables also got rid of a non-portable use of
PATH_MAX.

Cc: Aditya Kali <adityakali@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-04 11:37:46 -04:00