From: Valerie Aurora Henson <vaurora@redhat.com>
To: linux-ext4@vger.kernel.org
Cc: Theodore Tso <tytso@mit.edu>, Nick Dokos <nicholas.dokos@hp.com>
Subject: Using libext2fs in libe2p?
Date: Tue, 3 Feb 2009 14:56:45 -0500 [thread overview]
Message-ID: <20090203195645.GG20654@shell> (raw)
Nick Dokos noticed that libe2p now depends on libext2fs in the 64-bit
tree, since we use ext2fs_blocks_count() and friends (see diff below).
Possible solutions:
Link libext2fs with libe2p
Open code 64-bit block counts
Require users of libe2p to link with libext2fs
Move ext2fs_blocks_count() and friends into a header file and inline them
I am agnostic.
-VAL
diff --git a/lib/e2p/ls.c b/lib/e2p/ls.c
index 6d2ce70..1923793 100644
--- a/lib/e2p/ls.c
+++ b/lib/e2p/ls.c
@@ -20,6 +20,7 @@
#include <time.h>
#include "e2p.h"
+#include "ext2fs/ext2fs.h"
static void print_user (unsigned short uid, FILE *f)
{
@@ -219,9 +220,9 @@ void list_super2(struct ext2_super_block * sb, FILE *f)
fprintf(f, "Filesystem OS type: %s\n", str);
free(str);
fprintf(f, "Inode count: %u\n", sb->s_inodes_count);
- fprintf(f, "Block count: %u\n", sb->s_blocks_count);
- fprintf(f, "Reserved block count: %u\n", sb->s_r_blocks_count);
- fprintf(f, "Free blocks: %u\n", sb->s_free_blocks_count);
+ fprintf(f, "Block count: %llu\n", ext2fs_blocks_count(sb));
+ fprintf(f, "Reserved block count: %llu\n", ext2fs_r_blocks_count(sb));
+ fprintf(f, "Free blocks: %llu\n", ext2fs_free_blocks_count(sb));
fprintf(f, "Free inodes: %u\n", sb->s_free_inodes_count);
fprintf(f, "First block: %u\n", sb->s_first_data_block);
fprintf(f, "Block size: %u\n", EXT2_BLOCK_SIZE(sb));
next reply other threads:[~2009-02-03 19:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-03 19:56 Valerie Aurora Henson [this message]
2009-02-03 20:31 ` Using libext2fs in libe2p? Andreas Dilger
2009-02-03 21:06 ` Theodore Tso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090203195645.GG20654@shell \
--to=vaurora@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=nicholas.dokos@hp.com \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.