Whamcloud - gitweb
Many files:
authorTheodore Ts'o <tytso@mit.edu>
Mon, 1 Dec 1997 18:24:10 +0000 (18:24 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 1 Dec 1997 18:24:10 +0000 (18:24 +0000)
  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.

61 files changed:
ChangeLog
Makefile.in
configure.in
debugfs/ChangeLog
debugfs/Makefile.in
doc/libext2fs.texinfo
e2fsck/ChangeLog
e2fsck/Makefile.in
e2fsck/dirinfo.c
lib/ext2fs/ChangeLog
lib/ext2fs/alloc.c
lib/ext2fs/alloc_tables.c
lib/ext2fs/badblocks.c
lib/ext2fs/bb_compat.c
lib/ext2fs/bb_inode.c
lib/ext2fs/bitmaps.c
lib/ext2fs/block.c
lib/ext2fs/bmap.c
lib/ext2fs/bmove.c
lib/ext2fs/brel_ma.c
lib/ext2fs/check_desc.c
lib/ext2fs/closefs.c
lib/ext2fs/cmp_bitmaps.c
lib/ext2fs/dblist.c
lib/ext2fs/dblist_dir.c
lib/ext2fs/dir_iterate.c
lib/ext2fs/dirblock.c
lib/ext2fs/dosio.c
lib/ext2fs/dupfs.c
lib/ext2fs/expanddir.c
lib/ext2fs/ext2fs.h
lib/ext2fs/fileio.c
lib/ext2fs/freefs.c
lib/ext2fs/get_pathname.c
lib/ext2fs/getsize.c
lib/ext2fs/icount.c
lib/ext2fs/initialize.c
lib/ext2fs/inline.c
lib/ext2fs/inode.c
lib/ext2fs/irel_ma.c
lib/ext2fs/ismounted.c
lib/ext2fs/link.c
lib/ext2fs/llseek.c
lib/ext2fs/lookup.c
lib/ext2fs/mkdir.c
lib/ext2fs/namei.c
lib/ext2fs/newdir.c
lib/ext2fs/openfs.c
lib/ext2fs/read_bb.c
lib/ext2fs/read_bb_file.c
lib/ext2fs/rs_bitmap.c
lib/ext2fs/rw_bitmaps.c
lib/ext2fs/swapfs.c
lib/ext2fs/test_io.c
lib/ext2fs/tst_badblocks.c
lib/ext2fs/tst_getsize.c
lib/ext2fs/tst_iscan.c
lib/ext2fs/unix_io.c
lib/ext2fs/unlink.c
lib/ext2fs/valid_blk.c
lib/ext2fs/version.c

index c36ea45..f763411 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Nov 25 15:56:29 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * 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  <tytso@rsts-11.mit.edu>
 
        * configure.in: Add check for setjmp.h
index c20efdd..11c92c6 100644 (file)
@@ -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
index 2bc42ee..8b5f4b5 100644 (file)
@@ -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.
index edbccd1..ce82acf 100644 (file)
@@ -1,3 +1,7 @@
+Mon Dec  1 13:21:09 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * Makefile.in: Install debugfs in /sbin, instead of /usr/sbin.
+
 Sat Oct 25 18:35:30 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
 
        * debugfs.c (copy_file), dump.c (dump_file): Change to use the new
index 4dec962..b52d9e7 100644 (file)
@@ -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; \
index d9c2ef1..ffb70eb 100644 (file)
@@ -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
 
index 17a76b7..3413db6 100644 (file)
@@ -1,3 +1,13 @@
+Fri Nov 28 09:30:26 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * 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  <tytso@rsts-11.mit.edu>
+
+       * 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  <tytso@rsts-11.mit.edu>
 
        * pass1.c (e2fsck_pass1_check_device_inode): For now, only check
index 82acdb9..8f12cb6 100644 (file)
@@ -12,7 +12,7 @@ LDFLAG_STATIC = @LDFLAG_STATIC@
 
 @MCONFIG@
 
-PROGS=         e2fsck @EXTRA_PROGS@
+PROGS=         e2fsck
 MANPAGES=      e2fsck.8
 XTRA_CFLAGS=   -DRESOURCE_TRACK
 
index 38a8e43..2ab4a94 100644 (file)
@@ -8,18 +8,6 @@
 #include <et/com_err.h>
 #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");
index e54ef4e..bbe2478 100644 (file)
@@ -1,3 +1,12 @@
+Fri Nov 28 09:26:31 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * 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  <tytso@rsts-11.mit.edu>
 
        * expanddir.c (ext2fs_expand_dir): Check to make sure the block
index 123860c..6e7b553 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <time.h>
 #include <string.h>
 #if HAVE_SYS_STAT_H
index 769aec9..8c42cd7 100644 (file)
@@ -15,7 +15,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #if HAVE_SYS_STAT_H
index ab1404d..fba2d99 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #if HAVE_SYS_STAT_H
index 4b52675..ec4911e 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #if HAVE_SYS_STAT_H
index abad675..eab5a78 100644 (file)
@@ -18,7 +18,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #if HAVE_SYS_STAT_H
index 0887e57..e50560c 100644 (file)
@@ -15,7 +15,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #if HAVE_SYS_STAT_H
index 2946003..c594d8d 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 
 #include <linux/ext2_fs.h>
 
index 43f9f31..ec421ce 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 
 #include <linux/ext2_fs.h>
 
index 6972257..0a5a80c 100644 (file)
@@ -11,7 +11,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
index 3f82a29..c515e4a 100644 (file)
@@ -14,7 +14,6 @@
 
 #include <fcntl.h>
 #include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
 #if HAVE_UNISTD_H
 #include <unistd.h>
index 602753d..0764ae4 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #if HAVE_SYS_STAT_H
index 4a880e8..b39b15d 100644 (file)
@@ -13,7 +13,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <time.h>
 #include <string.h>
 
index 9cec4d7..422606b 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #if HAVE_SYS_STAT_H
index cdf1bef..4c15922 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <string.h>
 #include <time.h>
 
@@ -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;
 
index 2c8b8a1..1594cdc 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <string.h>
 #include <time.h>
 
index 0784ef2..725cd47 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #if HAVE_ERRNO_H
 #include <errno.h>
 #endif
index 0bb7cc5..85a38de 100644 (file)
@@ -13,7 +13,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <string.h>
 #include <time.h>
 
index b1d7971..c6baddb 100644 (file)
@@ -11,7 +11,6 @@
 #include <stdio.h>
 #include <bios.h>
 #include <string.h>
-#include <stdlib.h>
 #include <ctype.h>
 #include <io.h>
 #ifdef HAVE_ERRNO_H
index f358eca..667726d 100644 (file)
@@ -13,7 +13,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <time.h>
 #include <string.h>
 
index fc14ad4..07973a4 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 
 #include <linux/ext2_fs.h>
 
index f9eb34e..f19fdbe 100644 (file)
@@ -36,6 +36,7 @@
 #include <sys/types.h>
 #endif
 
+#include <stdlib.h>
 #include <linux/types.h>
 
 typedef __u32          blk_t;
index 4f34fde..f0e55e1 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 
 #include <linux/ext2_fs.h>
 
index 71d1ef7..52a769e 100644 (file)
@@ -13,7 +13,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 
 #include <linux/ext2_fs.h>
 
index baa9af8..9ace71a 100644 (file)
@@ -23,7 +23,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 
 #include <linux/ext2_fs.h>
 
index c90708e..a8cd59c 100644 (file)
@@ -13,9 +13,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 #include <fcntl.h>
 #ifdef HAVE_LINUX_FS_H
 #include <linux/fs.h>
index 56e5013..72ef44d 100644 (file)
@@ -13,7 +13,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 
index 1fcff19..4ab44de 100644 (file)
@@ -15,7 +15,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #if HAVE_SYS_STAT_H
index 97c3d06..fc09668 100644 (file)
@@ -17,7 +17,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #if HAVE_SYS_STAT_H
index 8695ff0..d72e00c 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #if HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
index 6ff816b..2ca6fb5 100644 (file)
@@ -11,7 +11,6 @@
 
 #include <fcntl.h>
 #include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
 #if HAVE_UNISTD_H
 #include <unistd.h>
index 621fd18..0761ec8 100644 (file)
@@ -13,9 +13,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 #include <fcntl.h>
 #ifdef HAVE_LINUX_FS_H
 #include <linux/fs.h>
index a8e5150..978a6f3 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 
 #include <linux/ext2_fs.h>
 
index 9829444..5fd3559 100644 (file)
@@ -16,7 +16,6 @@
 #if HAVE_ERRNO_H
 #include <errno.h>
 #endif
-#include <stdlib.h>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 364f2a2..833ba4e 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 
 #include <linux/ext2_fs.h>
 
index 9348cb7..f517ba3 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #if HAVE_SYS_STAT_H
index 576a99f..f44c7df 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 
 /* #define NAMEI_DEBUG */
 
index 8e90a7a..ed29a6f 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 
 #include <linux/ext2_fs.h>
 
index 26c7f7b..7c0e2eb 100644 (file)
@@ -14,9 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 #include <fcntl.h>
 #include <time.h>
 #if HAVE_SYS_STAT_H
index 99c653d..4e9a5dd 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #if HAVE_SYS_STAT_H
index 7534c64..6cdb140 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #if HAVE_SYS_STAT_H
index aee4725..73df276 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #ifdef HAVE_SYS_STAT_H
index 7909fff..93b775c 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #ifdef HAVE_SYS_STAT_H
index b4330d6..1a780f6 100644 (file)
@@ -13,7 +13,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <time.h>
 
 #include <linux/ext2_fs.h>
index e2fe1cc..1ac0663 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #if HAVE_SYS_STAT_H
index 2063420..0324dd7 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #include <sys/stat.h>
index 232fc2d..49e8b6f 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #include <sys/stat.h>
index 2febe62..9f5874b 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #include <sys/stat.h>
index 53bedb9..2c1d3c9 100644 (file)
@@ -16,7 +16,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
 #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;
        }
        
index d880c47..bdaa7c1 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 
 #include <linux/ext2_fs.h>
 
index c7ca2b3..6d6734e 100644 (file)
@@ -14,7 +14,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <string.h>
 #include <time.h>
 
index 4e72f5c..e3c49cd 100644 (file)
@@ -13,7 +13,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 #include <ctype.h>