problemP.h revision e0ed7404719a9ddd2ba427a80db5365c8bad18c0
1f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o/*
2f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o * problemP.h --- Private header file for fix_problem()
3f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o *
4f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o * Copyright 1997 by Theodore Ts'o
5f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o *
6f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o * %Begin-Header%
7f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o * This file may be redistributed under the terms of the GNU Public
8f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o * License.
9f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o * %End-Header%
10f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o */
11f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o
12f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'ostruct e2fsck_problem {
13f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o	problem_t	e2p_code;
14f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o	const char *	e2p_description;
15f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o	char		prompt;
1621afac096df642708ebf63dc4354575883f11174Theodore Ts'o	int		flags;
17f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o	problem_t	second_code;
18e0ed7404719a9ddd2ba427a80db5365c8bad18c0JP Abgrall	int		count;
19e0ed7404719a9ddd2ba427a80db5365c8bad18c0JP Abgrall	int		max_count;
20f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o};
21f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o
22f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'ostruct latch_descr {
23f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o	int		latch_code;
24f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o	problem_t	question;
25f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o	problem_t	end_message;
26f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o	int		flags;
27f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o};
28f8188fff23dc2d9c9f858fb21264e46b17672825Theodore Ts'o
2921afac096df642708ebf63dc4354575883f11174Theodore Ts'o#define PR_PREEN_OK	0x000001 /* Don't need to do preenhalt */
3021afac096df642708ebf63dc4354575883f11174Theodore Ts'o#define PR_NO_OK	0x000002 /* If user answers no, don't make fs invalid */
3121afac096df642708ebf63dc4354575883f11174Theodore Ts'o#define PR_NO_DEFAULT	0x000004 /* Default to no */
3221afac096df642708ebf63dc4354575883f11174Theodore Ts'o#define PR_MSG_ONLY	0x000008 /* Print message only */
3321afac096df642708ebf63dc4354575883f11174Theodore Ts'o
3421afac096df642708ebf63dc4354575883f11174Theodore Ts'o/* Bit positions 0x000ff0 are reserved for the PR_LATCH flags */
3521afac096df642708ebf63dc4354575883f11174Theodore Ts'o
3621afac096df642708ebf63dc4354575883f11174Theodore Ts'o#define PR_FATAL	0x001000 /* Fatal error */
3721afac096df642708ebf63dc4354575883f11174Theodore Ts'o#define PR_AFTER_CODE	0x002000 /* After asking the first question, */
3821afac096df642708ebf63dc4354575883f11174Theodore Ts'o				 /* ask another */
3921afac096df642708ebf63dc4354575883f11174Theodore Ts'o#define PR_PREEN_NOMSG	0x004000 /* Don't print a message if we're preening */
4021afac096df642708ebf63dc4354575883f11174Theodore Ts'o#define PR_NOCOLLATE	0x008000 /* Don't collate answers for this latch */
4121afac096df642708ebf63dc4354575883f11174Theodore Ts'o#define PR_NO_NOMSG	0x010000 /* Don't print a message if e2fsck -n */
4221afac096df642708ebf63dc4354575883f11174Theodore Ts'o#define PR_PREEN_NO	0x020000 /* Use No as an answer if preening */
43b7a00563b22b0ea47ddc7117508c0b8e0d65df43Theodore Ts'o#define PR_PREEN_NOHDR	0x040000 /* Don't print the preen header */
44efc6f628e15de95bcd13e4f0ee223cb42115d520Theodore Ts'o#define PR_CONFIG	0x080000 /* This problem has been customized
458fd98bba213bbcc93e43993aaf41e7dec19a1b61Theodore Ts'o				    from the config file */
4675990388365c5688dbade9c33a3394e40f757526Theodore Ts'o#define PR_FORCE_NO	0x100000 /* Force the answer to be no */
47