Commit Graph

61 Commits (75fc42f1a1fa98a722540e6a2761be17126dd080)

Author SHA1 Message Date
Theodore Ts'o 75fc42f1a1 debugfs: add commands to query the quota information
This allows us to verify quota information in an ext4 file systems
with the quota feature.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Aditya Kali <adityakali@google.com>
2014-05-13 10:13:19 -04:00
Theodore Ts'o fedfb27fe5 Add coverage testing using gcov
To check the coverage of e2fsprogs's regression test, do the
following:

	configure --enable-gcov
	make -j8 ; make -j8 check ; make coverage.txt

The coverage information will be the coverage.txt and *.gcov files in
the build directories.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-02-23 00:17:09 -05:00
Theodore Ts'o 6c59a665da configure: fix --with-diet-libc
Newer versions of autoconf pull in AC_PROG_GCC as part of
AC_CANONICAL_HOST.  So we need check for WITH_DIET_LIBC earlier in
configure.in.

Also, e2fsprogs now needs functions which are found in diet libc's
compat library.  So add support for autoconf's LIBS function, and
automatically set libs to include -lcompat.

Finally, disable compiling e4defrag by deault if --with-diet-libc is
specified because the program has too many glibc dependencies.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-05 22:58:16 -05:00
Darrick J. Wong 832cb612f8 e2fsprogs: add (optional) sparse checking to the build
Run sparse against source files when building e2fsprogs with 'make C=1'.  If
instead C=2, it configures basic ext2 types for bitwise checking with sparse,
which can help find the (many many) spots where conversion errors are
(possibly) happening.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-10-11 23:12:40 -04:00
Theodore Ts'o ba75d9e208 debugfs: add the commands "zap_block" and "block_dump"
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-12-24 10:49:45 -05:00
Theodore Ts'o 2168df757a debugfs: add a makefile rule to build debugfs.static
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-12-24 10:49:45 -05:00
Theodore Ts'o bee7b67ce9 debugfs: add the ability to manipulate the extent tree directly
This commit adds the functionality which had previously only been in
the tst_extents command to debugfs.  The debugfs command extent_open
will open extent tree of a particular inode, and enables a series of
commands which will allow the user to interact with the extent tree
directly.  Once the extent tree is closed via extent_open(), these
additional commands will be disabled again.

This commit exports two new functions from lib/ext2fs/extent.c which
had previously been statically defined: ext2fs_extent_node_split() and
ext2fs_extent_goto2().

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-12-24 10:49:41 -05:00
Theodore Ts'o f62516f33b rdebugfs: don't install by default
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-11-21 08:24:44 -05:00
Theodore Ts'o c4ab66c526 debugfs: add filefrag command
Add the ability to report on the fragmentation of a file on a file
system opened using debugfs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-11-18 22:14:15 -05:00
Theodore Ts'o 5e96c5721d debugfs: add the freefrag command
The freefrag command provides the functionality of e2freefrag on the
currently open file system in debugfs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-11-18 22:12:12 -05:00
Theodore Ts'o e88c5a33a8 debugfs: build read-only variant of debugfs
Create a version of debugfs which only supports read-only examination
of the file system metadata (but not the data blocks).  The idea is
that this version of debugfs might be suitable to be setuid root, and
executable only by members of a particular group, or setgid disk, and
globally executable, depending on the security/privacy policies in
force at a particular site.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-11-18 22:08:53 -05:00
Theodore Ts'o e1f0850795 Don't use in-tree header files if using system uuid or blkid libraries
This commit forces the use of the system-provided blkid or uuid header
files if we are using the system-provided blkid or uuid libraries.
This avoids using the in-tree header files with the system libraries.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-10-04 14:45:08 -04:00
Theodore Ts'o c13351f6c5 Add support for configure --enable-verbose-makecmds
Some people don't want to see the concise "kernel-style" make output.
This configure option allows build engines that want to see the full
set of commands executed by the makefile to get what they want.  Most
people will find this more distracting than useful, unless they need
to debug the Makefiles.

