]> git.ipfire.org Git - thirdparty/util-linux.git/commit
fsck: implement fsck -r {fd}
authorStanislav Brabec <sbrabec@suse.cz>
Mon, 27 Apr 2015 15:20:55 +0000 (17:20 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 28 Apr 2015 11:16:41 +0000 (13:16 +0200)
commit07c09a29eaf359f75a8adf8bb0320f3f2d97c5cc
tree408b022e123f7e6daafd46cea6a0bba40cd8b062
parentdffd1f3f57a93c78ecac58556c7bb29302e98e7b
fsck: implement fsck -r {fd}

Make possible sending of statistics to a dedicated file descriptor.

Rationale: When UI is calling fsck from a remote terminal, fsck progress
needs to be sent to stdout. It is mixed there with output of statistics,
and it is impossible to parse the output to get the statistics.

Now it will be possible e. g. with "fsck -C -r 3 /dev/sda1"

Note: Code in if and else is intentionally partially duplicated. Current
human readable output of floats does not conform to locale conventions,
and may be changed in future. But we want to keep machine readable output
exactly same as it is now.

[kzak@redhat.com: - don't use report_stats_fd globally]

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/fsck.8
disk-utils/fsck.c