]> git.ipfire.org Git - thirdparty/util-linux.git/commit
rfkill: check id number refers to a device that exists
authorSami Kerola <kerolasa@iki.fi>
Tue, 4 Jul 2017 20:43:56 +0000 (21:43 +0100)
committerSami Kerola <kerolasa@iki.fi>
Wed, 30 Aug 2017 19:32:49 +0000 (20:32 +0100)
commitf806a238f7dea936cbc15ad91590c40ac27c2e8d
tree2089efa99a863a0398e5baa3813894b6e4ed4b17
parent1bee8ec6f873cbb8b569f5c65f998594295fe86e
rfkill: check id number refers to a device that exists

Earlier all commands happily accepted without detecting failure when
none-existing id number was used.  For example:

$ rfkill block 2017; echo $?
0

The same input after this change looks following.

$ rfkill block 2017; echo $?
rfkill: invalid identifier: 2017
1

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sys-utils/rfkill.c