Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/compat/common pull up rev(s) 1.12 from trunk. (cgd)
details: https://anonhg.NetBSD.org/src/rev/bf108e59139f
branches: netbsd-1-4
changeset: 468841:bf108e59139f
user: cgd <cgd%NetBSD.org@localhost>
date: Mon Jun 21 19:23:26 1999 +0000
description:
pull up rev(s) 1.12 from trunk. (cgd)
diffstat:
sys/compat/common/compat_util.c | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diffs (38 lines):
diff -r 9150fd3a7564 -r bf108e59139f sys/compat/common/compat_util.c
--- a/sys/compat/common/compat_util.c Mon Jun 21 19:23:11 1999 +0000
+++ b/sys/compat/common/compat_util.c Mon Jun 21 19:23:26 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_util.c,v 1.11.2.1 1999/06/18 18:17:12 perry Exp $ */
+/* $NetBSD: compat_util.c,v 1.11.2.2 1999/06/21 19:23:26 cgd Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -204,6 +204,28 @@
return error;
}
+/*
+ * Translate one set of flags to another, based on the entries in
+ * the given table. If 'leftover' is specified, it is filled in
+ * with any flags which could not be translated.
+ */
+unsigned long
+emul_flags_translate(const struct emul_flags_xtab *tab,
+ unsigned long in, unsigned long *leftover)
+{
+ unsigned long out;
+
+ for (out = 0; tab->omask != 0; tab++) {
+ if ((in & tab->omask) == tab->oval) {
+ in &= ~tab->omask;
+ out |= tab->nval;
+ }
+ }
+ if (leftover != NULL)
+ *leftover = in;
+ return (out);
+}
+
caddr_t
stackgap_init(e)
struct emul *e;
Home |
Main Index |
Thread Index |
Old Index