Make sure we initialize the overall phase state before we start
executing any code that can end up in the report-status-and-exit paths.
Otherwise if debugging is turned on we get garbage io/cpu stat reports.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
if (getenv("SERVICE_MODE"))
is_service = true;
+ /* Initialize overall phase stats. */
+ moveon = phase_start(&all_pi, 0, NULL);
+ if (!moveon)
+ return SCRUB_RET_OPERROR;
+
/* Find the mount record for the passed-in argument. */
if (stat(argv[optind], &ctx.mnt_sb) < 0) {
fprintf(stderr,
mtab = _PATH_MOUNTED;
}
- /* Initialize overall phase stats. */
- moveon = phase_start(&all_pi, 0, NULL);
- if (!moveon)
- goto out;
-
ismnt = find_mountpoint(mtab, &ctx);
if (!ismnt) {
fprintf(stderr,