X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Fccanlint.c;h=968f655e397f2719217bd4d8ed8f49002787175e;hp=a0fda1a8694f533d047db190262fc8fbd0c70095;hb=32a31d9e4fb1f312a47ae8c237ac30d6c1567ccd;hpb=d1d6625caf6e9897a4a0479c0e04fee27de5b20e diff --git a/tools/ccanlint/ccanlint.c b/tools/ccanlint/ccanlint.c index a0fda1a8..968f655e 100644 --- a/tools/ccanlint/ccanlint.c +++ b/tools/ccanlint/ccanlint.c @@ -244,13 +244,14 @@ int main(int argc, char *argv[]) unsigned int score = 0, total_score = 0; struct manifest *m; struct ccanlint *i; - const char *prefix = ""; + const char *prefix = "", *dir = "."; /* I'd love to use long options, but that's not standard. */ /* FIXME: getopt_long ccan package? */ while ((c = getopt(argc, argv, "sd:vn")) != -1) { switch (c) { case 'd': + dir = optarg; prefix = talloc_append_string(talloc_basename(NULL, optarg), ": "); @@ -274,7 +275,7 @@ int main(int argc, char *argv[]) if (optind < argc) usage(argv[0]); - m = get_manifest(talloc_autofree_context()); + m = get_manifest(talloc_autofree_context(), dir); init_tests();