summaryrefslogtreecommitdiff
path: root/src/rfkill/rfkill.c
Commit message (Collapse)AuthorAge
* rfkill: rework how we generate file names from rfkill devicesLennart Poettering2014-12-03
| | | | | | | | | Generate the file name from ID_PATH plus the rfkill type (wlan, bluetooth, ...) and ignore the rfkill device name, since it apparently is not a stable identifier. Also, ensure that devices disappearing don't result in broken services, simply exit cleanly.
* treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt2014-11-28
| | | | | | | | | | | If the format string contains %m, clearly errno must have a meaningful value, so we might as well use log_*_errno to have ERRNO= logged. Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/' Plus some whitespace, linewrap, and indent adjustments.
* treewide: no need to negate errno for log_*_errno()Michal Schmidt2014-11-28
| | | | It corrrectly handles both positive and negative errno values.
* treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt2014-11-28
| | | | | | | | | | | | | As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
* rfkill: Avoid error when state restore is disabledBastien Nocera2013-12-06
| | | | | | When the state restore is disabled, we would print: "Unknown verb: load" instead of simply skipping loading the state.
* util: unify reading of /proc/cmdlineLennart Poettering2013-11-06
| | | | | | Instead of individually checking for containers in each user do this once in a new call proc_cmdline() that read the file only if we are not in a container.
* trivial: rfkill - don't include util.h twiceTom Gundersen2013-10-19
|
* trivial: rfkill: It's util.h, not utils.hColin Walters2013-10-19
| | | | How about we actually run make locally before pushing, eh?
* kerne-command-line: introduce option 'systemd.restore_state'Tom Gundersen2013-10-19
| | | | | | | | When set to 0 this will stop tools like the backlight and rfkill tools to restore state from previous boot. This is useful in case the stored state is bogus to the extent that it is preventing you from resetting it (e.g., the backlight settings cause the screen to be off on boot on a system where the backlight can not be adjusted directly from the keyboard).
* backlight: include ID_PATH in file names for backlight settingsLennart Poettering2013-10-14
| | | | | | Much like for rfkill devices we should provide some stability regarding enumeration order, hence include the stable bits of the device path in the file name we store settings under.
* rfkill: use ID_PATH as identifier for rfkill state filesLennart Poettering2013-10-14
| | | | | | Let's include the stable device path for the rfkill devices in the name of the file we store the rfkill state in, so that we have some stability regarding enumeration order.
* rfkill: add new rfkill tool to save/restore rfkill state across rebootsLennart Poettering2013-10-14
This works analogous to the existing backlight and random seed services