summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoungjae Shin <yj99.shin@samsung.com>2017-09-25 04:37:50 (GMT)
committerMyoungJune Park <mj2004.park@samsung.com>2017-09-26 07:28:18 (GMT)
commit7a2bb96c4b99c5e51fc294dedf192db316c28bc1 (patch)
tree7e3b7d2ac6ac9c7d2359c93f2f1e5abb7d1d779f
parent7a07153ec476c67ddd2983c4c590101339c57c6f (diff)
downloadfactory-reset-7a2bb96c4b99c5e51fc294dedf192db316c28bc1.zip
factory-reset-7a2bb96c4b99c5e51fc294dedf192db316c28bc1.tar.gz
factory-reset-7a2bb96c4b99c5e51fc294dedf192db316c28bc1.tar.bz2
Change-Id: If2745e44e6cb8843b825eb1c25fa7ac9dfe489d6
-rw-r--r--src/factory-reset.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/factory-reset.c b/src/factory-reset.c
index b3aaefb..6e06ab6 100644
--- a/src/factory-reset.c
+++ b/src/factory-reset.c
@@ -120,12 +120,12 @@ static GMainLoop* loop;
static DBusConnection *bus_conn = NULL;
static const char *dbus_obj_path = "/org/tizen/factoryreset";
-static void unregistered_func (DBusConnection *connection, void *user_data)
+static void unregistered_func(DBusConnection *connection, void *user_data)
{
perror("factory-reset dbus unregistered\n");
}
-static DBusHandlerResult message_func (DBusConnection *connection,
+static DBusHandlerResult message_func(DBusConnection *connection,
DBusMessage *message,
void *user_data)
{
@@ -142,7 +142,7 @@ static DBusHandlerResult message_func (DBusConnection *connection,
if (strncmp(dbus_message_get_interface(message), RESET_DBUS_INTERFACE,
strlen(RESET_DBUS_INTERFACE)) != 0) {
printf("Not correct interface: \"%s\"\n",
- dbus_message_get_interface (message));
+ dbus_message_get_interface(message));
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
@@ -187,10 +187,10 @@ static DBusHandlerResult message_func (DBusConnection *connection,
}
-static DBusHandlerResult filter_func (DBusConnection *connection,
+static DBusHandlerResult filter_func(DBusConnection *connection,
DBusMessage *message, void *user_data)
{
- if (dbus_message_is_signal (message, DBUS_INTERFACE_LOCAL,
+ if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL,
"Disconnected")) {
/* Exit cleanly. */
printf("Disconnected");
@@ -209,9 +209,9 @@ static int process_dbus(void)
int ret;
DBusError error;
- loop = g_main_loop_new (NULL, FALSE);
+ loop = g_main_loop_new(NULL, FALSE);
- dbus_error_init (&error);
+ dbus_error_init(&error);
bus_conn = dbus_bus_get(DBUS_BUS_SYSTEM, &error);
if (!bus_conn) {
perror("failed to get dbus system bus");
@@ -226,7 +226,7 @@ static int process_dbus(void)
/* Should be ret == -1, if error is set */
if (ret == -1 && dbus_error_is_set(&error)) {
- dbus_error_free (&error);
+ dbus_error_free(&error);
return -1;
}
@@ -244,7 +244,7 @@ static int process_dbus(void)
int main(int argc, char **argv)
{
FILE *fp;
- int ret, i = 0, c;
+ int i = 0, c;
const char *reset_cmd[] = {RUN_SCRIPT_FILE, NULL, NULL};
time_t t = time(NULL);
struct tm tm2 = *localtime(&t);
@@ -255,7 +255,7 @@ int main(int argc, char **argv)
};
#if 0
- ret = setuid(0);
+ int ret = setuid(0);
if (ret < 0) {
perror("wrong permission");
return -1;