diff options
Diffstat (limited to 'src/rfkill/rfkill.c')
-rw-r--r-- | src/rfkill/rfkill.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/rfkill/rfkill.c b/src/rfkill/rfkill.c index d8a2f3694e..5c45a3ae6c 100644 --- a/src/rfkill/rfkill.c +++ b/src/rfkill/rfkill.c @@ -25,8 +25,16 @@ #include "libudev.h" #include "sd-daemon.h" +#include "alloc-util.h" +#include "escape.h" +#include "fd-util.h" #include "fileio.h" +#include "io-util.h" #include "mkdir.h" +#include "parse-util.h" +#include "proc-cmdline.h" +#include "string-table.h" +#include "string-util.h" #include "udev-util.h" #include "util.h" @@ -40,8 +48,8 @@ static const char* const rfkill_type_table[NUM_RFKILL_TYPES] = { [RFKILL_TYPE_WIMAX] = "wimax", [RFKILL_TYPE_WWAN] = "wwan", [RFKILL_TYPE_GPS] = "gps", - [RFKILL_TYPE_FM] "fm", - [RFKILL_TYPE_NFC] "nfc", + [RFKILL_TYPE_FM] = "fm", + [RFKILL_TYPE_NFC] = "nfc", }; DEFINE_PRIVATE_STRING_TABLE_LOOKUP_TO_STRING(rfkill_type, int); @@ -204,7 +212,7 @@ static int load_state( assert(udev); assert(event); - if (!shall_restore_state()) + if (shall_restore_state() == 0) return 0; r = find_device(udev, event, &device); |