VirtualBox

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

最後變更 在這個檔案從64530是 45170,由 vboxsync 提交於 12 年 前

Additions/linux: lightdm-greeter to OSE

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

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