Do not allocate dmesg buffer on stack

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Allow space in dmesg output

Some devices have a dmesg line beginning like this:
    < 3>[ 7466.07070

Add optional space in sscanf string.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>