u_char -> vm_prot_t in a couple of places, NFC
The latter is a typedef of the former; the typedef exists and these bits are representing vmprot values, so use the correct type. Submitted by: sigsys@gmail.com MFC after: 3 days
This commit is contained in:
parent
144d6690b5
commit
0f5f49eff7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357899
@ -2898,7 +2898,7 @@ fget(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp)
|
||||
}
|
||||
|
||||
int
|
||||
fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp, u_char *maxprotp,
|
||||
fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp, vm_prot_t *maxprotp,
|
||||
struct file **fpp)
|
||||
{
|
||||
int error;
|
||||
|
@ -193,10 +193,10 @@ cap_check_failed_notcapable(const cap_rights_t *havep, const cap_rights_t *needp
|
||||
/*
|
||||
* Convert capability rights into VM access flags.
|
||||
*/
|
||||
u_char
|
||||
vm_prot_t
|
||||
cap_rights_to_vmprot(const cap_rights_t *havep)
|
||||
{
|
||||
u_char maxprot;
|
||||
vm_prot_t maxprot;
|
||||
|
||||
maxprot = VM_PROT_NONE;
|
||||
if (cap_rights_is_set(havep, CAP_MMAP_R))
|
||||
|
@ -514,7 +514,7 @@ int cap_check(const cap_rights_t *havep, const cap_rights_t *needp);
|
||||
/*
|
||||
* Convert capability rights into VM access flags.
|
||||
*/
|
||||
u_char cap_rights_to_vmprot(const cap_rights_t *havep);
|
||||
vm_prot_t cap_rights_to_vmprot(const cap_rights_t *havep);
|
||||
|
||||
/*
|
||||
* For the purposes of procstat(1) and similar tools, allow kern_descrip.c to
|
||||
|
@ -247,7 +247,7 @@ extern int maxfilesperproc; /* per process limit on number of open files */
|
||||
|
||||
int fget(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp);
|
||||
int fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp,
|
||||
u_char *maxprotp, struct file **fpp);
|
||||
vm_prot_t *maxprotp, struct file **fpp);
|
||||
int fget_read(struct thread *td, int fd, cap_rights_t *rightsp,
|
||||
struct file **fpp);
|
||||
int fget_write(struct thread *td, int fd, cap_rights_t *rightsp,
|
||||
|
Loading…
Reference in New Issue
Block a user