ChangeLog, Makefile.in, bmap.c, bmove.c, ext2fs.h, jump.funcs:
ext2fs.h: If __STRICT_ANSI__ is defined and we're on a platform with
32 bit longs, then we need to manually define __s64 and __u64, since
the current kernel header files don't define these if __STRICT_ANSI__
is defined. This is a problem if we are compiling with full GCC
warnings, since we do need 64 bit support.
Makefile.in (OBJS): Remove bmove.o from files to be built, since we're
not using ext2fs_move_blocks() and there is some question as to its
usefulness in its current form.
bmap.c (block_bmap): Remove unused function.
bmove.c (process_block): Fix -Wall warning.
ChangeLog, debugfs.c, debugfs.h, dump.c:
debugfs.h: Add declaration for do_dirty_filsys() to prevent -Wall
warnings.
debugfs.c (copy_file):
dump.c (dump_file): Fix -Wall warning caused by signed/unsigned mismatch.
diff --git a/debugfs/ChangeLog b/debugfs/ChangeLog
index 834f8e1..fa3d50e 100644
--- a/debugfs/ChangeLog
+++ b/debugfs/ChangeLog
@@ -1,3 +1,12 @@
+1998-03-29 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * debugfs.h: Add declaration for do_dirty_filsys() to prevent
+ -Wall warnings.
+
+ * debugfs.c (copy_file):
+ * dump.c (dump_file): Fix -Wall warning caused by
+ signed/unsigned mismatch.
+
1998-03-23 Theodore Ts'o <tytso@rsts-11.mit.edu>
* debugfs.c, ls.c, lsdel.c: Add support for large files. (The
diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index 232d0be..3c66795 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
@@ -248,7 +248,7 @@
close_pager(out);
}
-void do_dirty_filesys(int argc, char *argv[])
+void do_dirty_filesys(int argc, char **argv)
{
if (check_fs_open(argv[0]))
return;
@@ -961,7 +961,7 @@
{
ext2_file_t e2_file;
errcode_t retval;
- int got, written;
+ unsigned int got, written;
char buf[8192];
char *ptr;
diff --git a/debugfs/debugfs.h b/debugfs/debugfs.h
index 0ac71cf..6ac13f9 100644
--- a/debugfs/debugfs.h
+++ b/debugfs/debugfs.h
@@ -39,7 +39,7 @@
extern void do_ncheck(int argc, char **argv);
/* debugfs.c */
-
+extern void do_dirty_filesys(int argc, char **argv);
extern void do_open_filesys(int argc, char **argv);
extern void do_close_filesys(int argc, char **argv);
extern void do_init_filesys(int argc, char **argv);
diff --git a/debugfs/dump.c b/debugfs/dump.c
index 6fcb140..d3919dd 100644
--- a/debugfs/dump.c
+++ b/debugfs/dump.c
@@ -69,7 +69,8 @@
struct utimbuf ut;
char buf[8192];
ext2_file_t e2_file;
- int nbytes, got;
+ int nbytes;
+ unsigned int got;
retval = ext2fs_read_inode(current_fs, ino, &inode);
if (retval) {
diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog
index 3ddfaff..5dd69c6 100644
--- a/lib/ext2fs/ChangeLog
+++ b/lib/ext2fs/ChangeLog
@@ -1,3 +1,21 @@
+1998-03-29 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * ext2fs.h: If __STRICT_ANSI__ is defined and we're on a platform
+ with 32 bit longs, then we need to manually define __s64
+ and __u64, since the current kernel header files don't
+ define these if __STRICT_ANSI__ is defined. This is a
+ problem if we are compiling with full GCC warnings, since
+ we do need 64 bit support.
+
+ * Makefile.in (OBJS): Remove bmove.o from files to be built,
+ since we're not using ext2fs_move_blocks() and there
+ is some question as to its usefulness in its current
+ form.
+
+ * bmap.c (block_bmap): Remove unused function.
+
+ * bmove.c (process_block): Fix -Wall warning.
+
1998-03-23 Theodore Ts'o <tytso@rsts-11.mit.edu>
* block.c (ext2fs_block_iterate3): Make the ref_offset field
diff --git a/lib/ext2fs/Makefile.in b/lib/ext2fs/Makefile.in
index 692512d..929760a 100644
--- a/lib/ext2fs/Makefile.in
+++ b/lib/ext2fs/Makefile.in
@@ -17,7 +17,6 @@
bitops.o \
block.o \
bmap.o \
- bmove.o \
check_desc.o \
closefs.o \
cmp_bitmaps.o \
@@ -66,7 +65,7 @@
$(srcdir)/block.c \
# $(srcdir)/brel_ma.c \
$(srcdir)/bmap.c \
- $(srcdir)/bmove.c \
+# $(srcdir)/bmove.c \
$(srcdir)/check_desc.c \
$(srcdir)/closefs.c \
$(srcdir)/cmp_bitmaps.c \
diff --git a/lib/ext2fs/bmap.c b/lib/ext2fs/bmap.c
index e4846e8..e4cf92a 100644
--- a/lib/ext2fs/bmap.c
+++ b/lib/ext2fs/bmap.c
@@ -38,19 +38,6 @@
#define inode_bmap(inode, nr) ((inode)->i_block[(nr)])
-static blk_t _BMAP_INLINE_ block_bmap(ext2_filsys fs, char *buf, blk_t nr)
-{
- blk_t tmp;
-
- tmp = ((blk_t *) buf)[nr];
-
- if ((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
- (fs->flags & EXT2_FLAG_SWAP_BYTES_READ))
- return ext2fs_swab32(tmp);
-
- return tmp;
-}
-
static errcode_t _BMAP_INLINE_ block_ind_bmap(ext2_filsys fs, int flags,
blk_t ind, char *block_buf,
int *blocks_alloc,
diff --git a/lib/ext2fs/bmove.c b/lib/ext2fs/bmove.c
index 24368e9..2745307 100644
--- a/lib/ext2fs/bmove.c
+++ b/lib/ext2fs/bmove.c
@@ -78,7 +78,7 @@
ext2fs_mark_block_bitmap(pb->alloc_map, block);
ret = BLOCK_CHANGED;
if (pb->flags & EXT2_BMOVE_DEBUG)
- printf("ino=%ld, blockcnt=%ld, %d->%d\n", pb->ino,
+ printf("ino=%ld, blockcnt=%lld, %d->%d\n", pb->ino,
blockcnt, orig, block);
}
if (pb->add_dir) {
diff --git a/lib/ext2fs/dll/jump.funcs b/lib/ext2fs/dll/jump.funcs
index 4995478..092f225 100644
--- a/lib/ext2fs/dll/jump.funcs
+++ b/lib/ext2fs/dll/jump.funcs
@@ -157,7 +157,8 @@
00000000 T _ext2fs_allocate_group_table libext2fs alloc_tables
00000000 T _ext2fs_set_bitmap_padding libext2fs bitmaps
00000000 T _ext2fs_bmap libext2fs bmap
-00000000 T _ext2fs_move_blocks libext2fs bmove
+#00000000 T _ext2fs_move_blocks libext2fs bmove
+00000000 T __DUMMY__ libext2fs bmove
00000000 T _ext2fs_file_open libext2fs fileio
00000000 T _ext2fs_file_get_fs libext2fs fileio
00000000 T _ext2fs_file_close libext2fs fileio
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
index eec5520..43ed653 100644
--- a/lib/ext2fs/ext2fs.h
+++ b/lib/ext2fs/ext2fs.h
@@ -45,6 +45,10 @@
#include "e2_types.h"
#else
#include <linux/types.h>
+#if (defined(__GNUC__) && defined(__STRICT_ANSI__) && ((~0UL) == 0xffffffff))
+typedef __signed__ long long __s64;
+typedef unsigned long long __u64;
+#endif
#endif
typedef __u32 blk_t;
@@ -245,11 +249,13 @@
#define BLOCK_COUNT_TIND (-3)
#define BLOCK_COUNT_TRANSLATOR (-4)
+#if 0
/*
* Flags for ext2fs_move_blocks
*/
#define EXT2_BMOVE_GET_DBLIST 0x0001
#define EXT2_BMOVE_DEBUG 0x0002
+#endif
/*
* Return flags for the directory iterator functions
@@ -552,11 +558,13 @@
blk_t block, blk_t *phys_blk);
+#if 0
/* bmove.c */
extern errcode_t ext2fs_move_blocks(ext2_filsys fs,
ext2fs_block_bitmap reserve,
ext2fs_block_bitmap alloc_map,
int flags);
+#endif
/* check_desc.c */
extern errcode_t ext2fs_check_desc(ext2_filsys fs);