Back to index

glibc  2.9
Functions
gethostname.c File Reference
#include <unistd.h>
#include "hurdhost.h"

Go to the source code of this file.

Functions

int __gethostname (char *name, size_t len)

Function Documentation

int __gethostname ( char *  name,
size_t  len 
)

Definition at line 26 of file gethostname.c.

{
  /* The host name is just the contents of the file /etc/hostname.  */
  ssize_t n = _hurd_get_host_config ("/etc/hostname", name, len);
  return n < 0 ? -1 : 0;
}

Here is the call graph for this function: