rumpuser_seterrno() to set errno from a rump kernel context.

This commit is contained in:
pooka 2009-01-23 19:19:32 +00:00
parent 2751aa1fdb
commit d9eeb41285
2 changed files with 12 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rumpuser.h,v 1.10 2009/01/23 12:47:32 pooka Exp $ */
/* $NetBSD: rumpuser.h,v 1.11 2009/01/23 19:19:32 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -84,6 +84,8 @@ int rumpuser_putchar(int, int *);
void rumpuser_panic(void);
void rumpuser_seterrno(int);
/* rumpuser_pth */
void rumpuser_thrinit(kernel_lockfn, kernel_unlockfn, int);
int rumpuser_bioinit(rump_biodone_fn);

View File

@ -1,4 +1,4 @@
/* $NetBSD: rumpuser.c,v 1.29 2009/01/23 12:47:32 pooka Exp $ */
/* $NetBSD: rumpuser.c,v 1.30 2009/01/23 19:19:32 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -30,7 +30,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
__RCSID("$NetBSD: rumpuser.c,v 1.29 2009/01/23 12:47:32 pooka Exp $");
__RCSID("$NetBSD: rumpuser.c,v 1.30 2009/01/23 19:19:32 pooka Exp $");
#endif /* !lint */
/* thank the maker for this */
@ -335,3 +335,10 @@ rumpuser_panic()
abort();
}
void
rumpuser_seterrno(int error)
{
errno = error;
}