fsck: give the error function a chance to see the fsck_options

We will need this in the next commit, where fsck will be taught to
optionally name the objects when reporting issues about them.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Schindelin
2016-07-17 12:59:57 +02:00
committed by Junio C Hamano
parent 7b35efd734
commit 1cd772cc41
3 changed files with 9 additions and 5 deletions

View File

@ -82,7 +82,8 @@ static int objerror(struct object *obj, const char *err)
return -1;
}
static int fsck_error_func(struct object *obj, int type, const char *message)
static int fsck_error_func(struct fsck_options *o,
struct object *obj, int type, const char *message)
{
objreport(obj, (type == FSCK_WARN) ? "warning" : "error", message);
return (type == FSCK_WARN) ? 0 : 1;