diff options
| author | njoly <njoly@NetBSD.org> | 2009-01-19 13:31:40 +0000 |
|---|---|---|
| committer | njoly <njoly@NetBSD.org> | 2009-01-19 13:31:40 +0000 |
| commit | 0ebed1143fea9730d30f5fabe3e2334564321c9d (patch) | |
| tree | b2c0921f82b0df10ac9f30d568fe4bd6497a62eb /sys/compat/linux/common/linux_misc.c | |
| parent | 3ba8641fb104d9433a057d982898abf904b3e7a2 (diff) | |
Small personality(2) update.
- Allow querying current personality.
- Use symbolic names instead of magic values.
Diffstat (limited to 'sys/compat/linux/common/linux_misc.c')
| -rw-r--r-- | sys/compat/linux/common/linux_misc.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/compat/linux/common/linux_misc.c b/sys/compat/linux/common/linux_misc.c index 41ce50954e2..9c5f20f7ffe 100644 --- a/sys/compat/linux/common/linux_misc.c +++ b/sys/compat/linux/common/linux_misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_misc.c,v 1.204 2009/01/17 22:28:53 njoly Exp $ */ +/* $NetBSD: linux_misc.c,v 1.205 2009/01/19 13:31:40 njoly Exp $ */ /*- * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.204 2009/01/17 22:28:53 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.205 2009/01/19 13:31:40 njoly Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -940,9 +940,15 @@ linux_sys_personality(struct lwp *l, const struct linux_sys_personality_args *ua syscallarg(int) per; } */ - if (SCARG(uap, per) != 0) + switch (SCARG(uap, per)) { + case LINUX_PER_LINUX: + case LINUX_PER_QUERY: + break; + default: return EINVAL; - retval[0] = 0; + } + + retval[0] = LINUX_PER_LINUX; return 0; } |
