]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blobdiff - e2fsck/problemP.h
e2fsck: add support for saving the problem code log
[thirdparty/e2fsprogs.git] / e2fsck / problemP.h
index 7c75fc6efd2a96dd705886b9c717ced015af2682..95c1a704e2cfb02dc55ce4e38de46cd4c69430f8 100644 (file)
@@ -13,8 +13,10 @@ struct e2fsck_problem {
        problem_t       e2p_code;
        const char *    e2p_description;
        char            prompt;
-       short           flags;
+       int             flags;
        problem_t       second_code;
+       int             count;
+       int             max_count;
 };
 
 struct latch_descr {
@@ -24,14 +26,23 @@ struct latch_descr {
        int             flags;
 };
 
-#define PR_PREEN_OK    0x0001  /* Don't need to do preenhalt */
-#define PR_NO_OK       0x0002  /* If user answers no, don't make fs invalid */
-#define PR_NO_DEFAULT  0x0004  /* Default to no */
-#define PR_MSG_ONLY    0x0008  /* Print message only */
-#define PR_FATAL       0x0080  /* Fatal error */
-#define PR_AFTER_CODE  0x0100  /* After asking the first question, */
-                               /* ask another */
-#define PR_PREEN_NOMSG 0x0200  /* Don't print a message if we're preening */
-#define PR_NOCOLLATE   0x0400  /* Don't collate answers for this latch */
-#define PR_NO_NOMSG    0x0800  /* Don't print a message if e2fsck -n */
+#define PR_PREEN_OK    0x000001 /* Don't need to do preenhalt */
+#define PR_NO_OK       0x000002 /* If user answers no, don't make fs invalid */
+#define PR_NO_DEFAULT  0x000004 /* Default to no */
+#define PR_MSG_ONLY    0x000008 /* Print message only */
+
+/* Bit positions 0x000ff0 are reserved for the PR_LATCH flags */
 
+#define PR_FATAL       0x001000 /* Fatal error */
+#define PR_AFTER_CODE  0x002000 /* After asking the first question, */
+                                /* ask another */
+#define PR_PREEN_NOMSG 0x004000 /* Don't print a message if we're preening */
+#define PR_NOCOLLATE   0x008000 /* Don't collate answers for this latch */
+#define PR_NO_NOMSG    0x010000 /* Don't print a message if e2fsck -n */
+#define PR_PREEN_NO    0x020000 /* Use No as an answer if preening */
+#define PR_PREEN_NOHDR 0x040000 /* Don't print the preen header */
+#define PR_CONFIG      0x080000 /* This problem has been customized
+                                   from the config file */
+#define PR_FORCE_NO    0x100000 /* Force the answer to be no */
+#define PR_NOT_A_FIX   0x200000 /* Yes doesn't mean a problem was fixed */
+#define PR_HEADER      0x400000 /* Problem is a header marker */