Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Sep 2025 16:28:59 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 593d432e5852 - main - ng_device: replace dependency on vnode.h with fcntl.h
Message-ID:  <202509121628.58CGSxhC019383@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=593d432e5852a254eeef83a8b1762492bb08668e

commit 593d432e5852a254eeef83a8b1762492bb08668e
Author:     Quentin Thébault <quentin.thebault@defenso.fr>
AuthorDate: 2025-08-28 06:27:03 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-09-12 16:24:26 +0000

    ng_device: replace dependency on vnode.h with fcntl.h
    
    Update to current convention of using fcntl.h O_* flags instead of vnode.h IO_*
    ones, as explained in sys/fs/devfs/devfs_vnops.c.
    
    Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>
    Reviewed by: imp, jhb
    Pull Request: https://github.com/freebsd/freebsd-src/pull/1827
---
 sys/netgraph/ng_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/netgraph/ng_device.c b/sys/netgraph/ng_device.c
index e4fcdfc635cb..79cae9933a5a 100644
--- a/sys/netgraph/ng_device.c
+++ b/sys/netgraph/ng_device.c
@@ -51,7 +51,7 @@
 #include <sys/syslog.h>
 #include <sys/systm.h>
 #include <sys/uio.h>
-#include <sys/vnode.h>
+#include <sys/fcntl.h>
 
 #include <net/ethernet.h>
 #include <net/if.h>
@@ -457,7 +457,7 @@ ngdread(struct cdev *dev, struct uio *uio, int flag)
 	do {
 		IF_DEQUEUE(&priv->readq, m);
 		if (m == NULL) {
-			if (flag & IO_NDELAY)
+			if (flag & O_NONBLOCK)
 				return (EWOULDBLOCK);
 			mtx_lock(&priv->ngd_mtx);
 			priv->flags |= NGDF_RWAIT;



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