VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/lightdm-greeter/liblightdm-gobject-1.5.0/system.c@ 55628

Last change on this file since 55628 was 45170, checked in by vboxsync, 12 years ago

Additions/linux: lightdm-greeter to OSE

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 790 bytes
Line 
1/*
2 * Copyright (C) 2010-2011 Robert Ancell.
3 * Author: Robert Ancell <[email protected]>
4 *
5 * This library is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU Lesser General Public License as published by the Free
7 * Software Foundation; either version 2 or version 3 of the License.
8 * See http://www.gnu.org/copyleft/lgpl.html the full text of the license.
9 */
10
11#include <sys/utsname.h>
12
13#include "lightdm/system.h"
14
15static gchar *hostname = NULL;
16
17/**
18 * lightdm_get_hostname:
19 *
20 * Return value: The name of the host we are running on.
21 **/
22const gchar *
23lightdm_get_hostname (void)
24{
25 if (!hostname)
26 {
27 struct utsname info;
28 uname (&info);
29 hostname = g_strdup (info.nodename);
30 }
31
32 return hostname;
33}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette