]> git.ipfire.org Git - thirdparty/util-linux.git/commit
setterm: make error message more informative
authorPetr Uzel <petr.uzel@suse.cz>
Thu, 20 Sep 2012 13:53:50 +0000 (15:53 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 21 Sep 2012 10:14:14 +0000 (12:14 +0200)
commit2754ffc5f52294a48ab73f4f26182020907997b0
tree96bd55bf178e7f8f5a1a4ffe33aa5c75297856a6
parent4862db73e8cf1ee519bd8f251fdd21c211cb4dcd
setterm: make error message more informative

If `setterm -dump` fails because of lack of permission to read
/dev/vcsa, it should not report that it couldn't read /dev/vcsa0.
This could be misleading if there is only /dev/vcsa, but not /dev/vcsa0.

Before:
$ ./setterm -dump
setterm: Couldn't read /dev/vcsa0

After:
$ ./setterm -dump
setterm: Couldn't read neither /dev/vcsa0 nor /dev/vcsa

(Note: /dev/vcsa0 does not exist and the user does not have read
permission on /dev/vcsa in this case).

Addresses: https://bugzilla.novell.com/show_bug.cgi?id=780615
Reported-by: Christopher Yeleighton <giecrilj@stegny.2a.pl>
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
term-utils/setterm.c