diff options
author | Karel Zak | 2008-03-20 14:57:40 +0100 |
---|---|---|
committer | Karel Zak | 2008-03-20 14:57:40 +0100 |
commit | db3e2da7902ad15d0335ebcbb235d6517df4a38f (patch) | |
tree | 796da7c8fe52d9a23b487f6d4bbd6916c3546192 /disk-utils | |
parent | mkswap: fix compiler warnings (diff) | |
download | kernel-qcow2-util-linux-db3e2da7902ad15d0335ebcbb235d6517df4a38f.tar.gz kernel-qcow2-util-linux-db3e2da7902ad15d0335ebcbb235d6517df4a38f.tar.xz kernel-qcow2-util-linux-db3e2da7902ad15d0335ebcbb235d6517df4a38f.zip |
mkfs.minix: clean up gcc warnings
mkfs.minix.c:199: warning: ‘count_blocks’ defined but not used
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils')
-rw-r--r-- | disk-utils/mkfs.minix.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/disk-utils/mkfs.minix.c b/disk-utils/mkfs.minix.c index 5a1e13488..a5e099261 100644 --- a/disk-utils/mkfs.minix.c +++ b/disk-utils/mkfs.minix.c @@ -184,37 +184,6 @@ check_mount(void) { die(_("%s is mounted; will not make a filesystem here!")); } -static long -valid_offset (int fd, int offset) { - char ch; - - if (lseek (fd, offset, 0) < 0) - return 0; - if (read (fd, &ch, 1) < 1) - return 0; - return 1; -} - -static int -count_blocks (int fd) { - int high, low; - - low = 0; - for (high = 1; valid_offset (fd, high); high *= 2) - low = high; - while (low < high - 1) - { - const int mid = (low + high) / 2; - - if (valid_offset (fd, mid)) - low = mid; - else - high = mid; - } - valid_offset (fd, 0); - return (low + 1); -} - static void write_tables(void) { /* Mark the super block valid. */ |