VirtualBox

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

Last change on this file since 86297 was 69506, checked in by vboxsync, 7 years ago

More scm updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
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/*
12 * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
13 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
14 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
15 * a choice of LGPL license versions is made available with the language indicating
16 * that LGPLv2 or any later version may be used, or where a choice of which version
17 * of the LGPL is applied is otherwise unspecified.
18 */
19
20#include <sys/utsname.h>
21
22#include "lightdm/system.h"
23
24static gchar *hostname = NULL;
25
26/**
27 * lightdm_get_hostname:
28 *
29 * Return value: The name of the host we are running on.
30 **/
31const gchar *
32lightdm_get_hostname (void)
33{
34 if (!hostname)
35 {
36 struct utsname info;
37 uname (&info);
38 hostname = g_strdup (info.nodename);
39 }
40
41 return hostname;
42}
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