If e2fsck logging is enabled, report the exit value as the last line
in the log file.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
if (ctx->log_fn)
free(ctx->log_fn);
+ if (ctx->logf)
+ fclose(ctx->logf);
+
ext2fs_free_mem(&ctx);
}
ext2fs_close_free(&ctx->fs);
free(ctx->journal_name);
+ if (ctx->logf)
+ fprintf(ctx->logf, "Exit status: %d\n", exit_value);
e2fsck_free_context(ctx);
remove_error_table(&et_ext2_error_table);
remove_error_table(&et_prof_error_table);
ctx->flags |= E2F_FLAG_ABORT;
if (ctx->flags & E2F_FLAG_SETJMP_OK)
longjmp(ctx->abort_loc, 1);
+ if (ctx->logf)
+ fprintf(ctx->logf, "Exit status: %d\n", exit_value);
exit(exit_value);
}