Back to index

lightdm  1.3.2
Functions | Variables
system.c File Reference
#include <sys/utsname.h>
#include "lightdm/system.h"

Go to the source code of this file.

Functions

const gchar * lightdm_get_hostname (void)
 lightdm_get_hostname:

Variables

static gchar * hostname = NULL

Function Documentation

const gchar* lightdm_get_hostname ( void  )

lightdm_get_hostname:

Return value: The name of the host we are running on.

Definition at line 24 of file system.c.

{
    if (!hostname)
    {
        struct utsname info;
        uname (&info);
        hostname = g_strdup (info.nodename);
    }

    return hostname;
}

Variable Documentation

gchar* hostname = NULL [static]

Definition at line 16 of file system.c.