X-Git-Url: https://git.distorted.org.uk/~mdw/checkpath/blobdiff_plain/caa14ca268d66324eabc614983bb3bd45b254299..f159f4cad3c9cc0804a5d197ac0deee0ac103719:/tmpdir.c diff --git a/tmpdir.c b/tmpdir.c index 070dee0..b14f6d6 100644 --- a/tmpdir.c +++ b/tmpdir.c @@ -234,7 +234,7 @@ static void report(unsigned what, int verbose, /* --- @usage@ --- */ static void usage(FILE *fp) - { fprintf(fp, "Usage: %s [-bc] [-v PATH]\n", QUIS); } + { fprintf(fp, "Usage: %s [-bcv] [-g NAME] [-C PATH]\n", QUIS); } /* --- @version@ --- */ @@ -300,7 +300,7 @@ int main(int argc, char *argv[]) ego(argv[0]); me = cp.cp_uid = geteuid(); cp.cp_what = (CP_WRWORLD | CP_WROTHGRP | CP_WROTHUSR | - CP_STICKYOK | CP_REPORT); + CP_STICKYOK | CP_REPORT | CP_ERROR); cp.cp_verbose = 0; cp.cp_report = report; cp.cp_gids = 0; /* ignore group membership */ @@ -313,7 +313,7 @@ int main(int argc, char *argv[]) for (;;) { static struct option opts[] = { { "help", 0, 0, 'h' }, - { "version", 0, 0, 'V' }, + { "version", 0, 0, 'V' }, { "usage", 0, 0, 'u' }, { "bourne", 0, 0, 'b' }, { "cshell", 0, 0, 'c' }, @@ -324,7 +324,7 @@ int main(int argc, char *argv[]) { "group", OPTF_ARGREQ, 0, 'g' }, { 0, 0, 0, 0 } }; - int i = mdwopt(argc, argv, "hVu" "bcvtg:c:", opts, 0, 0, 0); + int i = mdwopt(argc, argv, "hVu" "bcvtg:C:", opts, 0, 0, 0); if (i < 0) break; @@ -386,7 +386,7 @@ int main(int argc, char *argv[]) case sh_csh: printf("setenv TMPDIR \"%s\"\n", p); break; - } + } return (0); }