From 5be8dc2143c7b3b21a9b8fb56797dd855ee87560 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Mon, 1 Dec 1997 18:24:10 +0000 Subject: [PATCH] Many files: dblist.c (ext2fs_get_num_dirs): Make ext2fs_get_num_dirs more paranoid about validating the directory counts from the block group information. all files: Don't include stdlib.h anymore; include it in ext2_fs.h, since that file requires stdlib.h ChangeLog, Makefile.in, dirinfo.c: dirinfo.c (e2fsck_add_dir_info): Use ext2fs_get_num_dirs instead of e2fsck_get_num_dirs, which has been removed. Makefile.in (PROGS): Remove @EXTRA_PROGS@, since we don't want to compile and install flushb. ChangeLog, configure.in: Remove @EXTRA_PROGS@, since we aren't using it in 2fsck/Makefile.in anymore ChangeLog, Makefile.in: Install debugfs in /sbin, instead of /usr/sbin. libext2fs.texinfo: Update version string to be 1.12 Makefile.in: Fix bug in find script which made the exclusion list, where a '-' was missing from an -name option. --- ChangeLog | 5 +++++ Makefile.in | 2 +- configure.in | 4 ---- debugfs/ChangeLog | 4 ++++ debugfs/Makefile.in | 4 ++-- doc/libext2fs.texinfo | 6 +++--- e2fsck/ChangeLog | 10 ++++++++++ e2fsck/Makefile.in | 2 +- e2fsck/dirinfo.c | 19 +++++-------------- lib/ext2fs/ChangeLog | 9 +++++++++ lib/ext2fs/alloc.c | 1 - lib/ext2fs/alloc_tables.c | 1 - lib/ext2fs/badblocks.c | 1 - lib/ext2fs/bb_compat.c | 1 - lib/ext2fs/bb_inode.c | 1 - lib/ext2fs/bitmaps.c | 1 - lib/ext2fs/block.c | 1 - lib/ext2fs/bmap.c | 1 - lib/ext2fs/bmove.c | 1 - lib/ext2fs/brel_ma.c | 1 - lib/ext2fs/check_desc.c | 1 - lib/ext2fs/closefs.c | 1 - lib/ext2fs/cmp_bitmaps.c | 1 - lib/ext2fs/dblist.c | 14 ++++++++++---- lib/ext2fs/dblist_dir.c | 1 - lib/ext2fs/dir_iterate.c | 1 - lib/ext2fs/dirblock.c | 1 - lib/ext2fs/dosio.c | 1 - lib/ext2fs/dupfs.c | 1 - lib/ext2fs/expanddir.c | 1 - lib/ext2fs/ext2fs.h | 1 + lib/ext2fs/fileio.c | 1 - lib/ext2fs/freefs.c | 1 - lib/ext2fs/get_pathname.c | 1 - lib/ext2fs/getsize.c | 3 --- lib/ext2fs/icount.c | 1 - lib/ext2fs/initialize.c | 1 - lib/ext2fs/inline.c | 1 - lib/ext2fs/inode.c | 1 - lib/ext2fs/irel_ma.c | 1 - lib/ext2fs/ismounted.c | 3 --- lib/ext2fs/link.c | 1 - lib/ext2fs/llseek.c | 1 - lib/ext2fs/lookup.c | 1 - lib/ext2fs/mkdir.c | 1 - lib/ext2fs/namei.c | 1 - lib/ext2fs/newdir.c | 1 - lib/ext2fs/openfs.c | 3 --- lib/ext2fs/read_bb.c | 1 - lib/ext2fs/read_bb_file.c | 1 - lib/ext2fs/rs_bitmap.c | 1 - lib/ext2fs/rw_bitmaps.c | 1 - lib/ext2fs/swapfs.c | 1 - lib/ext2fs/test_io.c | 1 - lib/ext2fs/tst_badblocks.c | 1 - lib/ext2fs/tst_getsize.c | 1 - lib/ext2fs/tst_iscan.c | 1 - lib/ext2fs/unix_io.c | 5 ++--- lib/ext2fs/unlink.c | 1 - lib/ext2fs/valid_blk.c | 1 - lib/ext2fs/version.c | 1 - 61 files changed, 53 insertions(+), 86 deletions(-) diff --git a/ChangeLog b/ChangeLog index c36ea45..f763411 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Nov 25 15:56:29 1997 Theodore Ts'o + + * configure.in: Remove @EXTRA_PROGS@, since we aren't using it in + e2fsck/Makefile.in. + Tue Nov 4 10:46:18 1997 Theodore Ts'o * configure.in: Add check for setjmp.h diff --git a/Makefile.in b/Makefile.in index c20efdd..11c92c6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -100,7 +100,7 @@ SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \ $(srcdir)/.exclude-file: a=$(SRCROOT); \ (cd $(srcdir)/.. ; find e2fsprogs \( -name \*~ -o -name \*.orig \ - -o -name CVS -o -name \*.rej -o name Makefile.pq \) -print) \ + -o -name CVS -o -name \*.rej -o -name Makefile.pq \) -print) \ | sed -e "s/e2fsprogs/$$a/" > $(srcdir)/.exclude-file echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file echo "$(SRCROOT)/rpm.log" >> $(srcdir)/.exclude-file diff --git a/configure.in b/configure.in index 2bc42ee..8b5f4b5 100644 --- a/configure.in +++ b/configure.in @@ -408,12 +408,8 @@ dnl that holds enough to fake it (hopefully). Note that the $(top_srcdir) here dnl is quoted so that it gets expanded by make, not by configure. dnl AC_CHECK_HEADER(linux/fs.h, [linux_headers=yes], [linux_headers=no]) -AC_SUBST(EXTRA_PROGS) if test "$linux_headers" = yes; then AC_DEFINE(HAVE_LINUX_FS_H) - # These are some programs that depend on having linux headers around, and - # won't work otherwise. So we only compile them if we can. - EXTRA_PROGS="$EXTRA_PROGS flushb" else LINUX_INCLUDE='-I$(top_srcdir)/include -I$(top_builddir)/include' # Use this include directory with test compiles in the configure script too. diff --git a/debugfs/ChangeLog b/debugfs/ChangeLog index edbccd1..ce82acf 100644 --- a/debugfs/ChangeLog +++ b/debugfs/ChangeLog @@ -1,3 +1,7 @@ +Mon Dec 1 13:21:09 1997 Theodore Ts'o + + * Makefile.in: Install debugfs in /sbin, instead of /usr/sbin. + Sat Oct 25 18:35:30 1997 Theodore Ts'o * debugfs.c (copy_file), dump.c (dump_file): Change to use the new diff --git a/debugfs/Makefile.in b/debugfs/Makefile.in index 4dec962..b52d9e7 100644 --- a/debugfs/Makefile.in +++ b/debugfs/Makefile.in @@ -45,8 +45,8 @@ installdirs: install: $(PROGS) $(MANPAGES) installdirs for i in $(PROGS); do \ - $(INSTALL_PROGRAM) $$i $(DESTDIR)$(usbindir)/$$i; \ - $(STRIP) $(DESTDIR)$(usbindir)/$$i; \ + $(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir)/$$i; \ + $(STRIP) $(DESTDIR)$(sbindir)/$$i; \ done for i in $(MANPAGES); do \ $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \ diff --git a/doc/libext2fs.texinfo b/doc/libext2fs.texinfo index d9c2ef1..ffb70eb 100644 --- a/doc/libext2fs.texinfo +++ b/doc/libext2fs.texinfo @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @c %**start of header @setfilename libext2fs.info -@settitle The EXT2FS Library (version 1.11) +@settitle The EXT2FS Library (version 1.12) @synindex tp fn @comment %**end of header @@ -60,7 +60,7 @@ by the author. @title The EXT2FS Library @subtitle The EXT2FS Library -@subtitle Version 1.11 +@subtitle Version 1.12 @subtitle April 1997 @author by Theodore Ts'o @@ -101,7 +101,7 @@ by the Foundation. @top The EXT2FS Library -This manual documents the EXT2FS Library, version 1.11. +This manual documents the EXT2FS Library, version 1.12. @end ifinfo diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 17a76b7..3413db6 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,13 @@ +Fri Nov 28 09:30:26 1997 Theodore Ts'o + + * dirinfo.c (e2fsck_add_dir_info): Use ext2fs_get_num_dirs instead + of e2fsck_get_num_dirs, which has been removed. + +Tue Nov 25 15:54:35 1997 Theodore Ts'o + + * Makefile.in (PROGS): Remove @EXTRA_PROGS@, since we don't want + to compile and install flushb. + Mon Nov 24 06:48:00 1997 Theodore Ts'o * pass1.c (e2fsck_pass1_check_device_inode): For now, only check diff --git a/e2fsck/Makefile.in b/e2fsck/Makefile.in index 82acdb9..8f12cb6 100644 --- a/e2fsck/Makefile.in +++ b/e2fsck/Makefile.in @@ -12,7 +12,7 @@ LDFLAG_STATIC = @LDFLAG_STATIC@ @MCONFIG@ -PROGS= e2fsck @EXTRA_PROGS@ +PROGS= e2fsck MANPAGES= e2fsck.8 XTRA_CFLAGS= -DRESOURCE_TRACK diff --git a/e2fsck/dirinfo.c b/e2fsck/dirinfo.c index 38a8e43..2ab4a94 100644 --- a/e2fsck/dirinfo.c +++ b/e2fsck/dirinfo.c @@ -8,18 +8,6 @@ #include #include "e2fsck.h" -int e2fsck_get_num_dirs(e2fsck_t ctx) -{ - ext2_filsys fs = ctx->fs; - int i, num_dirs; - - num_dirs = 0; - for (i = 0; i < fs->group_desc_count; i++) - num_dirs += fs->group_desc[i].bg_used_dirs_count; - - return num_dirs; -} - /* * This subroutine is called during pass1 to create a directory info * entry. During pass1, the passed-in parent is 0; it will get filled @@ -29,6 +17,7 @@ void e2fsck_add_dir_info(e2fsck_t ctx, ino_t ino, ino_t parent) { struct dir_info *dir; int i, j; + ino_t num_dirs; errcode_t retval; #if 0 @@ -36,8 +25,10 @@ void e2fsck_add_dir_info(e2fsck_t ctx, ino_t ino, ino_t parent) #endif if (!ctx->dir_info) { ctx->dir_info_count = 0; - ctx->dir_info_size = e2fsck_get_num_dirs(ctx) + 10; - + retval = ext2fs_get_num_dirs(ctx->fs, &num_dirs); + if (retval) + num_dirs = 1024; /* Guess */ + ctx->dir_info_size = num_dirs + 10; ctx->dir_info = e2fsck_allocate_memory(ctx, ctx->dir_info_size * sizeof (struct dir_info), "directory map"); diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog index e54ef4e..bbe2478 100644 --- a/lib/ext2fs/ChangeLog +++ b/lib/ext2fs/ChangeLog @@ -1,3 +1,12 @@ +Fri Nov 28 09:26:31 1997 Theodore Ts'o + + * dblist.c (ext2fs_get_num_dirs): Make ext2fs_get_num_dirs more + paranoid about validating the directory counts from the + block group information. + + * all files: Don't include stdlib.h anymore; include it in + ext2_fs.h, since that file requires stdlib.h + Thu Nov 20 16:07:38 1997 Theodore Ts'o * expanddir.c (ext2fs_expand_dir): Check to make sure the block diff --git a/lib/ext2fs/alloc.c b/lib/ext2fs/alloc.c index 123860c..6e7b553 100644 --- a/lib/ext2fs/alloc.c +++ b/lib/ext2fs/alloc.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #if HAVE_SYS_STAT_H diff --git a/lib/ext2fs/alloc_tables.c b/lib/ext2fs/alloc_tables.c index 769aec9..8c42cd7 100644 --- a/lib/ext2fs/alloc_tables.c +++ b/lib/ext2fs/alloc_tables.c @@ -15,7 +15,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #if HAVE_SYS_STAT_H diff --git a/lib/ext2fs/badblocks.c b/lib/ext2fs/badblocks.c index ab1404d..fba2d99 100644 --- a/lib/ext2fs/badblocks.c +++ b/lib/ext2fs/badblocks.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #if HAVE_SYS_STAT_H diff --git a/lib/ext2fs/bb_compat.c b/lib/ext2fs/bb_compat.c index 4b52675..ec4911e 100644 --- a/lib/ext2fs/bb_compat.c +++ b/lib/ext2fs/bb_compat.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #if HAVE_SYS_STAT_H diff --git a/lib/ext2fs/bb_inode.c b/lib/ext2fs/bb_inode.c index abad675..eab5a78 100644 --- a/lib/ext2fs/bb_inode.c +++ b/lib/ext2fs/bb_inode.c @@ -18,7 +18,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #if HAVE_SYS_STAT_H diff --git a/lib/ext2fs/bitmaps.c b/lib/ext2fs/bitmaps.c index 0887e57..e50560c 100644 --- a/lib/ext2fs/bitmaps.c +++ b/lib/ext2fs/bitmaps.c @@ -15,7 +15,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #if HAVE_SYS_STAT_H diff --git a/lib/ext2fs/block.c b/lib/ext2fs/block.c index 2946003..c594d8d 100644 --- a/lib/ext2fs/block.c +++ b/lib/ext2fs/block.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include diff --git a/lib/ext2fs/bmap.c b/lib/ext2fs/bmap.c index 43f9f31..ec421ce 100644 --- a/lib/ext2fs/bmap.c +++ b/lib/ext2fs/bmap.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include diff --git a/lib/ext2fs/bmove.c b/lib/ext2fs/bmove.c index 6972257..0a5a80c 100644 --- a/lib/ext2fs/bmove.c +++ b/lib/ext2fs/bmove.c @@ -11,7 +11,6 @@ #if HAVE_UNISTD_H #include #endif -#include #if HAVE_SYS_TYPES_H #include #endif diff --git a/lib/ext2fs/brel_ma.c b/lib/ext2fs/brel_ma.c index 3f82a29..c515e4a 100644 --- a/lib/ext2fs/brel_ma.c +++ b/lib/ext2fs/brel_ma.c @@ -14,7 +14,6 @@ #include #include -#include #include #if HAVE_UNISTD_H #include diff --git a/lib/ext2fs/check_desc.c b/lib/ext2fs/check_desc.c index 602753d..0764ae4 100644 --- a/lib/ext2fs/check_desc.c +++ b/lib/ext2fs/check_desc.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #if HAVE_SYS_STAT_H diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c index 4a880e8..b39b15d 100644 --- a/lib/ext2fs/closefs.c +++ b/lib/ext2fs/closefs.c @@ -13,7 +13,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include diff --git a/lib/ext2fs/cmp_bitmaps.c b/lib/ext2fs/cmp_bitmaps.c index 9cec4d7..422606b 100644 --- a/lib/ext2fs/cmp_bitmaps.c +++ b/lib/ext2fs/cmp_bitmaps.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #if HAVE_SYS_STAT_H diff --git a/lib/ext2fs/dblist.c b/lib/ext2fs/dblist.c index cdf1bef..4c15922 100644 --- a/lib/ext2fs/dblist.c +++ b/lib/ext2fs/dblist.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include @@ -32,13 +31,20 @@ static int dir_block_cmp(const void *a, const void *b); errcode_t ext2fs_get_num_dirs(ext2_filsys fs, ino_t *ret_num_dirs) { int i; - ino_t num_dirs; + ino_t num_dirs, max_dirs; EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS); num_dirs = 0; - for (i = 0; i < fs->group_desc_count; i++) - num_dirs += fs->group_desc[i].bg_used_dirs_count; + max_dirs = 8 * fs->blocksize; + for (i = 0; i < fs->group_desc_count; i++) { + if (fs->group_desc[i].bg_used_dirs_count > max_dirs) + num_dirs += max_dirs; + else + num_dirs += fs->group_desc[i].bg_used_dirs_count; + } + if (num_dirs > fs->super->s_inodes_count) + num_dirs = fs->super->s_inodes_count; *ret_num_dirs = num_dirs; diff --git a/lib/ext2fs/dblist_dir.c b/lib/ext2fs/dblist_dir.c index 2c8b8a1..1594cdc 100644 --- a/lib/ext2fs/dblist_dir.c +++ b/lib/ext2fs/dblist_dir.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include diff --git a/lib/ext2fs/dir_iterate.c b/lib/ext2fs/dir_iterate.c index 0784ef2..725cd47 100644 --- a/lib/ext2fs/dir_iterate.c +++ b/lib/ext2fs/dir_iterate.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #if HAVE_ERRNO_H #include #endif diff --git a/lib/ext2fs/dirblock.c b/lib/ext2fs/dirblock.c index 0bb7cc5..85a38de 100644 --- a/lib/ext2fs/dirblock.c +++ b/lib/ext2fs/dirblock.c @@ -13,7 +13,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include diff --git a/lib/ext2fs/dosio.c b/lib/ext2fs/dosio.c index b1d7971..c6baddb 100644 --- a/lib/ext2fs/dosio.c +++ b/lib/ext2fs/dosio.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #ifdef HAVE_ERRNO_H diff --git a/lib/ext2fs/dupfs.c b/lib/ext2fs/dupfs.c index f358eca..667726d 100644 --- a/lib/ext2fs/dupfs.c +++ b/lib/ext2fs/dupfs.c @@ -13,7 +13,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include diff --git a/lib/ext2fs/expanddir.c b/lib/ext2fs/expanddir.c index fc14ad4..07973a4 100644 --- a/lib/ext2fs/expanddir.c +++ b/lib/ext2fs/expanddir.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h index f9eb34e..f19fdbe 100644 --- a/lib/ext2fs/ext2fs.h +++ b/lib/ext2fs/ext2fs.h @@ -36,6 +36,7 @@ #include #endif +#include #include typedef __u32 blk_t; diff --git a/lib/ext2fs/fileio.c b/lib/ext2fs/fileio.c index 4f34fde..f0e55e1 100644 --- a/lib/ext2fs/fileio.c +++ b/lib/ext2fs/fileio.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include diff --git a/lib/ext2fs/freefs.c b/lib/ext2fs/freefs.c index 71d1ef7..52a769e 100644 --- a/lib/ext2fs/freefs.c +++ b/lib/ext2fs/freefs.c @@ -13,7 +13,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include diff --git a/lib/ext2fs/get_pathname.c b/lib/ext2fs/get_pathname.c index baa9af8..9ace71a 100644 --- a/lib/ext2fs/get_pathname.c +++ b/lib/ext2fs/get_pathname.c @@ -23,7 +23,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include diff --git a/lib/ext2fs/getsize.c b/lib/ext2fs/getsize.c index c90708e..a8cd59c 100644 --- a/lib/ext2fs/getsize.c +++ b/lib/ext2fs/getsize.c @@ -13,9 +13,6 @@ #if HAVE_UNISTD_H #include #endif -#if HAVE_STDLIB_H -#include -#endif #include #ifdef HAVE_LINUX_FS_H #include diff --git a/lib/ext2fs/icount.c b/lib/ext2fs/icount.c index 56e5013..72ef44d 100644 --- a/lib/ext2fs/icount.c +++ b/lib/ext2fs/icount.c @@ -13,7 +13,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include diff --git a/lib/ext2fs/initialize.c b/lib/ext2fs/initialize.c index 1fcff19..4ab44de 100644 --- a/lib/ext2fs/initialize.c +++ b/lib/ext2fs/initialize.c @@ -15,7 +15,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #if HAVE_SYS_STAT_H diff --git a/lib/ext2fs/inline.c b/lib/ext2fs/inline.c index 97c3d06..fc09668 100644 --- a/lib/ext2fs/inline.c +++ b/lib/ext2fs/inline.c @@ -17,7 +17,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #if HAVE_SYS_STAT_H diff --git a/lib/ext2fs/inode.c b/lib/ext2fs/inode.c index 8695ff0..d72e00c 100644 --- a/lib/ext2fs/inode.c +++ b/lib/ext2fs/inode.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #if HAVE_SYS_STAT_H #include #endif diff --git a/lib/ext2fs/irel_ma.c b/lib/ext2fs/irel_ma.c index 6ff816b..2ca6fb5 100644 --- a/lib/ext2fs/irel_ma.c +++ b/lib/ext2fs/irel_ma.c @@ -11,7 +11,6 @@ #include #include -#include #include #if HAVE_UNISTD_H #include diff --git a/lib/ext2fs/ismounted.c b/lib/ext2fs/ismounted.c index 621fd18..0761ec8 100644 --- a/lib/ext2fs/ismounted.c +++ b/lib/ext2fs/ismounted.c @@ -13,9 +13,6 @@ #if HAVE_UNISTD_H #include #endif -#if HAVE_STDLIB_H -#include -#endif #include #ifdef HAVE_LINUX_FS_H #include diff --git a/lib/ext2fs/link.c b/lib/ext2fs/link.c index a8e5150..978a6f3 100644 --- a/lib/ext2fs/link.c +++ b/lib/ext2fs/link.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include diff --git a/lib/ext2fs/llseek.c b/lib/ext2fs/llseek.c index 9829444..5fd3559 100644 --- a/lib/ext2fs/llseek.c +++ b/lib/ext2fs/llseek.c @@ -16,7 +16,6 @@ #if HAVE_ERRNO_H #include #endif -#include #if HAVE_UNISTD_H #include #endif diff --git a/lib/ext2fs/lookup.c b/lib/ext2fs/lookup.c index 364f2a2..833ba4e 100644 --- a/lib/ext2fs/lookup.c +++ b/lib/ext2fs/lookup.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include diff --git a/lib/ext2fs/mkdir.c b/lib/ext2fs/mkdir.c index 9348cb7..f517ba3 100644 --- a/lib/ext2fs/mkdir.c +++ b/lib/ext2fs/mkdir.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #if HAVE_SYS_STAT_H diff --git a/lib/ext2fs/namei.c b/lib/ext2fs/namei.c index 576a99f..f44c7df 100644 --- a/lib/ext2fs/namei.c +++ b/lib/ext2fs/namei.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include /* #define NAMEI_DEBUG */ diff --git a/lib/ext2fs/newdir.c b/lib/ext2fs/newdir.c index 8e90a7a..ed29a6f 100644 --- a/lib/ext2fs/newdir.c +++ b/lib/ext2fs/newdir.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c index 26c7f7b..7c0e2eb 100644 --- a/lib/ext2fs/openfs.c +++ b/lib/ext2fs/openfs.c @@ -14,9 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#if HAVE_STDLIB_H -#include -#endif #include #include #if HAVE_SYS_STAT_H diff --git a/lib/ext2fs/read_bb.c b/lib/ext2fs/read_bb.c index 99c653d..4e9a5dd 100644 --- a/lib/ext2fs/read_bb.c +++ b/lib/ext2fs/read_bb.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #if HAVE_SYS_STAT_H diff --git a/lib/ext2fs/read_bb_file.c b/lib/ext2fs/read_bb_file.c index 7534c64..6cdb140 100644 --- a/lib/ext2fs/read_bb_file.c +++ b/lib/ext2fs/read_bb_file.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #if HAVE_SYS_STAT_H diff --git a/lib/ext2fs/rs_bitmap.c b/lib/ext2fs/rs_bitmap.c index aee4725..73df276 100644 --- a/lib/ext2fs/rs_bitmap.c +++ b/lib/ext2fs/rs_bitmap.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #ifdef HAVE_SYS_STAT_H diff --git a/lib/ext2fs/rw_bitmaps.c b/lib/ext2fs/rw_bitmaps.c index 7909fff..93b775c 100644 --- a/lib/ext2fs/rw_bitmaps.c +++ b/lib/ext2fs/rw_bitmaps.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #ifdef HAVE_SYS_STAT_H diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c index b4330d6..1a780f6 100644 --- a/lib/ext2fs/swapfs.c +++ b/lib/ext2fs/swapfs.c @@ -13,7 +13,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include diff --git a/lib/ext2fs/test_io.c b/lib/ext2fs/test_io.c index e2fe1cc..1ac0663 100644 --- a/lib/ext2fs/test_io.c +++ b/lib/ext2fs/test_io.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #if HAVE_SYS_STAT_H diff --git a/lib/ext2fs/tst_badblocks.c b/lib/ext2fs/tst_badblocks.c index 2063420..0324dd7 100644 --- a/lib/ext2fs/tst_badblocks.c +++ b/lib/ext2fs/tst_badblocks.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #include diff --git a/lib/ext2fs/tst_getsize.c b/lib/ext2fs/tst_getsize.c index 232fc2d..49e8b6f 100644 --- a/lib/ext2fs/tst_getsize.c +++ b/lib/ext2fs/tst_getsize.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #include diff --git a/lib/ext2fs/tst_iscan.c b/lib/ext2fs/tst_iscan.c index 2febe62..9f5874b 100644 --- a/lib/ext2fs/tst_iscan.c +++ b/lib/ext2fs/tst_iscan.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #include diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c index 53bedb9..2c1d3c9 100644 --- a/lib/ext2fs/unix_io.c +++ b/lib/ext2fs/unix_io.c @@ -16,7 +16,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #if HAVE_SYS_STAT_H @@ -195,7 +194,7 @@ static errcode_t unix_read_blk(io_channel channel, unsigned long block, size = (count < 0) ? -count : count * channel->block_size; location = (ext2_loff_t) block * channel->block_size; if (ext2fs_llseek(data->dev, location, SEEK_SET) != location) { - retval = errno ? errno : EXT2_IO_LLSEEK_FAILED; + retval = errno ? errno : EXT2_ET_LLSEEK_FAILED; goto error_out; } actual = read(data->dev, buf, size); @@ -244,7 +243,7 @@ static errcode_t unix_write_blk(io_channel channel, unsigned long block, location = (ext2_loff_t) block * channel->block_size; if (ext2fs_llseek(data->dev, location, SEEK_SET) != location) { - retval = errno ? errno : EXT2_IO_LLSEEK_FAILED; + retval = errno ? errno : EXT2_ET_LLSEEK_FAILED; goto error_out; } diff --git a/lib/ext2fs/unlink.c b/lib/ext2fs/unlink.c index d880c47..bdaa7c1 100644 --- a/lib/ext2fs/unlink.c +++ b/lib/ext2fs/unlink.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include diff --git a/lib/ext2fs/valid_blk.c b/lib/ext2fs/valid_blk.c index c7ca2b3..6d6734e 100644 --- a/lib/ext2fs/valid_blk.c +++ b/lib/ext2fs/valid_blk.c @@ -14,7 +14,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include diff --git a/lib/ext2fs/version.c b/lib/ext2fs/version.c index 4e72f5c..e3c49cd 100644 --- a/lib/ext2fs/version.c +++ b/lib/ext2fs/version.c @@ -13,7 +13,6 @@ #if HAVE_UNISTD_H #include #endif -#include #include #include #include -- 1.8.3.1