Skip to content

Commit

Permalink
[runlevel] Fix whitespace issues
Browse files Browse the repository at this point in the history
Excess empty lines and trailing whitespace.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Aug 21, 2020
1 parent 65f3eba commit 1140753
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile.custom
Expand Up @@ -366,6 +366,7 @@ CLEAN_SOURCES += modules/dsme_dbus.c
CLEAN_SOURCES += modules/heartbeat.c
CLEAN_SOURCES += modules/powerontimer.c
CLEAN_SOURCES += modules/powerontimer_backend.c
CLEAN_SOURCES += modules/runlevel.c
CLEAN_SOURCES += modules/thermalmanager.c
CLEAN_SOURCES += modules/thermalobject.c
CLEAN_SOURCES += modules/thermalsensor_generic.c
Expand Down Expand Up @@ -409,7 +410,6 @@ DIRTY_SOURCES += modules/iphb.c
DIRTY_SOURCES += modules/malf.c
DIRTY_SOURCES += modules/processwd.c
DIRTY_SOURCES += modules/pwrkeymonitor.c
DIRTY_SOURCES += modules/runlevel.c
DIRTY_SOURCES += modules/shutdownfeedback.c
DIRTY_SOURCES += modules/startup.c
DIRTY_SOURCES += modules/state.c
Expand Down
8 changes: 2 additions & 6 deletions modules/runlevel.c
Expand Up @@ -158,10 +158,9 @@ static void shutdown(dsme_runlevel_t runlevel)
dsme_main_loop_quit(EXIT_FAILURE);
}


/*
* This function tries to find mounted MMC (mmcblk) and remount it
* read-only if mounted.
* read-only if mounted.
* @return true on success, false on failure
*/
static bool remount_mmc_readonly(void)
Expand Down Expand Up @@ -214,7 +213,7 @@ static bool remount_mmc_readonly(void)

dsme_log(LOG_ERR, "remount failed, no mount cmd found");
return false;
}
}
while ((rc = wait(&status)) != pid)
if (rc < 0 && errno == ECHILD)
break;
Expand All @@ -232,7 +231,6 @@ static bool remount_mmc_readonly(void)
}
}


DSME_HANDLER(DSM_MSGTYPE_CHANGE_RUNLEVEL, conn, msg)
{
(void)change_runlevel(msg->runlevel);
Expand All @@ -243,14 +241,12 @@ DSME_HANDLER(DSM_MSGTYPE_SHUTDOWN, conn, msg)
shutdown(msg->runlevel);
}


module_fn_info_t message_handlers[] = {
DSME_HANDLER_BINDING(DSM_MSGTYPE_CHANGE_RUNLEVEL),
DSME_HANDLER_BINDING(DSM_MSGTYPE_SHUTDOWN),
{ 0 }
};


void module_init(module_t* module)
{
dsme_log(LOG_DEBUG, "runlevel.so loaded");
Expand Down

0 comments on commit 1140753

Please sign in to comment.