git: kern: Fix mmioctl() to return ENOTTY for unknown devices

Aaron LI aly at crater.dragonflybsd.org
Thu Oct 1 18:44:07 PDT 2026


commit 106617dc3324881f5a47c3a89c9a7907f11168cb
Author: Aaron LI <aly at aaronly.me>
Date:   Thu Oct 1 20:53:28 2026 +0800

    kern: Fix mmioctl() to return ENOTTY for unknown devices
    
    The default case for unknown devices handles /dev/null and previously
    returned ENODEV for tcsetattr/tcgetattr/tc* requests, which should be
    ENOTTY as specified by POSIX (as well as documented in the man pages).
    
    Fix the bug by correcting mmioctl() to return ENOTTY in the default
    case.
    
    Patch-by: jpikin, sigttou (David Bidner)
    Bug: https://bugs.dragonflybsd.org/issues/3252

Summary of changes:
 sys/kern/kern_memio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/106617dc3324881f5a47c3a89c9a7907f11168cb


-- 
DragonFly BSD source repository


More information about the Commits mailing list