(It is not necessary to rerun configure to enable this verbose make
output temprarily; if a developer wants to do a quick debug of a
directory's makefile, he or she can simply edit the definition of the
$(E) and $(Q) variables in the Makefile; instructions can be found in
the MCONFIG file which is included in at the beginning of every
Makefile.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-02 00:11:17 -04:00
Theodore Ts'o a6a1c0815c Fix Makefile dependencies for libcom_err
The e2fsprogs makefiles were using the same Makefile variable
LIBCOM_ERR for the link-line arguments as well as the dependencies.
Since LIBCOM_ERR can now include non-file arguments such as
"-lpthread", we need to use a separate DEPLIBCOM_ERR variable that
only has build file dependencies.

Do the same thing for STATIC_LIBCOM_ERR and PROFILED_LIBCOM_ERR.

Addresses-Sourceforge-Patches: #2813809

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-01 22:06:51 -04:00
Theodore Ts'o 9d99416ea3 Fix dependency for $(LIBSS) when an explicit dlopen() library is needed
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-06-07 21:53:35 -04:00
Theodore Ts'o daf7a6e5d1 Fix tst_extents build when building w/o dynamic libraries
$(LIBSS) should automatically include @DLOPEN_LIB@ so the right thing
happens for programs that need to use the ss library.

Reorder the library link order for tst_extents since the blkid library
uses libuuid functions.

Thanks to Eric Sandeen for pointing this problem out!

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-17 16:56:09 -04:00
Theodore Ts'o cce2f497e0 Fix Debian FTBFS problem caused by devmapper library using pthreads
Addresses Debian bug: #388718

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-10-01 22:18:08 -04:00
Theodore Ts'o 75e93ab097 Update "make depend" information. Fixes SMP parallel build problem.
(Addresses Sourceforge Bug: #1157933)
2005-05-06 09:37:58 -04:00
Theodore Ts'o 7dec050a80 Enhance debugfs so that set_super_value can now set the wtime, mtime,
lastcheck, and mkfs_time fields with date/time values.

Add the set_inode command to debugfs so that individual inode fields can
be more easily modified.  We should probably make the modify_inode
command go away at some point.
2004-12-21 20:37:36 -05:00
Theodore Ts'o 522798d342 Add install-strip and install-shlibs-strip targets
Use Linux-kernel-style makefile output for "make install"

Update intl/Makefile.in to version from gettext 0.14.1
2004-12-15 11:28:55 -05:00
Theodore Ts'o 6d4022786d Use MKINSTALLDIRS macro so that the Makefiles can find the script
correctly.

Update Makefile dependencies.

Update "make depend" production so that it filters out comments
inserted by newer gcc compilers.

Remove sync from e2fsck's "make all" target.
2004-12-14 21:46:26 -05:00
Theodore Ts'o 47204ff983 Use Linux-kernel-style makefile output to make it easier to
see errors/warnings.
2004-11-30 10:52:27 -05:00
Theodore Ts'o dd60705665 Refine the build process to avoid re-running subst all the time on
some generated files, by having subst update the modtime on these 
files even when the generated file hasn't changed.  We do this with 
generated files that do not have any downstream dependencies.
2004-04-03 13:53:46 -05:00
Theodore Ts'o a5fdcd5946 unused.c (do_dump_unused): Add new command which dumps the
unused blocks.  (Initial implementation; currently only
	dumps the output to stdout.)
2003-05-21 17:58:36 -04:00
Theodore Ts'o a2146af295 Update after "make depend". 2003-04-17 23:37:28 -04:00
Theodore Ts'o 6cca7ba96d Update dependency information in Makefiles 2003-03-16 20:21:16 -05:00
Theodore Ts'o 3ae497eab2 Add to the ss (subsystem) library the ability to dynamically link
to the readline library if it is present in the system.
2003-03-16 06:26:25 -05:00
Theodore Ts'o f364093b19 Update debugfs and e2fsck to use the blkid library. 2003-03-01 19:47:44 -05:00
Theodore Ts'o f606dd32ff Update "make depend". 2002-11-08 14:31:03 -05:00
Theodore Ts'o 482afc442d Makefile.in (install): Search all compression extensions when
deleting old man pages.
2002-10-31 03:32:34 -05:00
Theodore Ts'o 7380ac9033 Two bug fixes to debugfs, courtesy of Jaroslav Drzik <jdrzik@host.sk> for suggesting this enh ancement.
1) The modify_inode command was core dumping if no filesystem was open.

2) The lsdel command command now uses the pager.

