2005-12-30 Theodore Ts'o <tytso@mit.edu>
+ * e2fsck.c (e2fsck_free_context), unix.c (PRS), e2fsck.h: Use
+ the profile library to read in the /etc/e2fsck.conf file
+ at startup.
+
* profile.c, profile.h, prof_err.et: Add the profile library code
to e2fsck. The profile library was originally written by
Theodore Ts'o in 1995 for use in the MIT Kerberos v5
e2fsck_reset_context(ctx);
if (ctx->blkid)
blkid_put_cache(ctx->blkid);
+
+ if (ctx->profile)
+ profile_release(ctx->profile);
ext2fs_free_mem(&ctx);
}
}
}
+static const char *config_fn[] = { "/etc/e2fsck.conf", 0 };
static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx)
{
memset(bar, '=', sizeof(bar)-1);
memset(spaces, ' ', sizeof(spaces)-1);
initialize_ext2_error_table();
+ initialize_prof_error_table();
blkid_get_cache(&ctx->blkid, NULL);
if (argc && *argv)
}
if (extended_opts)
parse_extended_opts(ctx, extended_opts);
-
+
+ profile_init(config_fn, &ctx->profile);
+
if (flush) {
fd = open(ctx->filesystem_name, O_RDONLY, 0);
if (fd < 0) {