diff options
author | Theodore Ts'o <tytso@mit.edu> | 1998-03-30 01:27:25 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 1998-03-30 01:27:25 +0000 |
commit | 4a31c48b827f378f386b28461fd14b41d709e4eb (patch) | |
tree | 9eaae601bd53360b6e46387edbc3cf8c6439b379 | |
parent | a789d8406070224503c9ab78040acc7ea80c65ae (diff) | |
download | e2fsprogs-4a31c48b827f378f386b28461fd14b41d709e4eb.tar.gz |
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.
-rw-r--r-- | debugfs/ChangeLog | 9 | ||||
-rw-r--r-- | debugfs/debugfs.c | 4 | ||||
-rw-r--r-- | debugfs/debugfs.h | 2 | ||||
-rw-r--r-- | debugfs/dump.c | 3 | ||||
-rw-r--r-- | lib/ext2fs/ChangeLog | 18 | ||||
-rw-r--r-- | lib/ext2fs/Makefile.in | 3 | ||||
-rw-r--r-- | lib/ext2fs/bmap.c | 13 | ||||
-rw-r--r-- | lib/ext2fs/bmove.c | 2 | ||||
-rw-r--r-- | lib/ext2fs/dll/jump.funcs | 3 | ||||
-rw-r--r-- | lib/ext2fs/ext2fs.h | 8 |
10 files changed, 44 insertions, 21 deletions
diff --git a/debugfs/ChangeLog b/debugfs/ChangeLog index 834f8e19..fa3d50ec 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 232d0bef..3c667955 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -248,7 +248,7 @@ void do_show_super_stats(int argc, char *argv[]) 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 @@ static errcode_t copy_file(int fd, ino_t newfile) { 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 0ac71cf2..6ac13f9f 100644 --- a/debugfs/debugfs.h +++ b/debugfs/debugfs.h @@ -39,7 +39,7 @@ extern void do_icheck(int argc, char **argv); 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 6fcb140b..d3919dd1 100644 --- a/debugfs/dump.c +++ b/debugfs/dump.c @@ -69,7 +69,8 @@ static void dump_file(char *cmdname, ino_t ino, int fd, int preserve, 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 3ddfaffb..5dd69c6b 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 692512dc..929760ab 100644 --- a/lib/ext2fs/Makefile.in +++ b/lib/ext2fs/Makefile.in @@ -17,7 +17,6 @@ OBJS= ext2_err.o \ bitops.o \ block.o \ bmap.o \ - bmove.o \ check_desc.o \ closefs.o \ cmp_bitmaps.o \ @@ -66,7 +65,7 @@ SRCS= ext2_err.c \ $(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 e4846e81..e4cf92a0 100644 --- a/lib/ext2fs/bmap.c +++ b/lib/ext2fs/bmap.c @@ -38,19 +38,6 @@ extern errcode_t ext2fs_bmap(ext2_filsys fs, ino_t ino, #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 24368e9d..2745307c 100644 --- a/lib/ext2fs/bmove.c +++ b/lib/ext2fs/bmove.c @@ -78,7 +78,7 @@ static int process_block(ext2_filsys fs, blk_t *block_nr, 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 4995478d..092f2252 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 eec55208..43ed653c 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 @@ struct struct_ext2_filsys { #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 @@ extern errcode_t ext2fs_bmap(ext2_filsys fs, ino_t ino, 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); |