Re: svn commit: r250430 - head/sbin/dmesg

2013-05-10 Thread Alexey Dokuchaev
On Fri, May 10, 2013 at 03:42:48AM +, 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; +

Re: svn commit: r250430 - head/sbin/dmesg

2013-05-10 Thread Eitan Adler
On 10 May 2013 03:42, Alexey Dokuchaev da...@freebsd.org wrote: On Fri, May 10, 2013 at 03:42:48AM +, 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,

Re: svn commit: r250430 - head/sbin/dmesg

2013-05-10 Thread Alexey Dokuchaev
On Fri, May 10, 2013 at 08:43:37AM -0400, Eitan Adler wrote: On 10 May 2013 03:42, Alexey Dokuchaev da...@freebsd.org wrote: On Fri, May 10, 2013 at 03:42:48AM +, Eitan Adler wrote: New Revision: 250430 URL: http://svnweb.freebsd.org/changeset/base/250430 (void)

Re: svn commit: r250430 - head/sbin/dmesg

2013-05-10 Thread Eitan Adler
On 10 May 2013 09:36, Alexey Dokuchaev da...@freebsd.org wrote: Of course. But my question was about dropping the cast, not adding new option. Adding a new option should have resulted in the following diff: - (void)fprintf(stderr, usage: dmesg [-a] [-M core [-N system]]\n); +

Re: svn commit: r250430 - head/sbin/dmesg

2013-05-10 Thread David Chisnall
On 10 May 2013, at 10:01, Eitan Adler ead...@freebsd.org wrote: I thought style(9) disliked the leading (void) but I could be wrong. The cast to (void) tells the compiler that you are ignoring the return result. Without it, you will introduce new warnings and break the build on certain

Re: svn commit: r250430 - head/sbin/dmesg

2013-05-10 Thread Eitan Adler
On 10 May 2013 10:08, David Chisnall thera...@freebsd.org wrote: On 10 May 2013, at 10:01, Eitan Adler ead...@freebsd.org wrote: I thought style(9) disliked the leading (void) but I could be wrong. The cast to (void) tells the compiler that you are ignoring the return result. Without it,

Re: svn commit: r250430 - head/sbin/dmesg

2013-05-10 Thread David Chisnall
On 10 May 2013, at 10:12, Eitan Adler ead...@freebsd.org wrote: I don't remember any recent tool which uses that cast to remove errors. clang -Wunused-result gcc -Wunused-result David ___ svn-src-head@freebsd.org mailing list

svn commit: r250430 - head/sbin/dmesg

2013-05-09 Thread Eitan Adler
Author: eadler Date: Fri May 10 03:42:48 2013 New Revision: 250430 URL: http://svnweb.freebsd.org/changeset/base/250430 Log: Add support for 'dmesg -c' which clears the dmesg buffer after it has been printed. This provides compatibility with other *nix systems (including Linux). While