X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/6d2010ae8f7a6078e10b361c6962983bab233e0f..4b17d6b6e417f714551ec129064745ea9919780e:/bsd/dev/i386/mem.c diff --git a/bsd/dev/i386/mem.c b/bsd/dev/i386/mem.c index 4b4589295..61f0d6929 100644 --- a/bsd/dev/i386/mem.c +++ b/bsd/dev/i386/mem.c @@ -119,11 +119,15 @@ mmioctl(dev_t dev, u_long cmd, __unused caddr_t data, { int minnum = minor(dev); - if ((minnum == 0) || (minnum == 1)) -#if !defined(SECURE_KERNEL) - if (setup_kmem == 0) - return(EINVAL); + if (0 == minnum || 1 == minnum) { + /* /dev/mem and /dev/kmem */ +#if defined(SECURE_KERNEL) + return (ENODEV); +#else + if (0 == setup_kmem) + return (EINVAL); #endif + } switch (cmd) { case FIONBIO: