From: Matthias Schmidt Date: Sun, 3 Feb 2008 18:41:40 +0000 (+0000) Subject: Allow -q to take an argument (which is ignored) and add fake -O option to X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87fa1cc54b8e3d37e5e245bc8790ca482a85bbe9;p=people%2Fms%2Fdma.git Allow -q to take an argument (which is ignored) and add fake -O option to make dma(8) more sendmail(8) compatible and some startup scripts happy. Reported-by: swildner@ --- diff --git a/dma.c b/dma.c index f53908c..dd408aa 100644 --- a/dma.c +++ b/dma.c @@ -31,7 +31,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/libexec/dma/dma.c,v 1.1 2008/02/02 18:20:51 matthias Exp $ + * $DragonFly: src/libexec/dma/dma.c,v 1.2 2008/02/03 18:41:40 matthias Exp $ */ #include @@ -837,7 +837,8 @@ main(int argc, char **argv) LIST_INIT(&queue.queue); snprintf(tag, 254, "dma"); - while ((ch = getopt(argc, argv, "A:b:Df:iL:o:qr:")) != -1) { + opterr = 0; + while ((ch = getopt(argc, argv, "A:b:Df:iL:o:O:q:r:")) != -1) { switch (ch) { case 'A': /* -AX is being ignored, except for -A{c,m} */ @@ -869,6 +870,8 @@ main(int argc, char **argv) if (optarg[0] != 'i') break; /* else FALLTRHOUGH */ + case 'O': + break; case 'i': nodot = 1; break; @@ -883,6 +886,7 @@ main(int argc, char **argv) } argc -= optind; argv += optind; + opterr = 1; openlog(tag, LOG_PID | LOG_PERROR, LOG_MAIL);