> +     switch (rv) {
> +     case KERN_INVALID_ADDRESS:
> +     case KERN_NO_SPACE:
> +             return (ENOMEM);
> +     case KERN_PROTECTION_FAILURE:
> +             return (EACCES);
> +     default:
> +             return (EINVAL);
> +     }

You can replace this fragment with the call to vm_mmap_to_errno().

Attachment: pgp0CLegJkTLT.pgp
Description: PGP signature

Reply via email to