]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: (mkfds) add a method for printing factory specific data to struct factory
authorMasatake YAMATO <yamato@redhat.com>
Thu, 22 Sep 2022 18:42:44 +0000 (03:42 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Fri, 23 Sep 2022 23:38:23 +0000 (08:38 +0900)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
tests/helpers/test_mkfds.c

index a16bea9e4265aaf1892aa47c306eff162fe6a5c8..b32584a8a52ab7e4502205d07f52493fe645ef44 100644 (file)
@@ -229,6 +229,7 @@ struct factory {
        int  EX_N;              /* fds made optionally */
        void *(*make)(const struct factory *, struct fdesc[], int, char **);
        void (*free)(const struct factory *, void *);
+       void (*report)(const struct factory *, void *, FILE *);
        const struct parameter * params;
 };
 
@@ -1108,6 +1109,8 @@ int main(int argc, char **argv)
        if (!quiet) {
                printf("%d", getpid());
                putchar('\n');
+               if (factory->report)
+                       factory->report(factory, data, stdout);
                fflush(stdout);
        }