summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ffs/pass4.c
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2000-12-15 14:23:55 +0000
committeriedowse <iedowse@FreeBSD.org>2000-12-15 14:23:55 +0000
commit3e3c84c80c9f9500c397dc4b174259d631441b7f (patch)
tree8b803dfd960b8552dd62173dfdcbbabec2ada0d4 /sbin/fsck_ffs/pass4.c
parentf15d921e9eff691ff94f40f1490b10cd0ab78d65 (diff)
downloadFreeBSD-src-3e3c84c80c9f9500c397dc4b174259d631441b7f.zip
FreeBSD-src-3e3c84c80c9f9500c397dc4b174259d631441b7f.tar.gz
Add a simple SIGINFO handler to fsck_ffs. Shortly after receipt of
a SIGINFO (normally via Ctrl-T), a line will be output indicating the current phase number and progress information relevant to the current phase. Approved by: mckusick
Diffstat (limited to 'sbin/fsck_ffs/pass4.c')
-rw-r--r--sbin/fsck_ffs/pass4.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sbin/fsck_ffs/pass4.c b/sbin/fsck_ffs/pass4.c
index 0012c50..9e9cea5 100644
--- a/sbin/fsck_ffs/pass4.c
+++ b/sbin/fsck_ffs/pass4.c
@@ -62,6 +62,12 @@ pass4()
idesc.id_type = ADDR;
idesc.id_func = pass4check;
for (cg = 0; cg < sblock.fs_ncg; cg++) {
+ if (got_siginfo) {
+ printf("%s: phase 4: cyl group %d of %d (%d%%)\n",
+ cdevname, cg, sblock.fs_ncg,
+ cg * 100 / sblock.fs_ncg);
+ got_siginfo = 0;
+ }
inumber = cg * sblock.fs_ipg;
for (i = 0; i < inostathead[cg].il_numalloced; i++, inumber++) {
if (inumber < ROOTINO)
OpenPOWER on IntegriCloud