[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] eth-multiplxer: Implement ds_device_close()
From: |
Joan Lledó |
Subject: |
[PATCH] eth-multiplxer: Implement ds_device_close() |
Date: |
Wed, 20 Sep 2017 12:08:43 +0200 |
---
eth-multiplexer/Makefile | 2 +-
eth-multiplexer/device_impl.c | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/eth-multiplexer/Makefile b/eth-multiplexer/Makefile
index cefa0abd..2b19de6d 100644
--- a/eth-multiplexer/Makefile
+++ b/eth-multiplexer/Makefile
@@ -29,6 +29,6 @@ LCLHDRS = ethernet.h util.h vdev.h netfs_impl.h
HURDLIBS = ports ihash iohelp fshelp shouldbeinlibc netfs bpf
LDLIBS = -lpthread
-CFLAGS += -I$(top_srcdir)/libbpf
+CFLAGS += -I$(top_srcdir)/libbpf -ggdb -O0
include ../Makeconf
diff --git a/eth-multiplexer/device_impl.c b/eth-multiplexer/device_impl.c
index d7c8beeb..b84a3309 100644
--- a/eth-multiplexer/device_impl.c
+++ b/eth-multiplexer/device_impl.c
@@ -96,6 +96,11 @@ ds_device_open (mach_port_t master_port, mach_port_t
reply_port,
kern_return_t
ds_device_close (struct vether_device *device)
{
+ if (device == NULL)
+ return D_NO_SUCH_DEVICE;
+
+ destroy_vdev(device);
+
return 0;
}
--
2.11.0