From: jy910.yun Date: Wed, 15 May 2013 10:46:05 +0000 (+0900) Subject: delete unneccessary prefix such as 'ss_' or 'deviced_' X-Git-Tag: submit/tizen_ivi_release/20140401.030119~63 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F15130%2F1;p=platform%2Fcore%2Fsystem%2Fsystem-server.git delete unneccessary prefix such as 'ss_' or 'deviced_' Change-Id: I4894afb51955835e0353567d69872fe09e1221b6 Signed-off-by: jy910.yun --- diff --git a/src/battery/lowbat-handler.c b/src/battery/lowbat-handler.c index c70db83..cc28d5b 100644 --- a/src/battery/lowbat-handler.c +++ b/src/battery/lowbat-handler.c @@ -122,25 +122,25 @@ int battery_warning_low_act(void *data) heynoti_get_snoti_name(_SYS_LOW_POWER, lowbat_noti_name, NAME_MAX); ss_noti_send(lowbat_noti_name); - ss_action_entry_call_internal(PREDEF_LOWBAT, 1, WARNING_LOW_BAT_ACT); + action_entry_call_internal(PREDEF_LOWBAT, 1, WARNING_LOW_BAT_ACT); return 0; } int battery_critical_low_act(void *data) { - ss_action_entry_call_internal(PREDEF_LOWBAT, 1, CRITICAL_LOW_BAT_ACT); + action_entry_call_internal(PREDEF_LOWBAT, 1, CRITICAL_LOW_BAT_ACT); return 0; } int battery_power_off_act(void *data) { - ss_action_entry_call_internal(PREDEF_LOWBAT, 1, POWER_OFF_BAT_ACT); + action_entry_call_internal(PREDEF_LOWBAT, 1, POWER_OFF_BAT_ACT); return 0; } int battery_charge_err_act(void *data) { - ss_action_entry_call_internal(PREDEF_LOWBAT, 1, CHARGE_ERROR_ACT); + action_entry_call_internal(PREDEF_LOWBAT, 1, CHARGE_ERROR_ACT); return 0; } @@ -491,7 +491,7 @@ static void lowbat_init(void *data) { struct ss_main_data *ad = (struct ss_main_data*)data; - ss_action_entry_add_internal(PREDEF_LOWBAT, lowbat_def_predefine_action, + action_entry_add_internal(PREDEF_LOWBAT, lowbat_def_predefine_action, NULL, NULL); } diff --git a/src/bs/bs.c b/src/bs/bs.c index dbfdbf8..1043d2f 100644 --- a/src/bs/bs.c +++ b/src/bs/bs.c @@ -344,7 +344,6 @@ static void launch_crash_worker(const char *filename, int popup_on) } } fclose(fp); - if (ret != -1) { fp = fopen(filename, "w"); if (fp == NULL) { @@ -352,7 +351,6 @@ static void launch_crash_worker(const char *filename, int popup_on) } fclose(fp); } - return; } @@ -372,7 +370,6 @@ static Ecore_File_Monitor_Cb __crash_file_cb(void *data, Ecore_File_Monitor *em, launch_crash_worker(path, CRASH_POPUP_ON); break; } - return NULL; } static int _get_file_count(char *path) diff --git a/src/control/control.c b/src/control/control.c index 9d90be6..1fe97d7 100644 --- a/src/control/control.c +++ b/src/control/control.c @@ -75,7 +75,7 @@ static int control_handler(int argc, char **argv) static void control_init(void *data) { - ss_action_entry_add_internal(CONTROL_HANDLER_NAME, control_handler, NULL, NULL); + action_entry_add_internal(CONTROL_HANDLER_NAME, control_handler, NULL, NULL); } const struct device_ops control_device_ops = { diff --git a/src/core/device-change-handler.c b/src/core/device-change-handler.c index cd236e8..6e2a445 100644 --- a/src/core/device-change-handler.c +++ b/src/core/device-change-handler.c @@ -173,7 +173,7 @@ static void usb_chgdet_cb(struct ss_main_data *ad) ss_lowbat_is_charge_in_now(); /* check current battery level */ ss_lowbat_monitor(NULL); - ss_action_entry_call_internal(PREDEF_USBCON, 0); + action_entry_call_internal(PREDEF_USBCON, 0); if (device_get_property(DEVICE_TYPE_EXTCON, PROP_EXTCON_USB_ONLINE, &val) == 0) { _I("jack - usb changed %d",val); check_lowbat_charge_device(val); @@ -196,7 +196,7 @@ static void __sync_usb_status(void) return; if ((val == 1 && status == VCONFKEY_SYSMAN_USB_DISCONNECTED) || (val == 0 && status == VCONFKEY_SYSMAN_USB_AVAILABLE)) - ss_action_entry_call_internal(PREDEF_USBCON, 0); + action_entry_call_internal(PREDEF_USBCON, 0); } static void ta_chgdet_cb(struct ss_main_data *ad) @@ -234,7 +234,7 @@ static void ta_chgdet_cb(struct ss_main_data *ad) static void earjack_chgdet_cb(struct ss_main_data *ad) { _I("jack - earjack changed"); - ss_action_entry_call_internal(PREDEF_EARJACKCON, 0); + action_entry_call_internal(PREDEF_EARJACKCON, 0); } static void earkey_chgdet_cb(struct ss_main_data *ad) @@ -393,7 +393,7 @@ static void charge_cb(struct ss_main_data *ad) present_status = 0; _I("battery cf is opened"); if (charge_now) - ss_action_entry_call_internal(PREDEF_BATTERY_CF_OPENED, 0); + action_entry_call_internal(PREDEF_BATTERY_CF_OPENED, 0); } if (val == 1 && present_status == 0) { @@ -614,7 +614,7 @@ static int uevent_control_cb(void *data, Ecore_Fd_Handler *fd_handler) } _I("UEVENT DETECTED (%s)", env_value); - ss_action_entry_call_internal(PREDEF_DEVICE_CHANGED,1,env_value); + action_entry_call_internal(PREDEF_DEVICE_CHANGED,1,env_value); udev_device_unref(dev); uevent_control_stop(ufd); @@ -741,10 +741,10 @@ static void pci_keyboard_remove_cb(struct ss_main_data *ad) static void device_change_init(void *data) { - ss_action_entry_add_internal(PREDEF_USBCON, usbcon_def_predefine_action, NULL, NULL); - ss_action_entry_add_internal(PREDEF_EARJACKCON, earjackcon_def_predefine_action, NULL, NULL); - ss_action_entry_add_internal(PREDEF_BATTERY_CF_OPENED, battery_def_cf_opened_actioin, NULL, NULL); - ss_action_entry_add_internal(PREDEF_DEVICE_CHANGED, changed_device_def_predefine_action, NULL, NULL); + action_entry_add_internal(PREDEF_USBCON, usbcon_def_predefine_action, NULL, NULL); + action_entry_add_internal(PREDEF_EARJACKCON, earjackcon_def_predefine_action, NULL, NULL); + action_entry_add_internal(PREDEF_BATTERY_CF_OPENED, battery_def_cf_opened_actioin, NULL, NULL); + action_entry_add_internal(PREDEF_DEVICE_CHANGED, changed_device_def_predefine_action, NULL, NULL); if (uevent_control_start() != 0) { _E("fail uevent control init"); diff --git a/src/core/predefine.c b/src/core/predefine.c index 9f3377f..9e6a2d0 100644 --- a/src/core/predefine.c +++ b/src/core/predefine.c @@ -144,7 +144,7 @@ void predefine_pm_change_state(unsigned int s_bits) pm_change_internal(getpid(), s_bits); } -static void ss_action_entry_load_from_sodir() +static void action_entry_load_from_sodir() { DIR *dp; struct dirent *dentry; @@ -176,7 +176,7 @@ static void ss_action_entry_load_from_sodir() msg->path = tmp; *ext = 0; msg->type = &(dentry->d_name[3]); - ss_action_entry_add(msg); + action_entry_add(msg); } free(msg); @@ -185,7 +185,7 @@ static void ss_action_entry_load_from_sodir() static void predefine_init(void *data) { - ss_action_entry_load_from_sodir(); + action_entry_load_from_sodir(); } const struct device_ops predefine_device_ops = { diff --git a/src/core/queue.c b/src/core/queue.c index 80d33a7..ea5d69c 100644 --- a/src/core/queue.c +++ b/src/core/queue.c @@ -30,7 +30,7 @@ static Eina_List *predef_act_list; static Eina_List *run_queue; -static struct ss_action_entry *ss_action_entry_find(char *type) +static struct ss_action_entry *action_entry_find(char *type) { Eina_List *tmp; Eina_List *tmp_next; @@ -44,7 +44,7 @@ static struct ss_action_entry *ss_action_entry_find(char *type) return NULL; } -int ss_action_entry_add_internal(char *type, +int action_entry_add_internal(char *type, int (*predefine_action) (), int (*ui_viewable) (), int (*is_accessible) (int)) @@ -59,7 +59,7 @@ int ss_action_entry_add_internal(char *type, } data->type = NULL; - if (ss_action_entry_find(type) != NULL) + if (action_entry_find(type) != NULL) goto err; data->handle = NULL; @@ -86,7 +86,7 @@ int ss_action_entry_add_internal(char *type, return -1; } -int ss_action_entry_add(struct sysnoti *msg) +int action_entry_add(struct sysnoti *msg) { struct ss_action_entry *data; @@ -97,7 +97,7 @@ int ss_action_entry_add(struct sysnoti *msg) return -1; } - if (ss_action_entry_find(msg->type) != NULL) + if (action_entry_find(msg->type) != NULL) goto err; data->handle = dlopen(msg->path, RTLD_LAZY); @@ -130,7 +130,7 @@ int ss_action_entry_add(struct sysnoti *msg) return -1; } -int ss_action_entry_call_internal(char *type, int argc, ...) +int action_entry_call_internal(char *type, int argc, ...) { Eina_List *tmp; Eina_List *tmp_next; @@ -165,7 +165,7 @@ int ss_action_entry_call_internal(char *type, int argc, ...) return 0; } -int ss_action_entry_call(struct sysnoti *msg, int sockfd) +int action_entry_call(struct sysnoti *msg, int sockfd) { Eina_List *tmp; Eina_List *tmp_next; diff --git a/src/core/queue.h b/src/core/queue.h index a50160c..7e4f183 100644 --- a/src/core/queue.h +++ b/src/core/queue.h @@ -46,13 +46,13 @@ struct ss_run_queue_entry { char *argv[SYSMAN_MAXARG]; }; -int ss_action_entry_add_internal(char *type, +int action_entry_add_internal(char *type, int (*predefine_action) (), int (*ui_viewable) (), int (*is_accessible) (int)); -int ss_action_entry_add(struct sysnoti *msg); -int ss_action_entry_call_internal(char *type, int argc, ...); -int ss_action_entry_call(struct sysnoti *msg, int sockfd); +int action_entry_add(struct sysnoti *msg); +int action_entry_call_internal(char *type, int argc, ...); +int action_entry_call(struct sysnoti *msg, int sockfd); int ss_run_queue_run(enum ss_run_state state, int (*run_func) (void *, struct ss_run_queue_entry *), diff --git a/src/core/sysnoti.c b/src/core/sysnoti.c index c460490..77ddc5a 100644 --- a/src/core/sysnoti.c +++ b/src/core/sysnoti.c @@ -255,7 +255,7 @@ static int sysnoti_cb(void *data, Ecore_Fd_Handler * fd_handler) switch (msg->cmd) { case CALL_SYSMAN_ACTION: - ret = ss_action_entry_call(msg, client_sockfd); + ret = action_entry_call(msg, client_sockfd); break; default: ret = -1; diff --git a/src/cpu/cpu-handler.c b/src/cpu/cpu-handler.c index 675c721..9a2a54f 100644 --- a/src/cpu/cpu-handler.c +++ b/src/cpu/cpu-handler.c @@ -420,11 +420,10 @@ static int __write_min_cpu_freq(int freq) static void cpu_init(void *data) { __set_freq_limit(); - - ss_action_entry_add_internal(PREDEF_SET_MAX_FREQUENCY, set_max_frequency_action, NULL, NULL); - ss_action_entry_add_internal(PREDEF_SET_MIN_FREQUENCY, set_min_frequency_action, NULL, NULL); - ss_action_entry_add_internal(PREDEF_RELEASE_MAX_FREQUENCY, release_max_frequency_action, NULL, NULL); - ss_action_entry_add_internal(PREDEF_RELEASE_MIN_FREQUENCY, release_min_frequency_action, NULL, NULL); + action_entry_add_internal(PREDEF_SET_MAX_FREQUENCY, set_max_frequency_action, NULL, NULL); + action_entry_add_internal(PREDEF_SET_MIN_FREQUENCY, set_min_frequency_action, NULL, NULL); + action_entry_add_internal(PREDEF_RELEASE_MAX_FREQUENCY, release_max_frequency_action, NULL, NULL); + action_entry_add_internal(PREDEF_RELEASE_MIN_FREQUENCY, release_min_frequency_action, NULL, NULL); vconf_notify_key_changed(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, (void *)power_saving_cb, NULL); vconf_notify_key_changed(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, (void *)power_saving_cpu_cb, NULL); diff --git a/src/display/core.c b/src/display/core.c index b74bd43..4347c69 100644 --- a/src/display/core.c +++ b/src/display/core.c @@ -152,7 +152,7 @@ void set_process_active(bool flag, pid_t pid) char str[6]; sprintf(str, "%d", (int)pid); - ss_action_entry_call_internal( + action_entry_call_internal( (flag ? ACTIVE_ACT : INACTIVE_ACT), 1, str); } diff --git a/src/display/key-filter.c b/src/display/key-filter.c index c4338cf..873f96b 100644 --- a/src/display/key-filter.c +++ b/src/display/key-filter.c @@ -88,7 +88,7 @@ static void longkey_pressed() else opt = PWROFF_POPUP_ACT; - ss_action_entry_call_internal(opt, 0); + action_entry_call_internal(opt, 0); } static Eina_Bool longkey_pressed_cb(void *data) diff --git a/src/led/led.c b/src/led/led.c index 4b23780..e627561 100644 --- a/src/led/led.c +++ b/src/led/led.c @@ -66,7 +66,7 @@ static int predefine_action(int argc, char **argv) static void led_init(void *data) { - ss_action_entry_add_internal(PREDEF_LED, predefine_action, NULL, NULL); + action_entry_add_internal(PREDEF_LED, predefine_action, NULL, NULL); } const struct device_ops led_device_ops = { diff --git a/src/mmc/mmc-handler.c b/src/mmc/mmc-handler.c index 98a9570..d3026f8 100644 --- a/src/mmc/mmc-handler.c +++ b/src/mmc/mmc-handler.c @@ -626,9 +626,9 @@ error: static void mmc_init(void *data) { - ss_action_entry_add_internal(PREDEF_MOUNT_MMC, ss_mmc_inserted, NULL, NULL); - ss_action_entry_add_internal(PREDEF_UNMOUNT_MMC, ss_mmc_unmounted, NULL, NULL); - ss_action_entry_add_internal(PREDEF_FORMAT_MMC, ss_mmc_format, NULL, NULL); + action_entry_add_internal(PREDEF_MOUNT_MMC, ss_mmc_inserted, NULL, NULL); + action_entry_add_internal(PREDEF_UNMOUNT_MMC, ss_mmc_unmounted, NULL, NULL); + action_entry_add_internal(PREDEF_FORMAT_MMC, ss_mmc_format, NULL, NULL); /* mmc card mount */ mmc_mount(); } diff --git a/src/power/power-handler.c b/src/power/power-handler.c index d47b7f3..d0985f4 100644 --- a/src/power/power-handler.c +++ b/src/power/power-handler.c @@ -108,13 +108,13 @@ static void poweroff_control_cb(keynode_t *in_key, struct ss_main_data *ad) return; switch (val) { case VCONFKEY_SYSMAN_POWER_OFF_DIRECT: - ss_action_entry_call_internal(PREDEF_POWEROFF, 0); + action_entry_call_internal(PREDEF_POWEROFF, 0); break; case VCONFKEY_SYSMAN_POWER_OFF_POPUP: - ss_action_entry_call_internal(PREDEF_PWROFF_POPUP, 0); + action_entry_call_internal(PREDEF_PWROFF_POPUP, 0); break; case VCONFKEY_SYSMAN_POWER_OFF_RESTART: - ss_action_entry_call_internal(PREDEF_REBOOT, 0); + action_entry_call_internal(PREDEF_REBOOT, 0); break; } @@ -433,7 +433,7 @@ int poweroff_def_predefine_action(int argc, char **argv) heynoti_publish(POWEROFF_NOTI_NAME); while (retry_count < MAX_RETRY) { - if (ss_action_entry_call_internal(PREDEF_INTERNAL_POWEROFF, 0) < 0) { + if (action_entry_call_internal(PREDEF_INTERNAL_POWEROFF, 0) < 0) { _E("failed to request poweroff to system_server"); retry_count++; continue; @@ -521,23 +521,23 @@ static void power_init(void *data) _E("failed to get tapi vconf key"); } - ss_action_entry_add_internal(PREDEF_ENTERSLEEP, + action_entry_add_internal(PREDEF_ENTERSLEEP, entersleep_def_predefine_action, NULL, NULL); - ss_action_entry_add_internal(PREDEF_POWEROFF, + action_entry_add_internal(PREDEF_POWEROFF, poweroff_def_predefine_action, NULL, NULL); - ss_action_entry_add_internal(PREDEF_PWROFF_POPUP, + action_entry_add_internal(PREDEF_PWROFF_POPUP, launching_predefine_action, NULL, NULL); - ss_action_entry_add_internal(PREDEF_LEAVESLEEP, + action_entry_add_internal(PREDEF_LEAVESLEEP, leavesleep_def_predefine_action, NULL, NULL); - ss_action_entry_add_internal(PREDEF_REBOOT, + action_entry_add_internal(PREDEF_REBOOT, restart_def_predefine_action, NULL, NULL); - ss_action_entry_add_internal(PREDEF_INTERNAL_POWEROFF, + action_entry_add_internal(PREDEF_INTERNAL_POWEROFF, internal_poweroff_def_predefine_action, NULL, NULL); - ss_action_entry_add_internal(PREDEF_FLIGHT_MODE, + action_entry_add_internal(PREDEF_FLIGHT_MODE, flight_mode_def_predefine_action, NULL, NULL); if (vconf_notify_key_changed(VCONFKEY_SYSMAN_POWER_OFF_STATUS, (void *)poweroff_control_cb, NULL) < 0) { diff --git a/src/proc/lowmem-handler.c b/src/proc/lowmem-handler.c index 5907752..b7cf958 100644 --- a/src/proc/lowmem-handler.c +++ b/src/proc/lowmem-handler.c @@ -242,7 +242,7 @@ static int memory_oom_act(void *data) NAME_MAX); ss_noti_send(lowmem_noti_name); } - ss_action_entry_call_internal(PREDEF_LOWMEM, 1, OOM_MEM_ACT); + action_entry_call_internal(PREDEF_LOWMEM, 1, OOM_MEM_ACT); vconf_set_int(VCONFKEY_SYSMAN_LOW_MEMORY, VCONFKEY_SYSMAN_LOW_MEMORY_HARD_WARNING); @@ -441,7 +441,7 @@ static void lowmem_init(void *data) struct ss_main_data *ad = (struct ss_main_data*)data; char lowmem_dev_node[PATH_MAX]; - ss_action_entry_add_internal(PREDEF_LOWMEM, lowmem_def_predefine_action, + action_entry_add_internal(PREDEF_LOWMEM, lowmem_def_predefine_action, NULL, NULL); if (device_get_property(DEVICE_TYPE_MEMORY, PROP_MEMORY_NODE, lowmem_dev_node) < 0) { diff --git a/src/proc/proc-handler.c b/src/proc/proc-handler.c index 01f36a7..874244e 100644 --- a/src/proc/proc-handler.c +++ b/src/proc/proc-handler.c @@ -411,16 +411,16 @@ int set_process_group_action(int argc, char **argv) static void process_init(void *data) { - ss_action_entry_add_internal(PREDEF_FOREGRD, set_foregrd_action, NULL, + action_entry_add_internal(PREDEF_FOREGRD, set_foregrd_action, NULL, NULL); - ss_action_entry_add_internal(PREDEF_BACKGRD, set_backgrd_action, NULL, + action_entry_add_internal(PREDEF_BACKGRD, set_backgrd_action, NULL, NULL); - ss_action_entry_add_internal(PREDEF_ACTIVE, set_active_action, NULL, + action_entry_add_internal(PREDEF_ACTIVE, set_active_action, NULL, NULL); - ss_action_entry_add_internal(PREDEF_INACTIVE, set_inactive_action, NULL, + action_entry_add_internal(PREDEF_INACTIVE, set_inactive_action, NULL, NULL); - ss_action_entry_add_internal(OOMADJ_SET, set_oomadj_action, NULL, NULL); - ss_action_entry_add_internal(PROCESS_GROUP_SET, set_process_group_action, NULL, NULL); + action_entry_add_internal(OOMADJ_SET, set_oomadj_action, NULL, NULL); + action_entry_add_internal(PROCESS_GROUP_SET, set_process_group_action, NULL, NULL); } const struct device_ops process_device_ops = { diff --git a/src/shared/deviced-noti.c b/src/shared/deviced-noti.c index f12b68c..ec2f44b 100644 --- a/src/shared/deviced-noti.c +++ b/src/shared/deviced-noti.c @@ -80,7 +80,7 @@ static inline int send_str(int fd, char *str) return ret; } -static int deviced_noti_send(struct sysnoti *msg) +static int noti_send(struct sysnoti *msg) { int client_len; int client_sockfd; @@ -171,7 +171,7 @@ API int deviced_call_predef_action(const char *type, int num, ...) } va_end(argptr); - ret = deviced_noti_send(msg); + ret = noti_send(msg); free(msg); return ret; diff --git a/src/time/time-handler.c b/src/time/time-handler.c index 721474d..9b46542 100644 --- a/src/time/time-handler.c +++ b/src/time/time-handler.c @@ -266,9 +266,9 @@ static int tfd_cb(void *data, Ecore_Fd_Handler * fd_handler) static void time_init(void *data) { - ss_action_entry_add_internal(PREDEF_SET_DATETIME, set_datetime_action, + action_entry_add_internal(PREDEF_SET_DATETIME, set_datetime_action, NULL, NULL); - ss_action_entry_add_internal(PREDEF_SET_TIMEZONE, set_timezone_action, + action_entry_add_internal(PREDEF_SET_TIMEZONE, set_timezone_action, NULL, NULL); if (timerfd_check_start() == -1) { _E("fail system time change detector init"); diff --git a/src/vibrator/vibrator.c b/src/vibrator/vibrator.c index f500ff2..1ea7e2e 100644 --- a/src/vibrator/vibrator.c +++ b/src/vibrator/vibrator.c @@ -318,7 +318,7 @@ int haptic_def_predefine_action(int argc, char **argv) static void vibrator_init(void *data) { - ss_action_entry_add_internal(PREDEF_HAPTIC, haptic_def_predefine_action, + action_entry_add_internal(PREDEF_HAPTIC, haptic_def_predefine_action, NULL, NULL); }