Remove all our real devices from the IOKit registry, as they won't be
usefull. Emulate only IOHIDSystem, IOFramebuffer and friends in the registry. ioreg is able to display the tree and dump the properties.
This commit is contained in:
parent
a2307c7caf
commit
bb7e6443cb
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: darwin_ioframebuffer.c,v 1.22 2003/11/01 00:32:44 manu Exp $ */
|
||||
/* $NetBSD: darwin_ioframebuffer.c,v 1.23 2003/11/01 18:41:25 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: darwin_ioframebuffer.c,v 1.22 2003/11/01 00:32:44 manu Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: darwin_ioframebuffer.c,v 1.23 2003/11/01 18:41:25 manu Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -107,7 +107,7 @@ struct mach_iokit_property darwin_ioframebuffer_properties_array[] = {
|
||||
struct mach_iokit_devclass darwin_ioframebuffer_devclass = {
|
||||
"<dict ID=\"0\"><key>IOProviderClass</key>"
|
||||
"<string ID=\"1\">IOFramebuffer</string></dict>",
|
||||
NULL,
|
||||
{ &mach_ioroot_devclass, NULL },
|
||||
darwin_ioframebuffer_properties,
|
||||
darwin_ioframebuffer_properties_array,
|
||||
darwin_ioframebuffer_connect_method_scalari_scalaro,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: darwin_iohidsystem.c,v 1.20 2003/11/01 00:42:04 manu Exp $ */
|
||||
/* $NetBSD: darwin_iohidsystem.c,v 1.21 2003/11/01 18:41:25 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: darwin_iohidsystem.c,v 1.20 2003/11/01 00:42:04 manu Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: darwin_iohidsystem.c,v 1.21 2003/11/01 18:41:25 manu Exp $");
|
||||
|
||||
#include "ioconf.h"
|
||||
#include "wsmux.h"
|
||||
@ -93,11 +93,17 @@ struct darwin_iohidsystem_thread_args {
|
||||
int *dita_hidsystem_finished;
|
||||
};
|
||||
|
||||
static char darwin_iokbd_properties[] = "<dict ID=\"0\"><key>IOClass</key><string ID=\"1\">AppleADBKeyboard</string><key>ADBVirtualKeys</key><string ID=\"2\">0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x3B,0x37,0x38,0x39,0x3A,0x7B,0x7C,0x7D,0x7E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x3C,0x3D,0x3E,0x36,0x7F</string><key>IOProbeScore</key><integer size=\"32\" ID=\"3\">0x3e8</integer><key>IOProviderClass</key><string ID=\"4\">IOADBDevice</string><key>CFBundleIdentifier</key><string ID=\"5\">com.apple.driver.AppleADBKeyboard</string><key>ADB Match</key><string ID=\"6\">2</string><key>PowerBook fn Foward Delete</key><integer size=\"64\" ID=\"7\">0x1</integer><key>IOMatchCategory</key><string ID=\"8\">IODefaultMatchCategory</string><key>HIDKeyMapping</key><data ID=\"10\">AAAIAAE5AQE4AgE7AwE6BAE3BRVSQUxTVFVFWFdWW1xDS1F7fX58TlkGAXIHAT9/DQBhAEEAAQABAMoAxwABAAENAHMAUwATABMA+wCnABMAEw0AZABEAAQABAFEAbYABAAEDQBmAEYABgAGAKYBrAAGAAYNAGgASAAIAAgA4wDrAAAYAA0AZwBHAAcABwDxAOEABwAHDQB6AFoAGgAaAM8BVwAaABoNAHgAWAAYABgBtAHOABgAGA0AYwBDAAMAAwHjAdMAAwADDQB2AFYAFgAWAdYB4AAWABYCADwAPg0AYgBCAAIAAgHlAfIAAgACDQBxAFEAEQARAPoA6gARABENAHcAVwAXABcByAHHABcAFw0AZQBFAAUABQDCAMUABQAFDQByAFIAEgASAeIB0gASABINAHkAWQAZABkApQHbABkAGQ0AdABUABQAFAHkAdQAFAAUCgAxACEBrQChDgAyAEAAMgAAALIAswAAAAAKADMAIwCjAboKADQAJACiAKgOADYAXgA2AB4AtgDDAB4AHgoANQAlAaUAvQoAPQArAbkBsQoAOQAoAKwAqwoANwAmAbABqw4ALQBfAB8AHwCxANAAHwAfCgA4ACoAtwC0CgAwACkArQC7DgBdAH0AHQAdACcAugAdAB0NAG8ATwAPAA8A+QDpAA8ADw0AdQBVABUAFQDIAM0AFQAVDgBbAHsAGwAbAGAAqgAbABsNAGkASQAJAAkAwQD1AAkACQ0AcABQABAAEAFwAVAAEAAQEAANAAMNAGwATAAMAAwA+ADoAAwADA0AagBKAAoACgDGAK4ACgAKCgAnACIAqQGuDQBrAEsACwALAM4ArwALAAsKADsAOgGyAaIOAFwAfAAcABwA4wDrABwAHAoALAA8AMsBowoALwA/AbgAvw0AbgBOAA4ADgDEAa8ADgAODQBtAE0ADQANAW0B2AANAA0KAC4APgC8AbMCAAkAGQwAIAAAAIAAAAoAYAB+AGABuwIAfwAI/wIAGwB+//////////////8AAC7/AAAq/wAAK/8AABv///8OAC8AXAAvABwALwBcAAAKAAAADf8AAC3//w4APQB8AD0AHAA9AHwAABhGAAAwAAAxAAAyAAAzAAA0AAA1AAA2AAA3/wAAOAAAOf///wD+JAD+JQD+JgD+IgD+JwD+KP8A/ir/AP4y/wD+M/8A/in/AP4r/wD+NP8A/i4A/jAA/i0A/iMA/i8A/iEA/jEA/iAAAawAAa4AAa8AAa0PAv8EADEC/wQAMgL/BAAzAv8EADQC/wQANQL/BAA2Av8EADcC/wQAOAL/BAA5Av8EADAC/wQALQL/BAA9Av8EAHAC/wQAXQL/BABbBgVyBn8HSgg+CT0KRw==</data><key>HIDKind</key><integer size=\"32\" ID=\"11\">0x1</integer><key>HIDInterfaceID</key><integer size=\"32\" ID=\"12\">0x2</integer><key>HIDSubinterfaceID</key><integer size=\"32\" ID=\"13\">0xc4</integer></dict>";
|
||||
static char darwin_ioresources_properties[] = "<dict ID=\"0\"><key>IOKit</key><string ID=\"1\">IOService</string><key>AccessMPC106PerformanceRegister</key><string ID=\"2\">AppleGracklePCI is not serializable</string><key>IONVRAM</key><reference IDREF=\"1\"/><key>IOiic0</key><string ID=\"3\">AppleCuda is not serializable</string><key>IORTC</key><reference IDREF=\"3\"/><key>IOBSD</key><reference IDREF=\"1\"/></dict>";
|
||||
|
||||
static char darwin_iokbd_properties[] = "<dict ID=\"0\"><key>ADB Match</key><string ID=\"1\">2</string><key>ADBVirtualKeys</key><string ID=\"2\">0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x3B,0x37,0x38,0x39,0x3A,0x7B,0x7C,0x7D,0x7E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x3C,0x3D,0x3E,0x36,0x7F</string><key>CFBundleIdentifier</key><string ID=\"3\">com.apple.driver.AppleADBKeyboard</string><key>IOClass</key><string ID=\"4\">AppleADBKeyboard</string><key>IOProbeScore</key><integer size=\"32\" ID=\"5\">0x3e8</integer><key>IOProviderClass</key><string ID=\"6\">IOADBDevice</string><key>PowerBook fn Foward Delete</key><integer size=\"64\" ID=\"7\">0x1</integer><key>KeyboardReserved</key><data ID=\"8\">Ag4wAAAAAAA=</data><key>IOMatchCategory</key><string ID=\"9\">IODefaultMatchCategory</string><key>HIDKeyMapping</key><data ID=\"11\">AAAIAAE5AQE4AgE7AwE6BAE3BRVSQUxTVFVFWFdWW1xDS1F7fX58TlkGAXIHAT9/DQBhAEEAAQABAMoAxwABAAENAHMAUwATABMA+wCnABMAEw0AZABEAAQABAFEAbYABAAEDQBmAEYABgAGAKYBrAAGAAYNAGgASAAIAAgA4wDrAAAYAA0AZwBHAAcABwDxAOEABwAHDQB6AFoAGgAaAM8BVwAaABoNAHgAWAAYABgBtAHOABgAGA0AYwBDAAMAAwHjAdMAAwADDQB2AFYAFgAWAdYB4AAWABYCADwAPg0AYgBCAAIAAgHlAfIAAgACDQBxAFEAEQARAPoA6gARABENAHcAVwAXABcByAHHABcAFw0AZQBFAAUABQDCAMUABQAFDQByAFIAEgASAeIB0gASABINAHkAWQAZABkApQHbABkAGQ0AdABUABQAFAHkAdQAFAAUCgAxACEBrQChDgAyAEAAMgAAALIAswAAAAAKADMAIwCjAboKADQAJACiAKgOADYAXgA2AB4AtgDDAB4AHgoANQAlAaUAvQoAPQArAbkBsQoAOQAoAKwAqwoANwAmAbABqw4ALQBfAB8AHwCxANAAHwAfCgA4ACoAtwC0CgAwACkArQC7DgBdAH0AHQAdACcAugAdAB0NAG8ATwAPAA8A+QDpAA8ADw0AdQBVABUAFQDIAM0AFQAVDgBbAHsAGwAbAGAAqgAbABsNAGkASQAJAAkAwQD1AAkACQ0AcABQABAAEAFwAVAAEAAQEAANAAMNAGwATAAMAAwA+ADoAAwADA0AagBKAAoACgDGAK4ACgAKCgAnACIAqQGuDQBrAEsACwALAM4ArwALAAsKADsAOgGyAaIOAFwAfAAcABwA4wDrABwAHAoALAA8AMsBowoALwA/AbgAvw0AbgBOAA4ADgDEAa8ADgAODQBtAE0ADQANAW0B2AANAA0KAC4APgC8AbMCAAkAGQwAIAAAAIAAAAoAYAB+AGABuwIAfwAI/wIAGwB+///////////////8AAC7/AAAq/wAAK/8AABv///8OAC8AXAAvABwALwBcAAAKAAAADf8AAC3//w4APQB8AD0AHAA9AHwAABhGAAAwAAAxAAAyAAAzAAA0AAA1AAA2AAA3/wAAOAAAOf///wD+JAD+JQD+JgD+IgD+JwD+KP8A/ir/AP4y/wD+M/8A/in/AP4r/wD+NP8A/i4A/jAA/i0A/iMA/i8A/iEA/jEA/iAAAawAAa4AAa8AAa0PAv8EADEC/wQAMgL/BAAzAv8EADQC/wQANQL/BAA2Av8EADcC/wQAOAL/BAA5Av8EADAC/wQALQL/BAA9Av8EAHAC/wQAXQL/BABbBgVyBn8HSgg+CT0KRw==</data><key>HIDKind</key><integer size=\"32\" ID=\"12\">0x1</integer><key>HIDInterfaceID</key><integer size=\"32\" ID=\"13\">0x2</integer><key>HIDSubinterfaceID</key><integer size=\"32\" ID=\"14\">0x2</integer></dict>";
|
||||
|
||||
static char darwin_iomouse_properties[] = "<dict ID=\"0\"><key>dpi</key><integer size=\"64\" ID=\"1\">0xc8</integer><key>IOClass</key><string ID=\"2\">AppleADBMouseType2</string><key>IOProbeScore</key><integer size=\"32\" ID=\"3\">0x2710</integer><key>IOProviderClass</key><string ID=\"4\">IOADBDevice</string><key>CFBundleIdentifier</key><string ID=\"5\">com.apple.driver.AppleADBMouse</string><key>ADB Match</key><string ID=\"6\">3</string><key>IOMatchCategory</key><string ID=\"7\">IODefaultMatchCategory</string><key>HIDPointerAccelerationType</key><string ID=\"8\">HIDMouseAcceleration</string><key>HIDPointerAccelerationSettings</key><array ID=\"9\"><data ID=\"10\">AAAAAA==</data><data ID=\"11\">AAAgAA==</data><data ID=\"12\">AABQAA==</data><data ID=\"13\">AACAAA==</data><data ID=\"14\">AACwAA==</data><data ID=\"15\">AADgAA==</data><data ID=\"16\">AAEAAA==</data></array><key>HIDPointerResolution</key><data ID=\"17\">AMgAAA==</data><key>HIDPointerConvertAbsolute</key><data ID=\"18\">AAAAAA==</data><key>HIDPointerContactToMove</key><data ID=\"19\">AAAAAA==</data><key>HIDKind</key><integer size=\"32\" ID=\"20\">0x2</integer><key>HIDInterfaceID</key><integer size=\"32\" ID=\"21\">0x2</integer><key>HIDSubinterfaceID</key><integer size=\"32\" ID=\"22\">0x2</integer></dict>";
|
||||
|
||||
static char darwin_iohidsystem_properties[] = "<dict ID=\"0\"><key>CFBundleIdentifier</key><string ID=\"1\">com.apple.iokit.IOHIDSystem</string><key>IOClass</key><string ID=\"2\">IOHIDSystem</string><key>IOMatchCategory</key><string ID=\"3\">IOHID</string><key>IOProviderClass</key><string ID=\"4\">IOResources</string><key>IOResourceMatch</key><string ID=\"5\">IOKit</string><key>IOProbeScore</key><integer size=\"32\" ID=\"6\">0x0</integer><key>HIDParameters</key><dict ID=\"7\"><key>HIDClickTime</key><data ID=\"8\">AAAAAB3NZQA=</data><key>HIDAutoDimThreshold</key><data ID=\"9\">AAAARdlkuAA=</data><key>HIDAutoDimBrightness</key><data ID=\"10\">AAAAAA==</data><key>HIDClickSpace</key><data ID=\"11\">AAAAAA==</data><key>HIDKeyRepeat</key><data ID=\"12\">AAAAAAHJw4A=</data><key>HIDInitialKeyRepeat</key><data ID=\"13\">AAAAABZaC8A=</data><key>HIDPointerAcceleration</key><data ID=\"14\">AACAAA==</data><key>HIDScrollAcceleration</key><data ID=\"15\">AABQAA==</data><key>HIDPointerButtonMode</key><data ID=\"16\">AAAAAg==</data><key>HIDF12EjectDelay</key><data ID=\"17\">AAAA+g==</data><key>HIDSlowKeysDelay</key><data ID=\"18\">AAAAAA==</data><key>HIDStickyKeysDisabled</key><data ID=\"19\">AAAAAA==</data><key>HIDStickyKeysOn</key><data ID=\"20\">AAAAAA==</data><key>HIDStickyKeysShiftToggles</key><data ID=\"21\">AAAAAA==</data><key>HIDMouseAcceleration</key><data ID=\"22\">AAGzMw==</data><key>Clicking</key><data ID=\"23\">AA==</data><key>DragLock</key><reference IDREF=\"23\"/><key>Dragging</key><reference IDREF=\"23\"/><key>JitterNoMove</key><integer size=\"32\" ID=\"24\">0x1</integer><key>JitterNoClick</key><integer size=\"32\" ID=\"25\">0x1</integer><key>PalmNoAction When Typing</key><integer size=\"32\" ID=\"26\">0x1</integer><key>PalmNoAction Permanent</key><integer size=\"32\" ID=\"27\">0x1</integer><key>TwofingerNoAction</key><integer size=\"32\" ID=\"28\">0x1</integer><key>OutsidezoneNoAction When Typing</key><integer size=\"32\" ID=\"29\">0x1</integer><key>Use Panther Settings for W</key><integer size=\"32\" ID=\"30\">0x0</integer><key>Trackpad Jitter Milliseconds</key><integer size=\"32\" ID=\"31\">0xc0</integer><key>USBMouseStopsTrackpad</key><integer size=\"32\" ID=\"32\">0x0</integer><key>HIDWaitCursorFrameInterval</key><data ID=\"33\">AfygVw==</data></dict><key>HIDAutoDimTime</key><data ID=\"34\">AAAAAAAAAAA=</data><key>HIDIdleTime</key><data ID=\"35\">AAAjRKwYjsI=</data><key>HIDAutoDimState</key><data ID=\"36\">AAAAAQ==</data><key>HIDBrightness</key><data ID=\"37\">AAAAQA==</data></dict>";
|
||||
|
||||
struct mach_iokit_devclass darwin_iokbd_devclass = {
|
||||
"(unkown)",
|
||||
NULL,
|
||||
{ &mach_ioroot_devclass, NULL },
|
||||
darwin_iokbd_properties,
|
||||
NULL,
|
||||
NULL,
|
||||
@ -109,11 +115,40 @@ struct mach_iokit_devclass darwin_iokbd_devclass = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
struct mach_iokit_devclass darwin_iomouse_devclass = {
|
||||
"(unkown)",
|
||||
{ &mach_ioroot_devclass, NULL },
|
||||
darwin_iomouse_properties,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"AppleADBMouse",
|
||||
NULL,
|
||||
};
|
||||
|
||||
struct mach_iokit_devclass darwin_ioresources_devclass = {
|
||||
"(unkown)",
|
||||
{ &mach_ioroot_devclass, NULL },
|
||||
darwin_ioresources_properties,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"IOResources",
|
||||
NULL,
|
||||
};
|
||||
|
||||
struct mach_iokit_devclass darwin_iohidsystem_devclass = {
|
||||
"<dict ID=\"0\"><key>IOProviderClass</key>"
|
||||
"<string ID=\"1\">IOHIDSystem</string></dict>",
|
||||
&darwin_iokbd_devclass,
|
||||
darwin_iokbd_properties,
|
||||
{ &darwin_ioresources_devclass, &darwin_iokbd_devclass,
|
||||
&darwin_iomouse_devclass, NULL },
|
||||
darwin_iohidsystem_properties,
|
||||
NULL,
|
||||
darwin_iohidsystem_connect_method_scalari_scalaro,
|
||||
NULL,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: darwin_iohidsystem.h,v 1.10 2003/11/01 00:42:04 manu Exp $ */
|
||||
/* $NetBSD: darwin_iohidsystem.h,v 1.11 2003/11/01 18:41:25 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
@ -41,6 +41,8 @@
|
||||
|
||||
extern struct mach_iokit_devclass darwin_iohidsystem_devclass;
|
||||
extern struct mach_iokit_devclass darwin_iokbd_devclass;
|
||||
extern struct mach_iokit_devclass darwin_iomouse_devclass;
|
||||
extern struct mach_iokit_devclass darwin_ioresources_devclass;
|
||||
|
||||
/* Events and event queue */
|
||||
#define DARWIN_NX_NULLEVENT 0
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: darwin_iokit.h,v 1.6 2003/11/01 00:42:04 manu Exp $ */
|
||||
/* $NetBSD: darwin_iokit.h,v 1.7 2003/11/01 18:41:25 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
@ -67,6 +67,8 @@ typedef struct {
|
||||
#define DARWIN_IOKIT_DEVCLASSES \
|
||||
&darwin_iohidsystem_devclass, \
|
||||
&darwin_ioframebuffer_devclass, \
|
||||
&darwin_iokbd_devclass,
|
||||
&darwin_iokbd_devclass, \
|
||||
&darwin_iomouse_devclass, \
|
||||
&darwin_ioresources_devclass,
|
||||
|
||||
#endif /* _DARWIN_IOKIT_H_ */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mach_iokit.c,v 1.23 2003/11/01 00:32:44 manu Exp $ */
|
||||
/* $NetBSD: mach_iokit.c,v 1.24 2003/11/01 18:41:25 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
#include "opt_compat_darwin.h"
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_iokit.c,v 1.23 2003/11/01 00:32:44 manu Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_iokit.c,v 1.24 2003/11/01 18:41:25 manu Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -62,13 +62,34 @@ __KERNEL_RCSID(0, "$NetBSD: mach_iokit.c,v 1.23 2003/11/01 00:32:44 manu Exp $")
|
||||
#include <compat/darwin/darwin_iokit.h>
|
||||
#endif
|
||||
|
||||
struct mach_iokit_devclass mach_ioroot_devclass = {
|
||||
"(unknwon)",
|
||||
{ NULL },
|
||||
"<dict ID=\"0\"></dict>",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"Root",
|
||||
NULL,
|
||||
};
|
||||
|
||||
struct mach_iokit_devclass *mach_iokit_devclasses[] = {
|
||||
&mach_ioroot_devclass,
|
||||
#ifdef COMPAT_DARWIN
|
||||
DARWIN_IOKIT_DEVCLASSES
|
||||
#endif
|
||||
NULL,
|
||||
};
|
||||
|
||||
|
||||
static int mach_fill_child_iterator(struct mach_device_iterator *, int, int,
|
||||
struct mach_iokit_devclass *);
|
||||
static int mach_fill_parent_iterator(struct mach_device_iterator *, int, int,
|
||||
struct mach_iokit_devclass *);
|
||||
|
||||
int
|
||||
mach_io_service_get_matching_services(args)
|
||||
struct mach_trap_args *args;
|
||||
@ -80,22 +101,36 @@ mach_io_service_get_matching_services(args)
|
||||
struct mach_port *mp;
|
||||
struct mach_right *mr;
|
||||
struct mach_iokit_devclass *mid;
|
||||
struct mach_device_iterator *mdi;
|
||||
size_t size;
|
||||
int i;
|
||||
|
||||
mp = mach_port_get();
|
||||
mp->mp_flags |= MACH_MP_INKERNEL;
|
||||
mr = mach_right_get(mp, l, MACH_PORT_TYPE_SEND, 0);
|
||||
|
||||
|
||||
mp->mp_data = NULL;
|
||||
i = 0;
|
||||
while ((mid = mach_iokit_devclasses[i++]) != NULL) {
|
||||
if (memcmp(req->req_string, mid->mid_string,
|
||||
strlen(mid->mid_string)) == 0) {
|
||||
mp->mp_datatype = MACH_MP_IOKIT_DEVCLASS;
|
||||
mp->mp_data = mid;
|
||||
mp->mp_datatype = MACH_MP_DEVICE_ITERATOR;
|
||||
|
||||
size = sizeof(*mdi)
|
||||
+ sizeof(struct mach_device_iterator *);
|
||||
mdi = malloc(size, M_EMULDATA, M_WAITOK);
|
||||
mdi->mdi_devices[0] = mid;
|
||||
mdi->mdi_devices[1] = NULL;
|
||||
mdi->mdi_current = 0;
|
||||
|
||||
mp->mp_data = mdi;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (mp->mp_data == NULL)
|
||||
return mach_iokit_error(args, MACH_IOKIT_ENOENT);
|
||||
|
||||
rep->rep_msgh.msgh_bits =
|
||||
MACH_MSGH_REPLY_LOCAL_BITS(MACH_MSG_TYPE_MOVE_SEND_ONCE) |
|
||||
MACH_MSGH_BITS_COMPLEX;
|
||||
@ -121,7 +156,6 @@ mach_io_iterator_next(args)
|
||||
struct lwp *l = args->l;
|
||||
struct mach_port *mp;
|
||||
struct mach_right *mr;
|
||||
struct device *dev;
|
||||
struct mach_device_iterator *mdi;
|
||||
mach_port_t mn;
|
||||
|
||||
@ -129,58 +163,19 @@ mach_io_iterator_next(args)
|
||||
if ((mr = mach_right_check(mn, l, MACH_PORT_TYPE_ALL_RIGHTS)) == NULL)
|
||||
return mach_iokit_error(args, MACH_IOKIT_EPERM);
|
||||
|
||||
switch (mr->mr_port->mp_datatype) {
|
||||
case MACH_MP_IOKIT_DEVCLASS:
|
||||
/* Do not come here again */
|
||||
mr->mr_port->mp_datatype = MACH_MP_IOKIT_DEVCLASS_DONE;
|
||||
|
||||
mp = mach_port_get();
|
||||
mp->mp_flags |= MACH_MP_INKERNEL;
|
||||
mp->mp_datatype = MACH_MP_IOKIT_DEVCLASS;
|
||||
mp->mp_data = mr->mr_port->mp_data;
|
||||
|
||||
break;
|
||||
|
||||
case MACH_MP_DEVICE_ITERATOR:
|
||||
mdi = mr->mr_port->mp_data;
|
||||
|
||||
/* XXX No lock for the device list? */
|
||||
/* Check that mdi->mdi_parent still exists, else give up */
|
||||
TAILQ_FOREACH(dev, &alldevs, dv_list)
|
||||
if (dev == mdi->mdi_parent)
|
||||
break;
|
||||
if (dev == NULL)
|
||||
return mach_iokit_error(args, MACH_IOKIT_ENODEV);
|
||||
|
||||
/* Check that mdi->mdi_current still exists, else reset it */
|
||||
TAILQ_FOREACH(dev, &alldevs, dv_list)
|
||||
if (dev == mdi->mdi_current)
|
||||
break;
|
||||
if (dev == NULL)
|
||||
mdi->mdi_current = TAILQ_FIRST(&alldevs);
|
||||
|
||||
/* And now, find the next child of mdi->mdi_parent. */
|
||||
do {
|
||||
if (dev->dv_parent == mdi->mdi_parent) {
|
||||
mdi->mdi_current = dev;
|
||||
break;
|
||||
}
|
||||
} while ((dev = TAILQ_NEXT(dev, dv_list)) != NULL);
|
||||
|
||||
if (dev == NULL)
|
||||
return mach_iokit_error(args, MACH_IOKIT_ENODEV);
|
||||
|
||||
mp = mach_port_get();
|
||||
mp->mp_flags |= MACH_MP_INKERNEL;
|
||||
mp->mp_datatype = MACH_MP_DEVICE;
|
||||
mp->mp_data = mdi->mdi_current;
|
||||
mdi->mdi_current = TAILQ_NEXT(mdi->mdi_current, dv_list);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (mr->mr_port->mp_datatype != MACH_MP_DEVICE_ITERATOR)
|
||||
return mach_iokit_error(args, MACH_IOKIT_EINVAL);
|
||||
break;
|
||||
}
|
||||
|
||||
mdi = mr->mr_port->mp_data;
|
||||
|
||||
/* Is there something coming next? */
|
||||
if (mdi->mdi_devices[mdi->mdi_current] == NULL)
|
||||
return mach_iokit_error(args, MACH_IOKIT_EINVAL);
|
||||
|
||||
mp = mach_port_get();
|
||||
mp->mp_flags |= MACH_MP_INKERNEL;
|
||||
mp->mp_datatype = MACH_MP_IOKIT_DEVCLASS;
|
||||
mp->mp_data = mdi->mdi_devices[mdi->mdi_current++];
|
||||
|
||||
mr = mach_right_get(mp, l, MACH_PORT_TYPE_SEND, 0);
|
||||
|
||||
@ -318,12 +313,55 @@ mach_io_registry_entry_create_iterator(args)
|
||||
size_t *msglen = args->rsize;
|
||||
struct lwp *l = args->l;
|
||||
struct mach_port *mp;
|
||||
mach_port_t mn;
|
||||
struct mach_right *mr;
|
||||
struct mach_iokit_devclass *mid;
|
||||
struct mach_device_iterator *mdi;
|
||||
struct mach_iokit_devclass **midp;
|
||||
int maxdev, index;
|
||||
size_t size;
|
||||
|
||||
mn = req->req_msgh.msgh_remote_port;
|
||||
if ((mr = mach_right_check(mn, l, MACH_PORT_TYPE_ALL_RIGHTS)) == NULL)
|
||||
return mach_iokit_error(args, MACH_IOKIT_EPERM);
|
||||
if (mr->mr_port->mp_datatype != MACH_MP_IOKIT_DEVCLASS)
|
||||
return mach_iokit_error(args, MACH_IOKIT_EINVAL);
|
||||
mid = (struct mach_iokit_devclass *)mr->mr_port->mp_data;
|
||||
|
||||
mp = mach_port_get();
|
||||
mp->mp_flags |= MACH_MP_INKERNEL;
|
||||
mp->mp_flags |= (MACH_MP_INKERNEL | MACH_MP_DATA_ALLOCATED);
|
||||
mp->mp_datatype = MACH_MP_DEVICE_ITERATOR;
|
||||
|
||||
maxdev = sizeof(mach_iokit_devclasses);
|
||||
size = sizeof(*mdi) + (maxdev * sizeof(struct mach_iokit_devclass *));
|
||||
mdi = malloc(size, M_EMULDATA, M_WAITOK);
|
||||
mp->mp_data = mdi;
|
||||
|
||||
if (req->req_options & MACH_IOKIT_PARENT_ITERATOR)
|
||||
index = mach_fill_parent_iterator(mdi, maxdev, 0, mid);
|
||||
else
|
||||
index = mach_fill_child_iterator(mdi, maxdev, 0, mid);
|
||||
|
||||
/* XXX This is untested */
|
||||
if (req->req_options & MACH_IOKIT_RECURSIVE_ITERATOR) {
|
||||
for (midp = mdi->mdi_devices; *midp != NULL; midp++) {
|
||||
if (req->req_options & MACH_IOKIT_PARENT_ITERATOR)
|
||||
index = mach_fill_parent_iterator(mdi,
|
||||
maxdev, index, *midp);
|
||||
else
|
||||
index = mach_fill_child_iterator(mdi,
|
||||
maxdev, index, *midp);
|
||||
}
|
||||
}
|
||||
|
||||
mdi->mdi_current = 0;
|
||||
|
||||
mr = mach_right_get(mp, l, MACH_PORT_TYPE_SEND, 0);
|
||||
|
||||
#ifdef DEBUG_MACH
|
||||
printf("io_registry_entry_create_iterator\n");
|
||||
#endif
|
||||
|
||||
rep->rep_msgh.msgh_bits =
|
||||
MACH_MSGH_REPLY_LOCAL_BITS(MACH_MSG_TYPE_MOVE_SEND_ONCE) |
|
||||
MACH_MSGH_BITS_COMPLEX;
|
||||
@ -446,8 +484,8 @@ mach_io_registry_get_root_entry(args)
|
||||
|
||||
mp = mach_port_get();
|
||||
mp->mp_flags |= MACH_MP_INKERNEL;
|
||||
mp->mp_datatype = MACH_MP_DEVICE;
|
||||
mp->mp_data = TAILQ_FIRST(&alldevs);
|
||||
mp->mp_datatype = MACH_MP_IOKIT_DEVCLASS;
|
||||
mp->mp_data = &mach_ioroot_devclass;
|
||||
|
||||
mr = mach_right_get(mp, l, MACH_PORT_TYPE_SEND, 0);
|
||||
|
||||
@ -477,23 +515,30 @@ mach_io_registry_entry_get_child_iterator(args)
|
||||
struct mach_port *mp;
|
||||
struct mach_right *mr;
|
||||
mach_port_t mn;
|
||||
struct mach_iokit_devclass *mid;
|
||||
struct mach_device_iterator *mdi;
|
||||
int maxdev;
|
||||
size_t size;
|
||||
|
||||
mn = req->req_msgh.msgh_remote_port;
|
||||
if ((mr = mach_right_check(mn, l, MACH_PORT_TYPE_ALL_RIGHTS)) == NULL)
|
||||
return mach_iokit_error(args, MACH_IOKIT_EPERM);
|
||||
if (mr->mr_port->mp_datatype != MACH_MP_DEVICE)
|
||||
if (mr->mr_port->mp_datatype != MACH_MP_IOKIT_DEVCLASS)
|
||||
return mach_iokit_error(args, MACH_IOKIT_EINVAL);
|
||||
mid = (struct mach_iokit_devclass *)mr->mr_port->mp_data;
|
||||
|
||||
mp = mach_port_get();
|
||||
mp->mp_flags |= (MACH_MP_INKERNEL | MACH_MP_DATA_ALLOCATED);
|
||||
mp->mp_datatype = MACH_MP_DEVICE_ITERATOR;
|
||||
|
||||
mdi = malloc(sizeof(*mdi), M_EMULDATA, M_WAITOK);
|
||||
mdi->mdi_parent = mr->mr_port->mp_data;
|
||||
mdi->mdi_current = TAILQ_FIRST(&alldevs);
|
||||
maxdev = sizeof(mach_iokit_devclasses);
|
||||
size = sizeof(*mdi) + (maxdev * sizeof(struct mach_iokit_devclass *));
|
||||
mdi = malloc(size, M_EMULDATA, M_WAITOK);
|
||||
mp->mp_data = mdi;
|
||||
|
||||
(void)mach_fill_child_iterator(mdi, maxdev, 0, mid);
|
||||
mdi->mdi_current = 0;
|
||||
|
||||
mr = mach_right_get(mp, l, MACH_PORT_TYPE_SEND, 0);
|
||||
|
||||
rep->rep_msgh.msgh_bits =
|
||||
@ -521,23 +566,24 @@ mach_io_registry_entry_get_name_in_plane(args)
|
||||
struct lwp *l = args->l;
|
||||
struct mach_right *mr;
|
||||
mach_port_t mn;
|
||||
struct device *dev;
|
||||
struct mach_iokit_devclass *mid;
|
||||
|
||||
mn = req->req_msgh.msgh_remote_port;
|
||||
if ((mr = mach_right_check(mn, l, MACH_PORT_TYPE_ALL_RIGHTS)) == NULL)
|
||||
return mach_iokit_error(args, MACH_IOKIT_EPERM);
|
||||
if (mr->mr_port->mp_datatype != MACH_MP_DEVICE)
|
||||
if (mr->mr_port->mp_datatype != MACH_MP_IOKIT_DEVCLASS)
|
||||
return mach_iokit_error(args, MACH_IOKIT_EINVAL);
|
||||
dev = mr->mr_port->mp_data;
|
||||
mid = mr->mr_port->mp_data;
|
||||
|
||||
rep->rep_msgh.msgh_bits =
|
||||
MACH_MSGH_REPLY_LOCAL_BITS(MACH_MSG_TYPE_MOVE_SEND_ONCE);
|
||||
rep->rep_msgh.msgh_size = sizeof(*rep) - sizeof(rep->rep_trailer);
|
||||
rep->rep_msgh.msgh_local_port = req->req_msgh.msgh_local_port;
|
||||
rep->rep_msgh.msgh_id = req->req_msgh.msgh_id + 100;
|
||||
/* XXX Just return a dummy name for now */
|
||||
rep->rep_namecount = sizeof(dev->dv_xname);
|
||||
memcpy(&rep->rep_name, dev->dv_xname, sizeof(dev->dv_xname));
|
||||
rep->rep_namecount = strlen(mid->mid_name);
|
||||
if (rep->rep_namecount >= 128)
|
||||
rep->rep_namecount = 128;
|
||||
memcpy(&rep->rep_name, mid->mid_name, rep->rep_namecount);
|
||||
rep->rep_trailer.msgh_trailer_size = 8;
|
||||
|
||||
*msglen = sizeof(*rep);
|
||||
@ -559,8 +605,10 @@ mach_io_object_get_class(args)
|
||||
rep->rep_msgh.msgh_local_port = req->req_msgh.msgh_local_port;
|
||||
rep->rep_msgh.msgh_id = req->req_msgh.msgh_id + 100;
|
||||
/* XXX Just return a dummy name for now */
|
||||
rep->rep_namecount = sizeof(classname);
|
||||
memcpy(&rep->rep_name, classname, sizeof(classname));
|
||||
rep->rep_namecount = strlen(classname);
|
||||
if (rep->rep_namecount >= 128)
|
||||
rep->rep_namecount = 128;
|
||||
memcpy(&rep->rep_name, classname, rep->rep_namecount);
|
||||
rep->rep_trailer.msgh_trailer_size = 8;
|
||||
|
||||
*msglen = sizeof(*rep);
|
||||
@ -676,7 +724,7 @@ mach_io_registry_entry_get_property(args)
|
||||
#ifdef DEBUG_MACH
|
||||
/*
|
||||
* We do not handle non zero offset and multiple names,
|
||||
* but it seems that Darwin binaries just jold random values
|
||||
* but it seems that Darwin binaries just fold random values
|
||||
* in theses fields. We have yet to see a real use of
|
||||
* non null offset / multiple names.
|
||||
*/
|
||||
@ -840,21 +888,11 @@ mach_io_iterator_reset(args)
|
||||
if ((mr = mach_right_check(mn, l, MACH_PORT_TYPE_ALL_RIGHTS)) == NULL)
|
||||
return mach_iokit_error(args, MACH_IOKIT_EPERM);
|
||||
|
||||
switch(mr->mr_port->mp_datatype) {
|
||||
case MACH_MP_DEVICE_ITERATOR:
|
||||
mdi = mr->mr_port->mp_data;
|
||||
mdi->mdi_parent = mr->mr_port->mp_data;
|
||||
mdi->mdi_current = TAILQ_FIRST(&alldevs);
|
||||
break;
|
||||
|
||||
case MACH_MP_IOKIT_DEVCLASS_DONE:
|
||||
mr->mr_port->mp_datatype = MACH_MP_IOKIT_DEVCLASS;
|
||||
break;
|
||||
if (mr->mr_port->mp_datatype != MACH_MP_DEVICE_ITERATOR)
|
||||
return mach_iokit_error(args, MACH_IOKIT_EINVAL);
|
||||
|
||||
case MACH_MP_IOKIT_DEVCLASS:
|
||||
default:
|
||||
printf("mach_io_iterator_reset: unknown type\n");
|
||||
}
|
||||
mdi = mr->mr_port->mp_data;
|
||||
mdi->mdi_current = 0;
|
||||
|
||||
rep->rep_msgh.msgh_bits =
|
||||
MACH_MSGH_REPLY_LOCAL_BITS(MACH_MSG_TYPE_MOVE_SEND_ONCE);
|
||||
@ -1080,7 +1118,10 @@ mach_io_registry_entry_get_parent_iterator(args)
|
||||
struct mach_port *mp;
|
||||
struct mach_right *mr;
|
||||
struct mach_iokit_devclass *mid;
|
||||
struct mach_device_iterator *mdi;
|
||||
mach_port_t mn;
|
||||
int maxdev;
|
||||
size_t size;
|
||||
|
||||
#ifdef DEBUG_MACH
|
||||
printf("mach_io_registry_entry_get_parent_iterator: plane = %s\n",
|
||||
@ -1094,13 +1135,22 @@ mach_io_registry_entry_get_parent_iterator(args)
|
||||
if ((mr = mach_right_check(mn, l, MACH_PORT_TYPE_ALL_RIGHTS)) == NULL)
|
||||
return mach_iokit_error(args, MACH_IOKIT_EPERM);
|
||||
|
||||
if (mr->mr_port->mp_datatype != MACH_MP_IOKIT_DEVCLASS)
|
||||
return mach_iokit_error(args, MACH_IOKIT_EINVAL);
|
||||
mid = mr->mr_port->mp_data;
|
||||
|
||||
mp = mach_port_get();
|
||||
mp->mp_flags |= MACH_MP_INKERNEL;
|
||||
if (mr->mr_port->mp_datatype == MACH_MP_IOKIT_DEVCLASS) {
|
||||
mp->mp_datatype = MACH_MP_IOKIT_DEVCLASS;
|
||||
mid = (struct mach_iokit_devclass *)mr->mr_port->mp_data;
|
||||
mp->mp_data = mid->mid_parent;
|
||||
}
|
||||
mp->mp_flags |= (MACH_MP_INKERNEL | MACH_MP_DATA_ALLOCATED);
|
||||
mp->mp_datatype = MACH_MP_DEVICE_ITERATOR;
|
||||
|
||||
maxdev = sizeof(mach_iokit_devclasses);
|
||||
size = sizeof(*mdi) + (maxdev * sizeof(struct mach_iokit_devclass *));
|
||||
mdi = malloc(size, M_EMULDATA, M_WAITOK);
|
||||
mp->mp_data = mdi;
|
||||
|
||||
(void)mach_fill_parent_iterator(mdi, maxdev, 0, mid);
|
||||
mdi->mdi_current = 0;
|
||||
|
||||
mr = mach_right_get(mp, l, MACH_PORT_TYPE_SEND, 0);
|
||||
|
||||
rep->rep_msgh.msgh_bits =
|
||||
@ -1132,3 +1182,55 @@ mach_iokit_cleanup_notify(mr)
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int
|
||||
mach_fill_child_iterator(mdi, size, index, mid)
|
||||
struct mach_device_iterator *mdi;
|
||||
int size;
|
||||
int index;
|
||||
struct mach_iokit_devclass *mid;
|
||||
{
|
||||
struct mach_iokit_devclass **midp;
|
||||
struct mach_iokit_devclass **midq;
|
||||
|
||||
for (midp = mach_iokit_devclasses; *midp != NULL; midp++) {
|
||||
for (midq = (*midp)->mid_parent; *midq != NULL; midq++) {
|
||||
if (*midq == mid) {
|
||||
mdi->mdi_devices[index++] = *midp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifdef DIAGNOSTIC
|
||||
if (index >= size) {
|
||||
printf("mach_device_iterator overflow\n");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
mdi->mdi_devices[index] = NULL;
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
static int
|
||||
mach_fill_parent_iterator(mdi, size, index, mid)
|
||||
struct mach_device_iterator *mdi;
|
||||
int size;
|
||||
int index;
|
||||
struct mach_iokit_devclass *mid;
|
||||
{
|
||||
struct mach_iokit_devclass **midp;
|
||||
|
||||
for (midp = mid->mid_parent; *midp != NULL; midp++) {
|
||||
mdi->mdi_devices[index++] = *midp;
|
||||
#ifdef DIAGNOSTIC
|
||||
if (index >= size) {
|
||||
printf("mach_device_iterator overflow\n");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
mdi->mdi_devices[index] = NULL;
|
||||
|
||||
return index;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mach_iokit.h,v 1.20 2003/11/01 00:32:44 manu Exp $ */
|
||||
/* $NetBSD: mach_iokit.h,v 1.21 2003/11/01 18:41:25 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
@ -142,6 +142,8 @@ typedef struct {
|
||||
|
||||
/* io_registry_entry_create_iterator */
|
||||
|
||||
#define MACH_IOKIT_RECURSIVE_ITERATOR 1
|
||||
#define MACH_IOKIT_PARENT_ITERATOR 2
|
||||
typedef struct {
|
||||
mach_msg_header_t req_msgh;
|
||||
mach_ndr_record_t req_ndr;
|
||||
@ -543,19 +545,21 @@ int mach_io_registry_entry_get_parent_iterator(struct mach_trap_args *);
|
||||
|
||||
extern struct mach_iokit_devclass *mach_iokit_devclasses[];
|
||||
|
||||
struct mach_device_iterator {
|
||||
struct device *mdi_parent;
|
||||
struct device *mdi_current;
|
||||
};
|
||||
|
||||
struct mach_iokit_property {
|
||||
const char *mip_name;
|
||||
const char *mip_value;
|
||||
};
|
||||
|
||||
struct mach_device_iterator {
|
||||
int mdi_current;
|
||||
struct mach_iokit_devclass *mdi_devices[1];
|
||||
};
|
||||
|
||||
/* Make this dynamic if it ever gets useful */
|
||||
#define MACH_IOKIT_MAX_PARENTS 8
|
||||
struct mach_iokit_devclass {
|
||||
char *mid_string;
|
||||
struct mach_iokit_devclass *mid_parent;
|
||||
struct mach_iokit_devclass *mid_parent[MACH_IOKIT_MAX_PARENTS];
|
||||
char *mid_properties;
|
||||
struct mach_iokit_property *mid_properties_array;
|
||||
int (*mid_connect_method_scalari_scalaro)(struct mach_trap_args *);
|
||||
@ -567,6 +571,8 @@ struct mach_iokit_devclass {
|
||||
struct mach_right *mid_notify;
|
||||
};
|
||||
|
||||
extern struct mach_iokit_devclass mach_ioroot_devclass;
|
||||
|
||||
void mach_iokit_cleanup_notify(struct mach_right *);
|
||||
|
||||
#endif /* _MACH_IOKIT_H_ */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mach_port.h,v 1.25 2003/04/30 18:38:19 manu Exp $ */
|
||||
/* $NetBSD: mach_port.h,v 1.26 2003/11/01 18:41:25 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
|
||||
@ -296,12 +296,10 @@ struct mach_port {
|
||||
|
||||
/* mp_datatype for struct mach_port */
|
||||
#define MACH_MP_NONE 0x0 /* No data */
|
||||
#define MACH_MP_DEVICE 0x1 /* struct device */
|
||||
#define MACH_MP_DEVICE_ITERATOR 0x2 /* struct mach_device_iterator */
|
||||
#define MACH_MP_IOKIT_DEVCLASS 0x3 /* (struct mach_iokit_devclass *) */
|
||||
#define MACH_MP_DEVICE_ITERATOR 0x2 /* (struct mach_device_iterator *) */
|
||||
#define MACH_MP_IOKIT_DEVCLASS 0x3 /* (struct mach_iokit_devclass **) */
|
||||
#define MACH_MP_PROC 0x4 /* (struct proc *) */
|
||||
#define MACH_MP_NOTIFY_SYNC 0x5 /* int */
|
||||
#define MACH_MP_IOKIT_DEVCLASS_DONE 0x6 /* (struct mach_iokit_devclass *) */
|
||||
|
||||
void mach_port_init(void);
|
||||
struct mach_port *mach_port_get(void);
|
||||
|
Loading…
Reference in New Issue
Block a user