Back to index

lightdm  1.3.2
Functions | Variables
plymouth.c File Reference
#include <stdlib.h>
#include <sys/wait.h>
#include "plymouth.h"

Go to the source code of this file.

Functions

static gboolean plymouth_run_command (const gchar *command, gint *exit_status)
static gboolean plymouth_command_returns_true (gchar *command)
gboolean plymouth_get_is_running (void)
gboolean plymouth_get_is_active (void)
gboolean plymouth_has_active_vt (void)
void plymouth_deactivate (void)
void plymouth_quit (gboolean retain_splash)

Variables

static gboolean have_pinged = FALSE
static gboolean have_checked_active_vt = FALSE
static gboolean is_running = FALSE
static gboolean is_active = FALSE
static gboolean has_active_vt = FALSE

Function Documentation

static gboolean plymouth_command_returns_true ( gchar *  command) [static]

Definition at line 44 of file plymouth.c.

{
    gint exit_status;
    if (!plymouth_run_command (command, &exit_status))
        return FALSE;
    return WIFEXITED (exit_status) && WEXITSTATUS (exit_status) == 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plymouth_deactivate ( void  )

Definition at line 84 of file plymouth.c.

{
    is_active = FALSE;
    plymouth_run_command ("deactivate", NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean plymouth_get_is_active ( void  )

Definition at line 66 of file plymouth.c.

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean plymouth_get_is_running ( void  )

Definition at line 53 of file plymouth.c.

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean plymouth_has_active_vt ( void  )

Definition at line 72 of file plymouth.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void plymouth_quit ( gboolean  retain_splash)

Definition at line 91 of file plymouth.c.

{
    have_pinged = TRUE;
    is_running = FALSE;
    if (retain_splash)
        plymouth_run_command ("quit --retain-splash", NULL);
    else
        plymouth_run_command ("quit", NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static gboolean plymouth_run_command ( const gchar *  command,
gint *  exit_status 
) [static]

Definition at line 25 of file plymouth.c.

{
    gchar *command_line;
    gboolean result;
    GError *error = NULL;

    command_line = g_strdup_printf ("plymouth %s", command);
    result = g_spawn_command_line_sync (command_line, NULL, NULL, exit_status, &error);

    if (error)
        g_debug ("Could not run %s: %s", command_line, error->message);
    g_clear_error (&error);

    g_free (command_line);

    return result;
}

Here is the caller graph for this function:


Variable Documentation

gboolean has_active_vt = FALSE [static]

Definition at line 22 of file plymouth.c.

gboolean have_checked_active_vt = FALSE [static]

Definition at line 18 of file plymouth.c.

gboolean have_pinged = FALSE [static]

Definition at line 17 of file plymouth.c.

gboolean is_active = FALSE [static]

Definition at line 21 of file plymouth.c.

gboolean is_running = FALSE [static]

Definition at line 20 of file plymouth.c.