MentOS  0.8.0
The Mentoring Operating System
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Macros | Functions
utsname.c File Reference

Functions used to provide information about the machine & OS. More...

Macros

#define __DEBUG_HEADER__   "[UTSNAM]"
 Change header.
 
#define __DEBUG_LEVEL__   LOGLEVEL_NOTICE
 Set log level.
 

Functions

static int __gethostname (char *name, size_t len)
 Returns the hostname. More...
 
int sys_uname (utsname_t *buf)
 Returns system information in the structure pointed to by buf. More...
 

Detailed Description

Functions used to provide information about the machine & OS.

Function Documentation

◆ __gethostname()

static int __gethostname ( char *  name,
size_t  len 
)
inlinestatic

Returns the hostname.

Parameters
namewhere the hostname is stored.
lenthe length of the buffer.
Returns
0 on success, a negative value on failure.

◆ sys_uname()

int sys_uname ( utsname_t buf)

Returns system information in the structure pointed to by buf.

Parameters
bufBuffer where the info will be placed.
Returns
0 on success, a negative value on failure.