OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgo/] [go/] [os/] [sys_bsd.go] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 747 jeremybenn
// Copyright 2009 The Go Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
4
 
5
// +build darwin freebsd netbsd openbsd
6
 
7
// os code shared between *BSD systems including OS X (Darwin)
8
// and FreeBSD.
9
 
10
package os
11
 
12
import "syscall"
13
 
14
func hostname() (name string, err error) {
15
        name, err = syscall.Sysctl("kern.hostname")
16
        if err != nil {
17
                return "", NewSyscallError("sysctl kern.hostname", err)
18
        }
19
        return name, nil
20
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.