diff options
author | jhb <jhb@FreeBSD.org> | 2005-04-01 20:00:11 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-04-01 20:00:11 +0000 |
commit | a3c6b782c3ed4abd939e54896eed4b89f4d18d21 (patch) | |
tree | c33b91d98e8867bbb1f42b28ab23638d2003f368 /sys/kern/imgact_gzip.c | |
parent | 9683bbdf3f053a2b65d3ac11aac7a2eec86c559b (diff) | |
download | FreeBSD-src-a3c6b782c3ed4abd939e54896eed4b89f4d18d21.zip FreeBSD-src-a3c6b782c3ed4abd939e54896eed4b89f4d18d21.tar.gz |
- Change the vm_mmap() function to accept an objtype_t parameter specifying
the type of object represented by the handle argument.
- Allow vm_mmap() to map device memory via cdev objects in addition to
vnodes and anonymous memory. Note that mmaping a cdev directly does not
currently perform any MAC checks like mapping a vnode does.
- Unbreak the DRM getbufs ioctl by having it call vm_mmap() directly on the
cdev the ioctl is acting on rather than trying to find a suitable vnode
to map from.
Reviewed by: alc, arch@
Diffstat (limited to 'sys/kern/imgact_gzip.c')
-rw-r--r-- | sys/kern/imgact_gzip.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/imgact_gzip.c b/sys/kern/imgact_gzip.c index d44d49d..0b08204 100644 --- a/sys/kern/imgact_gzip.c +++ b/sys/kern/imgact_gzip.c @@ -238,7 +238,8 @@ do_aout_hdr(struct imgact_gzip * gz) &vmaddr, gz->a_out.a_text + gz->a_out.a_data, VM_PROT_ALL, VM_PROT_ALL, MAP_ANON | MAP_FIXED, - 0, + OBJT_DEFAULT, + NULL, 0); if (error) { @@ -311,7 +312,8 @@ NextByte(void *vp) VM_PROT_READ, /* protection */ VM_PROT_READ, /* max protection */ 0, /* flags */ - (caddr_t) igz->ip->vp, /* vnode */ + OBJT_VNODE, /* handle type */ + igz->ip->vp, /* vnode */ igz->offset); /* offset */ if (error) { igz->where = __LINE__; |