+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
$(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
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.
+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
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; \
\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
@title The EXT2FS Library
@subtitle The EXT2FS Library
-@subtitle Version 1.11
+@subtitle Version 1.12
@subtitle April 1997
@author by Theodore Ts'o
@top The EXT2FS Library
-This manual documents the EXT2FS Library, version 1.11.
+This manual documents the EXT2FS Library, version 1.12.
@end ifinfo
+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
@MCONFIG@
-PROGS= e2fsck @EXTRA_PROGS@
+PROGS= e2fsck
MANPAGES= e2fsck.8
XTRA_CFLAGS= -DRESOURCE_TRACK
#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
{
struct dir_info *dir;
int i, j;
+ ino_t num_dirs;
errcode_t retval;
#if 0
#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");
+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
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <time.h>
#include <string.h>
#if HAVE_SYS_STAT_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#if HAVE_SYS_STAT_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#if HAVE_SYS_STAT_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#if HAVE_SYS_STAT_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#if HAVE_SYS_STAT_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#if HAVE_SYS_STAT_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <linux/ext2_fs.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <linux/ext2_fs.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <fcntl.h>
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#if HAVE_SYS_STAT_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <time.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#if HAVE_SYS_STAT_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <string.h>
#include <time.h>
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;
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <string.h>
#include <time.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#if HAVE_ERRNO_H
#include <errno.h>
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <stdio.h>
#include <bios.h>
#include <string.h>
-#include <stdlib.h>
#include <ctype.h>
#include <io.h>
#ifdef HAVE_ERRNO_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <time.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <linux/ext2_fs.h>
#include <sys/types.h>
#endif
+#include <stdlib.h>
#include <linux/types.h>
typedef __u32 blk_t;
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <linux/ext2_fs.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <linux/ext2_fs.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <linux/ext2_fs.h>
#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>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#if HAVE_SYS_STAT_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#if HAVE_SYS_STAT_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#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>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <linux/ext2_fs.h>
#if HAVE_ERRNO_H
#include <errno.h>
#endif
-#include <stdlib.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <linux/ext2_fs.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#if HAVE_SYS_STAT_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
/* #define NAMEI_DEBUG */
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <linux/ext2_fs.h>
#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
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#if HAVE_SYS_STAT_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#if HAVE_SYS_STAT_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#ifdef HAVE_SYS_STAT_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#ifdef HAVE_SYS_STAT_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <time.h>
#include <linux/ext2_fs.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#if HAVE_SYS_STAT_H
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#include <sys/stat.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#include <sys/stat.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#include <sys/stat.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#if HAVE_SYS_STAT_H
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);
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;
}
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <linux/ext2_fs.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <string.h>
#include <time.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>