Theodore Ts'o | f8188ff | 1997-11-14 05:23:04 +0000 | [diff] [blame] | 1 | /* |
| 2 | * problemP.h --- Private header file for fix_problem() |
| 3 | * |
| 4 | * Copyright 1997 by Theodore Ts'o |
| 5 | * |
| 6 | * %Begin-Header% |
| 7 | * This file may be redistributed under the terms of the GNU Public |
| 8 | * License. |
| 9 | * %End-Header% |
| 10 | */ |
| 11 | |
| 12 | struct e2fsck_problem { |
| 13 | problem_t e2p_code; |
| 14 | const char * e2p_description; |
| 15 | char prompt; |
Theodore Ts'o | 21afac0 | 2001-05-14 12:47:41 +0000 | [diff] [blame] | 16 | int flags; |
Theodore Ts'o | f8188ff | 1997-11-14 05:23:04 +0000 | [diff] [blame] | 17 | problem_t second_code; |
JP Abgrall | e0ed740 | 2014-03-19 19:08:39 -0700 | [diff] [blame] | 18 | int count; |
| 19 | int max_count; |
Theodore Ts'o | f8188ff | 1997-11-14 05:23:04 +0000 | [diff] [blame] | 20 | }; |
| 21 | |
| 22 | struct latch_descr { |
| 23 | int latch_code; |
| 24 | problem_t question; |
| 25 | problem_t end_message; |
| 26 | int flags; |
| 27 | }; |
| 28 | |
Theodore Ts'o | 21afac0 | 2001-05-14 12:47:41 +0000 | [diff] [blame] | 29 | #define PR_PREEN_OK 0x000001 /* Don't need to do preenhalt */ |
| 30 | #define PR_NO_OK 0x000002 /* If user answers no, don't make fs invalid */ |
| 31 | #define PR_NO_DEFAULT 0x000004 /* Default to no */ |
| 32 | #define PR_MSG_ONLY 0x000008 /* Print message only */ |
| 33 | |
| 34 | /* Bit positions 0x000ff0 are reserved for the PR_LATCH flags */ |
| 35 | |
| 36 | #define PR_FATAL 0x001000 /* Fatal error */ |
| 37 | #define PR_AFTER_CODE 0x002000 /* After asking the first question, */ |
| 38 | /* ask another */ |
| 39 | #define PR_PREEN_NOMSG 0x004000 /* Don't print a message if we're preening */ |
| 40 | #define PR_NOCOLLATE 0x008000 /* Don't collate answers for this latch */ |
| 41 | #define PR_NO_NOMSG 0x010000 /* Don't print a message if e2fsck -n */ |
| 42 | #define PR_PREEN_NO 0x020000 /* Use No as an answer if preening */ |
Theodore Ts'o | b7a0056 | 2002-07-20 00:28:07 -0400 | [diff] [blame] | 43 | #define PR_PREEN_NOHDR 0x040000 /* Don't print the preen header */ |
Theodore Ts'o | efc6f62 | 2008-08-27 23:07:54 -0400 | [diff] [blame] | 44 | #define PR_CONFIG 0x080000 /* This problem has been customized |
Theodore Ts'o | 8fd98bb | 2005-12-31 16:33:33 -0500 | [diff] [blame] | 45 | from the config file */ |
Theodore Ts'o | 7599038 | 2010-12-06 10:10:33 -0500 | [diff] [blame] | 46 | #define PR_FORCE_NO 0x100000 /* Force the answer to be no */ |