]> git.ipfire.org Git - collecty.git/commitdiff
args: Add function to dump the array
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 28 Sep 2025 09:22:02 +0000 (09:22 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 28 Sep 2025 09:22:02 +0000 (09:22 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/args.c
src/daemon/args.h

index 7abe62c3efe33588ef8d3a819e8643a1395360a9..64bee4441050d20736bd5444e4a349c24f0857c3 100644 (file)
@@ -122,3 +122,11 @@ ERROR:
 
        return -errno;
 }
+
+int collecty_args_dump(collecty_args* self) {
+       for (int i = 0; i < self->argc; i++) {
+               DEBUG(self->ctx, "argv[%d]: %s\n", i, self->argv[i]);
+       }
+
+       return 0;
+}
index c523876eae7d5cda6e7b2a7ac0698e970cc39775..13adb30cd3082d585fd29a5d4bd3dcd81924f87d 100644 (file)
@@ -36,4 +36,6 @@ int collecty_args_argc(collecty_args* self);
 int collecty_args_push(collecty_args* self, const char* format, ...)
        __attribute__((format(printf, 2, 3)));
 
+int collecty_args_dump(collecty_args* self);
+
 #endif /* COLLECTY_ARGS_H */