]> git.ozlabs.org Git - ccan/blobdiff - tools/depends.c
Fixup get_deps() callers
[ccan] / tools / depends.c
index 7eac9da419a17233e28d0e5dbb1aed4a7c9907f1..c631b9bc82968747147a1fd7328297a5d9fff3bc 100644 (file)
@@ -1,5 +1,7 @@
 #include "talloc/talloc.h"
-#include "string/string.h"
+#include "str/str.h"
+#include "grab_file/grab_file.h"
+#include "str_talloc/str_talloc.h"
 #include "tools.h"
 #include <err.h>
 #include <stdbool.h>
@@ -173,13 +175,21 @@ get_all_deps(const void *ctx, const char *dir,
        return deps;
 }
 
-char **get_deps(const void *ctx, const char *dir)
+char **get_deps(const void *ctx, const char *dir, bool recurse)
 {
+       if (!recurse) {
+               unsigned int num;
+               return get_one_deps(ctx, dir, &num);
+       }
        return get_all_deps(ctx, dir, get_one_deps);
 }
 
-char **get_safe_ccan_deps(const void *ctx, const char *dir)
+char **get_safe_ccan_deps(const void *ctx, const char *dir, bool recurse)
 {
+       if (!recurse) {
+               unsigned int num;
+               return get_one_safe_deps(ctx, dir, &num);
+       }
        return get_all_deps(ctx, dir, get_one_safe_deps);
 }