Also updated the Makefile.in file with "make depend".
2002-03-05 01:57:53 -05:00
Theodore Ts'o df614db6ef Add initial support in debugfs for examining directory indexing
information.
2002-02-25 04:28:45 -05:00
Theodore Ts'o b9f409255e Update makefiles to install mkfs.ext3, and to install man pages for
mkfs.ext2/3 and fsck.ext2/3.  Also remove any compressed man pages
before installing the man pages.
2002-02-24 03:08:57 -05:00
Theodore Ts'o 96b5cacc04 Miscellaneous cleanup before 1.26-WIP release. Removed unused
.cvsignore in include/asm directory so it can disappear.  Updated
makefile dependencies, and stop including <topsrc>/include in the
-I search path, since it's no longer needed.
2001-12-24 15:33:49 -05:00
Theodore Ts'o 19007e51a5 Move linux/jbd.h to ext2fs/kernel-jbd.h, to avoid using the
system header file version of hbd.h when using diet glibc
(since it forcibly adds /usr/include to the beginning of include
search path.)
2001-12-23 19:33:51 -05:00
Theodore Ts'o 8cf93332d1 Fix e2fsck's handling of external journals,and update journal
recovery files from 2.4.17-pre8.
2001-12-16 02:23:36 -05:00
Theodore Ts'o 571fc5a89c Fixes necessary for e2fsprogs to work using the diet libc.
- Renamed linux/list.h to be linux/linked_list.h to work around a
  problem caused by diet libc insistence to search the kernel
  header files ahead of all other files in the include path, 
  including the user specified include files.

- Worked around a bug in diet libc which core dumps when using 
  putc with stderr by using fputs instead.  As a bonus, this
  also shaved a few bytes off of com_err.o.

- Fixed a real bug in debugfs which was detected because diet libc
  was more sensitive than glibc when incorrectly using fclose()
  where pclose() is required.
2001-12-02 17:23:27 +01:00
Theodore Ts'o 797f5ef14e ChangeLog, wordwrap.pl:
Makefile.in: Move include/asm/types.h.in to lib/ext2fs/ext2_fs.h.in.
  wordwrap.pl: Add some rules which help fix up the dependencies.
Many files:
  Move include/asm/types.h.in to lib/ext2fs/ext2_fs.h.in.
2001-06-01 23:49:46 +00:00
Theodore Ts'o 54c637d4d2 Many files:
badblocks.c, chattr.c, dumpe2fs.c, e2image.c, findsuper.c, lsattr.c,
  	mke2fs.c, mklost+found.c, tune2fs.c, util.c: Change location of
  	ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, resize2fs.h:
  resize2fs.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, debugfs.h:
  debugfs.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, e2fsck.h, scantest.c:
  e2fsck.h, scantest.c: Change location of ext2_fs.h to be
  	ext2fs/ext2_fs.h
ChangeLog, Makefile.in, tst_uuid.c, uuid_time.c:
  tst_uuid.c, uuid_time.c: Remove unneeded #include of ext2_fs.h
ChangeLog, Makefile.in, e2p.h:
  e2p.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, test_icount.c, test_rel.c:
  test_icount.c, test_rel.c: Change location of ext2_fs.h to be
  	ext2fs/ext2_fs.h
2001-05-14 11:45:38 +00:00
Theodore Ts'o da81e3fcfe Many files:
debugfs.c (dump_blocks, dump_inode, internal_dump_inode): Add
  	internal_dump_inode() interface for the logdump command.
  logdump.c: Imported code from Stephen Tweedie to dump the ext3 journal.
