Whamcloud - gitweb
e2image: clean up progress reporting
authorTheodore Ts'o <tytso@mit.edu>
Fri, 27 Dec 2013 04:45:17 +0000 (23:45 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 27 Dec 2013 04:45:17 +0000 (23:45 -0500)
commit212c99488343cbc52fab3368f72853a5a3ff2e8a
treea3aac726807c567659de86dc91e26bef64c3c7ac
parent9f90b2e632ece3a78a53e170303b383ab944f284
e2image: clean up progress reporting

The old progress reporting code would crash on small file systems.
For example:

    cp /dev/null /tmp/foo.img
    mke2fs -t ext4 -F /tmp/foo.img 100
    e2image -o 0 -O 4096 -rap /tmp/foo.img

Fix this, and while we're at it, factor out the code to make it easier
to read and maintain.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc/e2image.c