printf("%s(0x%8.8xL)\n", trans, table[len - 1]);
}
-int main(int argc, char** argv)
+#ifdef __GNUC__
+#define ATTR(x) __attribute__(x)
+#else
+#define ATTR(x)
+#endif
+
+int main(int argc ATTR((unused)), char** argv ATTR((unused)))
{
printf("/* this file is generated - do not edit */\n\n");
typedef unsigned int __be32;
-/*
- * We use the standard libext2fs portability tricks for inline
- * functions.
- */
-extern kmem_cache_t * do_cache_create(int len);
-extern void do_cache_destroy(kmem_cache_t *cache);
-
#define __init
/*
*/
#include <ext2fs/kernel-jbd.h>
+/*
+ * We use the standard libext2fs portability tricks for inline
+ * functions.
+ */
+extern kmem_cache_t * do_cache_create(int len);
+extern void do_cache_destroy(kmem_cache_t *cache);
+extern size_t journal_tag_bytes(journal_t *journal);
+
#if (defined(E2FSCK_INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS))
#ifdef E2FSCK_INCLUDE_INLINE_FUNCS
#define _INLINE_ extern
struct ext2fs_extent extent;
blk_t blk;
e2_blkcnt_t blockcnt;
- int i;
+ unsigned int i;
int is_dir, is_leaf;
errcode_t problem;
struct ext2_extent_info info;
pctx->errcode = ext2fs_extent_get(ehandle,
EXT2_EXTENT_DOWN, &extent);
if (pctx->errcode) {
- printf("Error1: %s on inode %lld\n",
+ printf("Error1: %s on inode %u\n",
error_message(pctx->errcode), pctx->ino);
abort();
}
pctx->errcode = ext2fs_extent_get(ehandle,
EXT2_EXTENT_UP, &extent);
if (pctx->errcode) {
- printf("Error1: %s on inode %lld\n",
+ printf("Error1: %s on inode %u\n",
error_message(pctx->errcode), pctx->ino);
abort();
}
}
static void check_blocks_extents(e2fsck_t ctx, struct problem_context *pctx,
- struct process_block_struct *pb,
- char *block_buf)
+ struct process_block_struct *pb)
{
struct ext2_inode *inode = pctx->inode;
ext2_extent_handle_t ehandle;
if ((ctx->fs->super->s_feature_incompat &
EXT3_FEATURE_INCOMPAT_EXTENTS) &&
(inode->i_flags & EXT4_EXTENTS_FL))
- check_blocks_extents(ctx, pctx, &pb, block_buf);
+ check_blocks_extents(ctx, pctx, &pb);
else
pctx->errcode = ext2fs_block_iterate2(fs, ino,
pb.is_dir ? BLOCK_FLAG_HOLE : 0,
return err;
}
+#if 0
static inline unsigned long long read_tag_block(int tag_bytes, journal_block_tag_t *tag)
{
unsigned long long block = be32_to_cpu(tag->t_blocknr);
block |= (__u64)be32_to_cpu(tag->t_blocknr_high) << 32;
return block;
}
+#endif
/*
* calc_chksums calculates the checksums for the blocks described in the
if (chksum_err) {
info->end_transaction = next_commit_ID;
- jbd_debug(1, "Checksum_err\n");
-
+ jbd_debug(1, "Checksum_err %x %x\n",
+ crc32_sum, found_chksum);
if (!JFS_HAS_INCOMPAT_FEATURE(journal,
JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)){
journal->j_failed_commit =
(unsigned) fs->super->s_max_mnt_count*2))
reason = 0;
} else if (fs->super->s_checkinterval &&
- ((ctx->now - lastcheck) >= fs->super->s_checkinterval)) {
+ ((ctx->now - lastcheck) >=
+ ((time_t) fs->super->s_checkinterval))) {
reason = _(" has gone %u days without being checked");
reason_arg = (ctx->now - fs->super->s_lastcheck)/(3600*24);
if (batt && ((ctx->now - fs->super->s_lastcheck) <
/* What we do by default, anyway! */
break;
case 'b':
- res = sscanf(optarg, "%d", &ctx->use_superblock);
+ res = sscanf(optarg, "%u", &ctx->use_superblock);
if (res != 1)
goto sscanf_err;
ctx->flags |= E2F_FLAG_SB_SPECIFIED;