Rename paramctl to setgrant.
This commit is contained in:
@@ -49,7 +49,7 @@ libsys_FILES=" \
|
||||
sys_sigreturn.c \
|
||||
sys_sigsend.c \
|
||||
sys_privctl.c \
|
||||
sys_paramctl.c \
|
||||
sys_setgrant.c \
|
||||
sys_times.c \
|
||||
sys_trace.c \
|
||||
sys_umap.c \
|
||||
|
||||
@@ -35,7 +35,7 @@ cpf_preallocate(cp_grant_t *new_grants, int new_ngrants)
|
||||
}
|
||||
|
||||
/* Update kernel about the table. */
|
||||
if((s=sys_paramctl(SYS_PARAM_SET_GRANT, new_ngrants, new_grants, 0))) {
|
||||
if((s=sys_setgrant(new_grants, new_ngrants))) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ cpf_grow(void)
|
||||
new_grants[g].cp_flags = 0;
|
||||
|
||||
/* Inform kernel about new size (and possibly new location). */
|
||||
if((sys_paramctl(SYS_PARAM_SET_GRANT, new_size, new_grants, 0))) {
|
||||
if((sys_setgrant(new_grants, new_size))) {
|
||||
free(new_grants);
|
||||
return; /* Failed - don't grow then. */
|
||||
}
|
||||
|
||||
14
lib/syslib/sys_setgrant.c
Normal file
14
lib/syslib/sys_setgrant.c
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
#include "syslib.h"
|
||||
|
||||
#include <minix/safecopies.h>
|
||||
|
||||
int sys_setgrant(cp_grant_t *grants, int ngrants)
|
||||
{
|
||||
message m;
|
||||
|
||||
m.SG_ADDR = (char *) grants;
|
||||
m.SG_SIZE = ngrants;
|
||||
|
||||
return _taskcall(SYSTASK, SYS_SETGRANT, &m);
|
||||
}
|
||||
Reference in New Issue
Block a user