Fix section name to follow the coding ground rule 34/272034/1
authorYoungjae Cho <y0.cho@samsung.com>
Mon, 7 Mar 2022 06:53:56 +0000 (15:53 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Mon, 7 Mar 2022 07:00:13 +0000 (16:00 +0900)
Change-Id: I0a6d6d499a0bfcfaa1b8bf0f275b6de3470e84f2
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
conf/battery.conf
conf/init.conf
conf/input-profile-iot-headless.conf
plugins/iot-headless/battery/battery-plugin.c
plugins/iot-headless/input/input-config.c
plugins/iot-headless/power/power-config-parse.c
plugins/iot-headless/power/power-event-lock.c
src/battery/config.c

index b376658..0fcb21c 100644 (file)
@@ -1,5 +1,4 @@
-[LOWBAT]
-#low battery level
+[BatteryLevelThreshold]
 Normal=100
 Warning=15
 Critical=5
@@ -9,7 +8,7 @@ WarningMethod=warning
 CriticalMethod=critical
 
 # hold wakelock if a charger has been connected, iot-headless only
-[CHARGER_WAKELOCK]
+[ChargerWakelock]
 ChargerWakeLockEnabled=yes
 
 # define event-action, iot-headless only
@@ -17,14 +16,14 @@ ChargerWakeLockEnabled=yes
 #  - define which event(device-notifiy) is filtered
 #  Action=
 #  - define action for the event
-[EVENT_ACTION]
+[EventAction]
 Name=CHARGER_CONNECTED
 Enum=2001
 DeviceNotifier=DEVICE_NOTIFIER_BATTERY_CHARGER_CONNECTED
 Action=sleep,sleep
 Action=normal,normal
 
-[EVENT_ACTION]
+[EventAction]
 Name=CHARGER_DISCONNECTED
 Enum=2002
 DeviceNotifier=DEVICE_NOTIFIER_BATTERY_CHARGER_DISCONNECTED
index 6dea3b4..e9df34f 100644 (file)
@@ -1,10 +1,10 @@
-[EVENT_ACTION]
+[EventAction]
 #INITIAL_STATE_BY_POWERKEY_BOOTING
 Enum=3000
 BootReason=powerkey
 Action=start,normal
 
-[EVENT_ACTION]
+[EventAction]
 #INITIAL_STATE_BY_CHARGER_BOOTING
 Enum=3001
 BootReason=charger
index 3d4a658..02bcd4a 100644 (file)
@@ -1,4 +1,4 @@
-# [EVENT_ACTION] - define event and corresponding action
+# [EventAction] - define event and corresponding action
 #  Name=string
 #   - define mnemonic for the event, and it is only used for logging
 #  Enum=integer
@@ -15,7 +15,7 @@
 #  Action=current,next
 #   - define state transition action for the event.
 
-[EVENT_ACTION]
+[EventAction]
 Name=BLINKKEY_EDGE
 Enum=1000
 Keycode=power
@@ -23,7 +23,7 @@ Duration=0,2000
 TriggerType=edge
 Action=sleep,sleep
 
-[EVENT_ACTION]
+[EventAction]
 Name=SHORTKEY_LEVEL
 Enum=1001
 Keycode=power
@@ -31,7 +31,7 @@ Duration=2000,-1
 TriggerType=level
 Action=broadcast
 
-[EVENT_ACTION]
+[EventAction]
 Name=SHORTKEY_EDGE
 Enum=1002
 Keycode=power
@@ -40,7 +40,7 @@ TriggerType=edge
 Action=normal,sleep
 Action=sleep,normal
 
-[EVENT_ACTION]
+[EventAction]
 Name=LONGKEY_LEVEL
 Enum=1003
 Keycode=power
@@ -48,7 +48,7 @@ Duration=7000,-1
 TriggerType=level
 Action=broadcast
 
-[EVENT_ACTION]
+[EventAction]
 Name=LONGKEY_EDGE
 Enum=1004
 Keycode=power
index 11facce..717fada 100644 (file)
@@ -111,7 +111,7 @@ static int parse_event_action(const struct parse_result *result, void *data)
        if (!result || !result->props)
                return 0;
 
-       if (MATCH(result->section, "EVENT_ACTION")) {
+       if (MATCH(result->section, "EventAction")) {
                handler = calloc(1, sizeof(struct battery_event_handler));
                if (!handler)
                        return 0;
index ec582cf..4c7be93 100644 (file)
@@ -193,7 +193,7 @@ static int parse_event_action(const struct parse_result *result, void *data)
        if (!result || !result->props)
                return 0;
 
-       if (!MATCH(result->section, "EVENT_ACTION"))
+       if (!MATCH(result->section, "EventAction"))
                return 0;
 
        _D("Input section=%s", result->section);
index 92320e0..d846ebc 100644 (file)
@@ -61,7 +61,7 @@ static int parse_matching_bootreason(const struct parse_result *result, void *da
        struct section_property *prop;
        char *bootreason = (char *) data;
 
-       if (!MATCH(result->section, "EVENT_ACTION"))
+       if (!MATCH(result->section, "EventAction"))
                return 0;
 
        SYS_G_LIST_FOREACH(result->props, elem, prop) {
index 216738b..dc8353c 100644 (file)
@@ -143,7 +143,7 @@ static void register_power_event_lock_controller(enum eventlock_type type,
 
 static int check_charger_wakelock(struct parse_result *result, void *user_data)
 {
-       if (MATCH(result->section, "CHARGER_WAKELOCK")
+       if (MATCH(result->section, "ChargerWakelock")
                && MATCH(result->name, "ChargerWakeLockEnabled")
                && MATCH(result->value, "yes"))
                *(int *) user_data = 1;
index 6bb21a3..7c5ca10 100644 (file)
@@ -45,7 +45,7 @@ static int load_config(struct parse_result *result, void *user_data)
        if (!info)
                return -EINVAL;
 
-       if (!MATCH(result->section, "LOWBAT"))
+       if (!MATCH(result->section, "BatteryLevelThreshold"))
                return -EINVAL;
 
        name = result->name;