Deleted Added
full compact
42c42
< __FBSDID("$FreeBSD: head/sbin/dmesg/dmesg.c 227081 2011-11-04 13:36:02Z ed $");
---
> __FBSDID("$FreeBSD: head/sbin/dmesg/dmesg.c 250430 2013-05-10 03:42:48Z eadler $");
56a57
> #include <stdbool.h>
82c83,84
< int all, ch;
---
> int ch, clear;
> bool all;
84c86,87
< all = 0;
---
> all = false;
> clear = false;
87c90
< while ((ch = getopt(argc, argv, "aM:N:")) != -1)
---
> while ((ch = getopt(argc, argv, "acM:N:")) != -1)
90c93
< all++;
---
> all = true;
91a95,97
> case 'c':
> clear = true;
> break;
192a199,202
> if (clear)
> if (sysctlbyname("kern.msgbuf_clear", NULL, NULL, &clear, sizeof(int)))
> err(1, "sysctl kern.msgbuf_clear");
>
199c209
< (void)fprintf(stderr, "usage: dmesg [-a] [-M core [-N system]]\n");
---
> fprintf(stderr, "usage: dmesg [-ac] [-M core [-N system]]\n");