2001-03-29 20:49:58 +00:00
Theodore Ts'o a05c589a5e Makefile.in:
Update makefile dependencies
2001-01-18 02:37:21 +00:00
Theodore Ts'o 0e8a9560d8 Many files:
jfs_e2fsck.h, jfs_user.h: Replaces jfs_compat.h.  The jfs.h file has
  	been moved to the include/linux directory.
  journal.c, revoke.c, recovery.c: Updated files from Stephen to support
  	the V2 superblock and revoke processing.  The journal.c and revoke.c
  	files are copies from the ext3 kernel source.
  Makefile.in: Added revoke.c to the list of source/object files.
Makefile.in:
  Fix up some mistakes in the source file list, and regenerate the
  dependencies.
  Update Makefile dependencies.
ChangeLog, jfs.h:
  jfs.h: Remove excess #include of JFS_DEBUG.  Not needed for e2fsprogs,
  	since we optioanlly define it in the configuration file system.
2000-12-09 06:41:25 +00:00
Theodore Ts'o c6bd0c97e4 Makefile.in, debug_cmds.ct, setsuper.c, ChangeLog:
setsuper.c: New function which implements the set_super_value command.
  	Allows the user to set arbitrary superblock fields.
ChangeLog, util.c:
  util.c (open_pager): If the PAGER environment variable is not set,
  	default to using "more".
2000-08-14 20:37:09 +00:00
Theodore Ts'o 619dd191ef ChangeLog, Makefile.in:
Makefile.in: Use _SS_DIR_OVERRIDE to make sure we get the mk_cmds
  	support files from the source tree.
.cvsignore:
  Add std_rqs.c to the ignore list.
2000-07-04 12:37:55 +00:00
Theodore Ts'o 77200f4ed7 ChangeLog, MCONFIG.in:
MCONFIG.in (DEPLIBUUID): Since LIBUUID can sometimes include
  	"-lsocket" we need a separate DEPLIBUUID that can be used in
  	Makefile's dependency rules.
ChangeLog, Makefile.in:
  Makefile.in: Since LIBUUID can sometimes include "-lsocket" we need a
  	separate DEPLIBUUID that can be used in Makefile's dependency rules.
2000-01-18 17:53:27 +00:00
Theodore Ts'o 5c36a2f85b ChangeLog, Makefile.in:
Makefile.in (distclean): Remove TAGS and Makefile.in.old from the
  	source directory.  Also, when making the .exclude file for the
  	source_tar_file, exclude those two files as well.
  Makefile.in (distclean): Remove TAGS and Makefile.in.old from the
  	source directory.
1999-11-19 18:42:30 +00:00
Theodore Ts'o 9094f28440 ChangeLog, mke2fs.c:
mke2fs.c (set_fs_defaults): Changed parameter name to avoid gcc
  	warnings.
Makefile.in:
  Update dependency information.
1999-10-26 16:42:50 +00:00
Theodore Ts'o d3aea7dc1b ChangeLog, Makefile.in, debug_cmds.ct, debugfs.8.in, debugfs.c:
debugfs.c, debug_cmds.ct: Add new debugfs command "feature" which
  	allows the user to set or clear filesystme features.  Add the -f
  	(force) option to the open command.  Add the -h (superblock header
  	only) option to the stats command.
1999-09-14 20:55:37 +00:00
Theodore Ts'o 6c133523b2 ChangeLog, MCONFIG.in, configure.in, configure:
MCONFIG.in (BUILD_CC):
  configure.in (BUILD_CC): If cross compiling, find the native C
  	compiler and set it to BUILD_CC so that we can successfully build
  	util/subst.
ChangeLog, Makefile.in:
  Makefile.in (subst): Build subst using $(BUILD_CC), since it's a
  	helper program which must be built using the native C compiler during
  	a cross-compilation.
Makefile.in:
  Update dependencies.
1999-07-03 20:37:03 +00:00
Theodore Ts'o dba838b09e ChangeLog, Makefile.in:
Makefile.in: Updated dependencies.
1998-12-04 06:15:12 +00:00