]> git.ipfire.org Git - thirdparty/util-linux.git/commit
dmesg: fix kmsg usability detection
authorKarel Zak <kzak@redhat.com>
Thu, 2 Aug 2012 15:39:14 +0000 (17:39 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 2 Aug 2012 15:39:14 +0000 (17:39 +0200)
commit298a073c2afdeb02dd3a8dd2c6fd1f72a3916e44
tree116c240ee26b4312ddfa42ee8508cf0407f9d69d
parentb1c7f6de74d774a7acf3427f653ad645bcbf9716
dmesg: fix kmsg usability detection

On old kernels (<3.5) kernel allows to open read-only /dev/kmsg for
root, but read() returns -EINVAL. It means that open() is not enough
to detect /dev/kmsg usability. We have to call read() (or epoll).

Reported-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/dmesg.c