X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=bin%2Fad%2Fad.c;h=fc8563c06f034a7c0a660ad0f3075f4946ef98b8;hb=980548c882a297d26e67397d0f72e0b991f36bf2;hp=6115c2f2fb3c21b73e07d70793785fe82aae4417;hpb=16536f035d20ee79eea88213ea5187e30fd8f760;p=netatalk.git diff --git a/bin/ad/ad.c b/bin/ad/ad.c index 6115c2f2..fc8563c0 100644 --- a/bin/ad/ad.c +++ b/bin/ad/ad.c @@ -35,7 +35,7 @@ static void usage_main(void) { - printf("Usage: ad ls|cp|rm|mv|find [file|dir, ...]\n"); + printf("Usage: ad ls|cp|rm|mv|set|find [file|dir, ...]\n"); printf(" ad -v|--version\n"); } @@ -48,17 +48,17 @@ int main(int argc, char **argv) { AFPObj obj = { 0 }; - setuplog("default:note", "/dev/tty"); - if (argc < 2) { usage_main(); return 1; } - if (afp_config_parse(&obj) != 0) + if (afp_config_parse(&obj, "ad") != 0) return 1; - if (load_volumes(&obj, NULL) != 0) + setuplog("default:note", "/dev/tty"); + + if (load_volumes(&obj, lv_none) != 0) return 1; if (STRCMP(argv[1], ==, "ls")) @@ -69,6 +69,8 @@ int main(int argc, char **argv) return ad_rm(argc - 1, argv + 1, &obj); else if (STRCMP(argv[1], ==, "mv")) return ad_mv(argc, argv, &obj); + else if (STRCMP(argv[1], ==, "set")) + return ad_set(argc - 1, argv + 1, &obj); else if (STRCMP(argv[1], ==, "find")) return ad_find(argc, argv, &obj); else if (STRCMP(argv[1], ==, "-v")) {