kernel - Refactor the kernel message buffer code (2)
commit9e900855d3e64e71220a72d28da7de5e086b0c5e
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 3 Mar 2015 02:40:21 +0000 (2 18:40 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 3 Mar 2015 02:40:21 +0000 (2 18:40 -0800)
tree9c8dcbd9f22ca966e9e7c681275929a1d414c632
parent5608ef175917eaf5aa7542d9f872baca87d94a1c
kernel - Refactor the kernel message buffer code (2)

* Fix an edge case, the sysctl was not working properly when the msgbuf
  was completely empty.  Generate a single newline output.

* Also if dmesg gets a msgbuf size of 0, allocate at least 1 byte to
  avoid a malloc failure.
sbin/dmesg/dmesg.c
sys/kern/subr_prf.c