Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/osf1 major(), minor(), and makedev()
details: https://anonhg.NetBSD.org/src/rev/82cf0871cca7
branches: trunk
changeset: 472265:82cf0871cca7
user: cgd <cgd%NetBSD.org@localhost>
date: Mon Apr 26 06:10:36 1999 +0000
description:
major(), minor(), and makedev()
diffstat:
sys/compat/osf1/osf1.h | 9 ++++++++-
sys/compat/osf1/osf1_misc.c | 6 +++---
2 files changed, 11 insertions(+), 4 deletions(-)
diffs (43 lines):
diff -r 2a65c06329d2 -r 82cf0871cca7 sys/compat/osf1/osf1.h
--- a/sys/compat/osf1/osf1.h Mon Apr 26 05:57:53 1999 +0000
+++ b/sys/compat/osf1/osf1.h Mon Apr 26 06:10:36 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1.h,v 1.5 1999/04/26 05:56:34 cgd Exp $ */
+/* $NetBSD: osf1.h,v 1.6 1999/04/26 06:10:36 cgd Exp $ */
/*
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
@@ -415,6 +415,13 @@
};
+/* types.h */
+
+#define osf1_major(x) ((((dev_t)(x)) >> 20) & 0x00000fff)
+#define osf1_minor(x) ((((dev_t)(x)) >> 0) & 0x000fffff)
+#define osf1_makedev(x,y) ((((dev_t)(x)) << 20) | ((dev_t)(x)))
+
+
/* uio.h */
/*
diff -r 2a65c06329d2 -r 82cf0871cca7 sys/compat/osf1/osf1_misc.c
--- a/sys/compat/osf1/osf1_misc.c Mon Apr 26 05:57:53 1999 +0000
+++ b/sys/compat/osf1/osf1_misc.c Mon Apr 26 06:10:36 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_misc.c,v 1.22 1999/04/26 05:57:53 cgd Exp $ */
+/* $NetBSD: osf1_misc.c,v 1.23 1999/04/26 06:10:37 cgd Exp $ */
/*
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
@@ -475,8 +475,8 @@
return (error);
}
-#define bsd2osf_dev(dev) (major(dev) << 20 | minor(dev))
-#define osf2bsd_dev(dev) makedev((dev >> 20) & 0xfff, dev & 0xfffff)
+#define bsd2osf_dev(dev) osf1_makedev(major(dev), minor(dev))
+#define osf2bsd_dev(dev) makedev(osf1_major(dev), osf1_minor(dev))
/*
* Convert from a stat structure to an osf1 stat structure.
Home |
Main Index |
Thread Index |
Old Index