diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 04:59:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 04:59:33 +0000 |
commit | 857a92991db30f538ea8858a2dfda0fe606353e3 (patch) | |
tree | dcf97aa3a41925c05670bb640cdd495fc1083f72 /misc/dumpe2fs.c | |
parent | Adding debian version 1.47.0-2.4. (diff) | |
download | e2fsprogs-857a92991db30f538ea8858a2dfda0fe606353e3.tar.xz e2fsprogs-857a92991db30f538ea8858a2dfda0fe606353e3.zip |
Merging upstream version 1.47.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | misc/dumpe2fs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c index 7c080ed..d2d57fb 100644 --- a/misc/dumpe2fs.c +++ b/misc/dumpe2fs.c @@ -84,8 +84,7 @@ static void print_free(unsigned long group, char * bitmap, unsigned long num, unsigned long offset, int ratio) { int p = 0; - unsigned long i; - unsigned long j; + unsigned long i, j; offset /= ratio; offset += group * num; @@ -95,13 +94,14 @@ static void print_free(unsigned long group, char * bitmap, if (p) printf (", "); print_number((i + offset) * ratio); - for (j = i; j < num && !in_use (bitmap, j); j++) + for (j = i + 1; j < num && !in_use(bitmap, j); j++) ; - if (--j != i) { + if (j != i + 1 || ratio > 1) { fputc('-', stdout); - print_number((j + offset) * ratio); - i = j; + print_number(((j - 1 + offset) * ratio) + + ratio - 1); } + i = j; p = 1; } } |