From: Michael Tremer Date: Fri, 6 Oct 2023 14:53:57 +0000 (+0000) Subject: compress: Add AGAIN return code to restart walking through an archive X-Git-Tag: 0.9.30~1531 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8a0adeb1eb2a49821769a7af158f3349a35ef2b;p=pakfire.git compress: Add AGAIN return code to restart walking through an archive Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/compress.c b/src/libpakfire/compress.c index 5a2ecf6f5..2aae82d7c 100644 --- a/src/libpakfire/compress.c +++ b/src/libpakfire/compress.c @@ -578,6 +578,10 @@ int pakfire_walk(struct pakfire* pakfire, struct archive* archive, filter_callback = NULL; break; + case PAKFIRE_WALK_AGAIN: + DEBUG(pakfire, "Filter callback sent AGAIN\n"); + return -EAGAIN; + // Raise any other errors default: DEBUG(pakfire, "Filter callback returned an error: %d\n", r); diff --git a/src/libpakfire/include/pakfire/compress.h b/src/libpakfire/include/pakfire/compress.h index 6bd942b0b..3c509d95d 100644 --- a/src/libpakfire/include/pakfire/compress.h +++ b/src/libpakfire/include/pakfire/compress.h @@ -55,6 +55,9 @@ enum pakfire_walk_codes { // Like PAKFIRE_WALK_OK, but the callback will not be called again PAKFIRE_WALK_DONE = -30, + + // Start again from the beginning + PAKFIRE_WALK_AGAIN = -40, }; int pakfire_walk(struct pakfire* pakfire, struct archive* archive,