=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ctfconv/ctfconv.c,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** src/usr.bin/ctfconv/ctfconv.c 2017/08/11 16:55:46 1.4 --- src/usr.bin/ctfconv/ctfconv.c 2017/08/11 19:34:24 1.5 *************** *** 1,4 **** ! /* $OpenBSD: ctfconv.c,v 1.4 2017/08/11 16:55:46 mpi Exp $ */ /* * Copyright (c) 2016-2017 Martin Pieuchot --- 1,4 ---- ! /* $OpenBSD: ctfconv.c,v 1.5 2017/08/11 19:34:24 jasper Exp $ */ /* * Copyright (c) 2016-2017 Martin Pieuchot *************** *** 77,83 **** __dead void usage(void) { ! fprintf(stderr, "usage: %s [-d] -l label -o outfile file\n", getprogname()); exit(1); } --- 77,84 ---- __dead void usage(void) { ! fprintf(stderr, "usage: %s -d file\n", getprogname()); ! fprintf(stderr, " %s -l label -o outfile file\n", getprogname()); exit(1); } *************** *** 95,101 **** while ((ch = getopt(argc, argv, "dl:o:")) != -1) { switch (ch) { case 'd': ! dump = 1; /* ctfdump(1) like SUNW_ctf sections */ break; case 'l': if (label != NULL) --- 96,102 ---- while ((ch = getopt(argc, argv, "dl:o:")) != -1) { switch (ch) { case 'd': ! dump = 1; /* ctfdump(1)-like SUNW_ctf sections */ break; case 'l': if (label != NULL) *************** *** 118,124 **** if (argc != 1) usage(); ! if (!dump && (outfile == NULL || label == NULL)) usage(); filename = *argv; --- 119,127 ---- if (argc != 1) usage(); ! /* Either dump the sections, or write it out. */ ! if ((dump && (outfile != NULL || label != NULL)) || ! (!dump && (outfile == NULL || label == NULL))) usage(); filename = *argv; *************** *** 143,148 **** --- 146,153 ---- dump_type(it); } + + return 0; } if (outfile != NULL) {