2011-02-17 18:11:09 +01:00
|
|
|
/* sysuname(2) - transfer uname(3) strings. Author: Kees J. Bot
|
|
|
|
* 5 Dec 1992
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include "namespace.h"
|
|
|
|
#include <lib.h>
|
2013-11-04 22:48:08 +01:00
|
|
|
#include <string.h>
|
2011-11-14 11:07:49 +01:00
|
|
|
#include <sys/utsname.h>
|
2011-02-17 18:11:09 +01:00
|
|
|
|
|
|
|
int sysuname(int req, int field, char *value, size_t len)
|
|
|
|
{
|
|
|
|
message m;
|
|
|
|
|
2013-11-04 22:48:08 +01:00
|
|
|
memset(&m, 0, sizeof(m));
|
2014-05-13 11:31:36 +02:00
|
|
|
m.m_lc_pm_sysuname.req = req;
|
|
|
|
m.m_lc_pm_sysuname.field = field;
|
|
|
|
m.m_lc_pm_sysuname.len = len;
|
|
|
|
m.m_lc_pm_sysuname.value = (vir_bytes)value;
|
2011-02-17 18:11:09 +01:00
|
|
|
|
2013-11-04 22:48:08 +01:00
|
|
|
return _syscall(PM_PROC_NR, PM_SYSUNAME, &m);
|
2011-02-17 18:11:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* $PchId: _sysuname.c,v 1.4 1995/11/27 19:42:09 philip Exp $
|
|
|
|
*/
|