Nucleus
Barry Object manager and heap in kernel library 08afe80 (3 years, 2 months ago)
/*
* This file implements the uname system call. It stores information about the
* kernel to a buffer for userspace to read.
*/
#include <sys/errno.h>
#include <sys/utsname.h>
#include <nucleus/lib.h>
#include <nucleus/memory.h>
static const char *SYSNAME = "Nucleus";
static const char *RELEASE = "0.9.4";
static const char *VERSION = "SMP PREEMPT "__DATE__" "__TIME__;
static const char *MACHINE = "x86";
/* Get information about current kernel */
int
uname(struct utsname *buf)
{
if (!buf || !verify_access(buf, sizeof(struct utsname), PROT_WRITE))
return -EFAULT;
strcpy(buf->sysname, SYSNAME);
strcpy(buf->release, RELEASE);
strcpy(buf->version, VERSION);
strcpy(buf->machine, MACHINE);
return 0;
}