VirtualBox

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

最後變更 在這個檔案從96857是 69506,由 vboxsync 提交於 7 年 前

More scm updates

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 1.3 KB
 
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}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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