| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
It seems like crazy overkill for this trivial purpose.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The POSIX standard states that poll(3P) is being made available by
<poll.h>, not <sys/poll.h>. Most commands already include the correct
header, with the exception of rfkill. Fix that to avoid a warning on
musl-based systems.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
|
|
|
|
|
|
| |
Some more funny typos, please review carefully.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
|
|
|
|
|
|
|
|
|
| |
As discussed last year it's nice to be compatible to 2.6.32
https://www.spinics.net/lists/util-linux-ng/msg13963.html
BTW also re-define NUM_RFKILL_TYPES if needed, although we are
not really using it.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Start the ISO format flags at bit 0 instead of bit 1.
* Remove unnecessary _8601 from ISO format flag names to
avoid line wrapping and to ease readability.
* ISO timestamps have date-time-timzone in common, so move
the TIMEZONE flag to bit 2 causing all timestamp masks
to have the first three bits set and the last four bits
as timestamp 'options'.
* Change the 'SPACE' flag to a 'T' flag, because it makes
the code and comments more concise.
* Add common ISO timestamp masks.
* Implement the ISO timestamp masks in all applicable code
using the strxxx_iso() functions.
Signed-off-by: J William Piggott <elseifthen@gmx.com>
|
|
|
|
|
|
|
| |
Commit 7d2a9960ad made gps to look like a GUID Partition Table.
Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
.. just because we want to be replacement for the original version.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
* convert action string to ID and use switch()
* add note about default output to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
Attempt to fsync() this device returns EINVAL, causing the rfkill always to
return EXIT_FAILURE when either block or unblock is requested. Simply
closing the file descriptor will fix the issue.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no reason why multiple arguments could not be supported.
Most common use case is to do multiple control commands in one go without us
of 'all' argument that can cause unnecessary connection breakage. For
example someone might want to add to a system initialization following
commands.
rfkill block bluetooth uwb wimax wwan gps fm nfc
That will ensure everything but wifi is turned off with as few commands as
possible, without killing wifi at any point.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
The rfkill_event struct might grow in future, so ensure the read sizes are
at least the minimum, and allow it to be more.
Reference: https://github.com/torvalds/linux/blob/master/include/uapi/linux/rfkill.h#L90-L102
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
| |
This should help when trying to explain what or who is flicking wireles on
or off. Notice that the change is not perfect - if rfkill command is
setting a state that is already set the syslog entry is sent eventhough
there was no effective change.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
The event command appears to be something what primarily a developers will
to use when debugging.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
This also makes the rfkill to output status when executed without arguments.
That is believed ot be more useful than usage() output.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
| |
Read error should be impossible, but when one does happen user certainly
wants to know about that rather than see even more strange issue caused
random data in name variable.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
| |
Stop using RFKILL_IS_INVALID a marker when rfkill is iterating over all
devices. Addition of RFKIL_IS_ALL should make this a lot easier to digest,
especially if reading code in hurry.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
| |
Use the usual facilities, add translation strings, move global variables at
the beginning of the file, make usage() look as expected, add standard
command-line option parsing.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
After this commit the command merely builds, but does not confirm style used
in util-linux project.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
Also remove unnecessary items. Notice that the licence text from COPYING is
moved to top of the command in comment section.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|