svn commit: r250430 - head/sbin/dmesg

Alexey Dokuchaev danfe at FreeBSD.org
Fri May 10 07:42:35 UTC 2013


On Fri, May 10, 2013 at 03:42:48AM +0000, Eitan Adler wrote:
> New Revision: 250430
> URL: http://svnweb.freebsd.org/changeset/base/250430
> 
> @@ -79,15 +80,20 @@ main(int argc, char *argv[])
>  	kvm_t *kd;
>  	size_t buflen, bufpos;
>  	long pri;
> -	int all, ch;
> +	int ch, clear;
> +	bool all;
>  
> -	all = 0;
> +	all = false;
> +	clear = false;
>  	(void) setlocale(LC_CTYPE, "");

It's a bit weird that you've left the cast here...

> @@ -190,12 +196,16 @@ main(int argc, char *argv[])
>  		(void)strvisx(visbp, p, nextp - p, 0);
>  		(void)printf("%s", visbp);

... and here (also: notice inconsistent spacing),

>  	}
> +	if (clear)
> +		if (sysctlbyname("kern.msgbuf_clear", NULL, NULL, &clear, sizeof(int)))
> +			err(1, "sysctl kern.msgbuf_clear");
> +
>  	exit(0);
>  }
>  
>  void
>  usage(void)
>  {
> -	(void)fprintf(stderr, "usage: dmesg [-a] [-M core [-N system]]\n");
> +	fprintf(stderr, "usage: dmesg [-ac] [-M core [-N system]]\n");

but removed it here for no particular reason.

./danfe


More information about the svn-src-all mailing list