From add3d8afc7fd199c0fe6bf40a46462c2f77f9ef5 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Sun, 7 May 2023 13:15:02 -0400 Subject: Implement device_open_new for all the translators implementing the device interface. Message-Id: --- libmachdev/Makefile | 2 +- libmachdev/ds_routines.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'libmachdev') diff --git a/libmachdev/Makefile b/libmachdev/Makefile index 7b07c926..8b1396f3 100644 --- a/libmachdev/Makefile +++ b/libmachdev/Makefile @@ -28,7 +28,7 @@ HURDLIBS = ports trivfs LDLIBS += -lpthread -lmachuser OBJS = $(SRCS:.c=.o) $(MIGSTUBS) MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h -device-MIGSFLAGS="-DMACH_PAYLOAD_TO_PORT=ports_payload_get_name" +device-MIGSFLAGS=-DMACH_PAYLOAD_TO_PORT=ports_payload_get_name -DDEVICE_ENABLE_DEVICE_OPEN_NEW mach_i386-MIGSFLAGS="-DMACH_PAYLOAD_TO_PORT=ports_payload_get_name" \ "-DMACH_I386_IMPORTS=import \"$(srcdir)/../libports/ports.h\";" diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c index 0d60d589..6555d6e9 100644 --- a/libmachdev/ds_routines.c +++ b/libmachdev/ds_routines.c @@ -126,6 +126,16 @@ ds_device_open (mach_port_t open_port, mach_port_t reply_port, return err; } +io_return_t +ds_device_open_new (mach_port_t open_port, mach_port_t reply_port, + mach_msg_type_name_t reply_port_type, dev_mode_t mode, + const_dev_name_t name, device_t *devp, + mach_msg_type_name_t *devicePoly) +{ + return ds_device_open (open_port, reply_port, reply_port_type, mode, + name, devp, devicePoly); +} + io_return_t ds_device_close (struct mach_device *device) { -- cgit v1.2.3