Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jan 2009 16:52:41 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r187689 - head/sys/contrib/pf/net
Message-ID:  <200901251652.n0PGqft9022639@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Sun Jan 25 16:52:41 2009
New Revision: 187689
URL: http://svn.freebsd.org/changeset/base/187689

Log:
  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

Modified:
  head/sys/contrib/pf/net/pf_ioctl.c

Modified: head/sys/contrib/pf/net/pf_ioctl.c
==============================================================================
--- head/sys/contrib/pf/net/pf_ioctl.c	Sun Jan 25 14:39:15 2009	(r187688)
+++ head/sys/contrib/pf/net/pf_ioctl.c	Sun Jan 25 16:52:41 2009	(r187689)
@@ -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 *



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901251652.n0PGqft9022639>