dmesg: add support for clearing ring buffer after printing

do a trivial stylistic change