}
struct list_blocks_struct {
- FILE *f;
- int total;
- blk_t first_block, last_block;
- int first_bcnt, last_bcnt;
- int first;
+ FILE *f;
+ e2_blkcnt_t total;
+ blk_t first_block, last_block;
+ e2_blkcnt_t first_bcnt, last_bcnt;
+ e2_blkcnt_t first;
};
static void finish_range(struct list_blocks_struct *lb)
lb->first_block = 0;
}
-static int list_blocks_proc(ext2_filsys fs, blk_t *blocknr, int blockcnt,
- void *private)
+static int list_blocks_proc(ext2_filsys fs, blk_t *blocknr,
+ e2_blkcnt_t blockcnt, blk_t ref_block,
+ int ref_offset, void *private)
{
struct list_blocks_struct *lb = (struct list_blocks_struct *) private;
lb.first_block = 0;
lb.f = f;
lb.first = 1;
- ext2fs_block_iterate(current_fs, inode, 0, NULL,
+ ext2fs_block_iterate2(current_fs, inode, 0, NULL,
list_blocks_proc, (void *)&lb);
finish_range(&lb);
if (lb.total)
inode->i_mode & 0777, inode->i_flags, inode->i_generation);
fprintf(out, "%sUser: %5d Group: %5d Size: ",
prefix, inode->i_uid, inode->i_gid);
- if (LINUX_S_ISDIR(inode->i_mode))
- fprintf(out, "%d\n", inode->i_size);
- else {
+ if (LINUX_S_ISREG(inode->i_mode)) {
__u64 i_size = (inode->i_size |
((unsigned long long)inode->i_size_high << 32));
-
+
fprintf(out, "%lld\n", i_size);
- }
+ } else
+ fprintf(out, "%d\n", inode->i_size);
if (current_fs->super->s_creator_os == EXT2_OS_HURD)
fprintf(out,
"%sFile ACL: %d Directory ACL: %d Translator: %d\n",
{
ext2_file_t e2_file;
errcode_t retval;
- unsigned int got, written;
+ int got;
+ unsigned int written;
char buf[8192];
char *ptr;
char *tmp;
initialize_ext2_error_table();
- fprintf (stderr, "debugfs %s, %s for EXT2 FS %s, %s\n",
- E2FSPROGS_VERSION, E2FSPROGS_DATE,
- EXT2FS_VERSION, EXT2FS_DATE);
+ fprintf (stderr, "debugfs %s (%s)\n", E2FSPROGS_VERSION,
+ E2FSPROGS_DATE);
while ((c = getopt (argc, argv, "iwcR:f:b:s:V")) != EOF) {
switch (c) {