Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Apr 2021 14:45:41 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 619fe0958612 - main - ioccom: define ioctl cmd value that can never be valid
Message-ID:  <202104301445.13UEjfb5065950@gitrepo.freebsd.org>

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

URL: https://cgit.FreeBSD.org/src/commit/?id=619fe095861274576a2cb45628076968051b1585

commit 619fe095861274576a2cb45628076968051b1585
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-04-22 19:40:08 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-04-30 14:43:45 +0000

    ioccom: define ioctl cmd value that can never be valid
    
    Its use is for cases where some filler is needed for cmd, or we need an
    indication that there were no cmd supplied, and so on.
    
    Reviewed by:    jhb
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D29935
---
 sys/sys/ioccom.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/sys/ioccom.h b/sys/sys/ioccom.h
index 0329ac358491..13faba046719 100644
--- a/sys/sys/ioccom.h
+++ b/sys/sys/ioccom.h
@@ -79,6 +79,9 @@
 #define	IOCPARM_IVAL(x)	((int)(intptr_t)(void *)*(caddr_t *)(void *)(x))
 #endif
 
+#define	_IOC_INVALID	(_IOC_VOID|_IOC_INOUT)	/* Never valid cmd value,
+						   use as filler */
+
 #else
 
 #include <sys/cdefs.h>



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