From ba4371ba78cc526812a2d1a2ce1cda9b2d2898a7 Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 25 Jan 2009 16:52:41 +0000 Subject: Revert my previous two changes. Even though the code seems to be FreeBSD kernel code, it isn't compiled on FreeBSD. I could have known this, because I was a little amazed that I couldn't find a prototype of pfopen()/pfclose() somewhere else, because it isn't marked as static. Apart from that, removing these functions wouldn't have been harmful anyway, because there are some other strange things about them (the implementation isn't consistent with the prototype at the top). Still, it's better to leave it, because it makes merging code back to older branches a little harder. Requested by: mlaier --- sys/contrib/pf/net/pf_ioctl.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'sys/contrib/pf') diff --git a/sys/contrib/pf/net/pf_ioctl.c b/sys/contrib/pf/net/pf_ioctl.c index 7981a08..6d509c5 100644 --- a/sys/contrib/pf/net/pf_ioctl.c +++ b/sys/contrib/pf/net/pf_ioctl.c @@ -477,6 +477,22 @@ pf_thread_create(void *v) if (kproc_create(pf_purge_thread, NULL, NULL, "pfpurge")) panic("pfpurge thread"); } + +int +pfopen(struct cdev *dev, int flags, int fmt, struct proc *p) +{ + if (dev2unit(dev) >= 1) + return (ENXIO); + return (0); +} + +int +pfclose(struct cdev *dev, int flags, int fmt, struct proc *p) +{ + if (dev2unit(dev) >= 1) + return (ENXIO); + return (0); +} #endif /* __FreeBSD__ */ struct pf_pool * -- cgit v1.1