10 * callback function for fsck_walk
11 * type is the expected type of the object or OBJ_ANY
12 * the return value is:
14 * <0 error signaled and abort
15 * >0 error signaled and do not abort
17 typedef int (*fsck_walk_func)(struct object *obj, int type, void *data, struct fsck_options *options);
19 /* callback for fsck_object, type is FSCK_ERROR or FSCK_WARN */
20 typedef int (*fsck_error)(struct object *obj, int type, const char *err, ...);
22 __attribute__((format (printf, 3, 4)))
23 int fsck_error_function(struct object *obj, int type, const char *fmt, ...);
27 fsck_error error_func;
31 #define FSCK_OPTIONS_DEFAULT { NULL, fsck_error_function, 0 }
32 #define FSCK_OPTIONS_STRICT { NULL, fsck_error_function, 1 }
34 /* descend in all linked child objects
35 * the return value is:
36 * -1 error in processing the object
37 * <0 return value of the callback, which lead to an abort
38 * >0 return value of the first signaled error >0 (in the case of no other errors)
41 int fsck_walk(struct object *obj, void *data, struct fsck_options *options);
42 /* If NULL is passed for data, we assume the object is local and read it. */
43 int fsck_object(struct object *obj, void *data, unsigned long size,
44 struct fsck_options *options);