make sysent for r358172 ("vfs: add realpathat syscall")

This commit is contained in:
Mateusz Guzik 2020-02-20 16:58:57 +00:00
parent 0573d0a9b8
commit 65cdfb4caa
10 changed files with 95 additions and 3 deletions

View File

@ -500,4 +500,5 @@
#define FREEBSD32_SYS_shm_open2 571
#define FREEBSD32_SYS_shm_rename 572
#define FREEBSD32_SYS_sigfastblock 573
#define FREEBSD32_SYS_MAXSYSCALL 574
#define FREEBSD32_SYS___realpathat 574
#define FREEBSD32_SYS_MAXSYSCALL 575

View File

@ -610,4 +610,5 @@ const char *freebsd32_syscallnames[] = {
"shm_open2", /* 571 = shm_open2 */
"shm_rename", /* 572 = shm_rename */
"sigfastblock", /* 573 = sigfastblock */
"__realpathat", /* 574 = __realpathat */
};

View File

@ -663,4 +663,5 @@ struct sysent freebsd32_sysent[] = {
{ AS(shm_open2_args), (sy_call_t *)sys_shm_open2, AUE_SHMOPEN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 571 = shm_open2 */
{ AS(shm_rename_args), (sy_call_t *)sys_shm_rename, AUE_SHMRENAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 572 = shm_rename */
{ AS(sigfastblock_args), (sy_call_t *)sys_sigfastblock, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 573 = sigfastblock */
{ AS(__realpathat_args), (sy_call_t *)sys___realpathat, AUE_REALPATHAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 574 = __realpathat */
};

View File

@ -3363,6 +3363,17 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
*n_args = 2;
break;
}
/* __realpathat */
case 574: {
struct __realpathat_args *p = params;
iarg[0] = p->fd; /* int */
uarg[1] = (intptr_t) p->path; /* const char * */
uarg[2] = (intptr_t) p->buf; /* char * */
uarg[3] = p->size; /* size_t */
iarg[4] = p->flags; /* int */
*n_args = 5;
break;
}
default:
*n_args = 0;
break;
@ -9062,6 +9073,28 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
/* __realpathat */
case 574:
switch(ndx) {
case 0:
p = "int";
break;
case 1:
p = "userland const char *";
break;
case 2:
p = "userland char *";
break;
case 3:
p = "size_t";
break;
case 4:
p = "int";
break;
default:
break;
};
break;
default:
break;
};
@ -10956,6 +10989,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "int";
break;
/* __realpathat */
case 574:
if (ndx == 0 || ndx == 1)
p = "int";
break;
default:
break;
};

View File

@ -629,4 +629,5 @@ struct sysent sysent[] = {
{ AS(shm_open2_args), (sy_call_t *)sys_shm_open2, AUE_SHMOPEN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 571 = shm_open2 */
{ AS(shm_rename_args), (sy_call_t *)sys_shm_rename, AUE_SHMRENAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 572 = shm_rename */
{ AS(sigfastblock_args), (sy_call_t *)sys_sigfastblock, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 573 = sigfastblock */
{ AS(__realpathat_args), (sy_call_t *)sys___realpathat, AUE_REALPATHAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 574 = __realpathat */
};

View File

@ -580,4 +580,5 @@ const char *syscallnames[] = {
"shm_open2", /* 571 = shm_open2 */
"shm_rename", /* 572 = shm_rename */
"sigfastblock", /* 573 = sigfastblock */
"__realpathat", /* 574 = __realpathat */
};

View File

@ -3355,6 +3355,17 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
*n_args = 2;
break;
}
/* __realpathat */
case 574: {
struct __realpathat_args *p = params;
iarg[0] = p->fd; /* int */
uarg[1] = (intptr_t) p->path; /* const char * */
uarg[2] = (intptr_t) p->buf; /* char * */
uarg[3] = p->size; /* size_t */
iarg[4] = p->flags; /* int */
*n_args = 5;
break;
}
default:
*n_args = 0;
break;
@ -8967,6 +8978,28 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
/* __realpathat */
case 574:
switch(ndx) {
case 0:
p = "int";
break;
case 1:
p = "userland const char *";
break;
case 2:
p = "userland char *";
break;
case 3:
p = "size_t";
break;
case 4:
p = "int";
break;
default:
break;
};
break;
default:
break;
};
@ -10888,6 +10921,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "int";
break;
/* __realpathat */
case 574:
if (ndx == 0 || ndx == 1)
p = "int";
break;
default:
break;
};

View File

@ -509,4 +509,5 @@
#define SYS_shm_open2 571
#define SYS_shm_rename 572
#define SYS_sigfastblock 573
#define SYS_MAXSYSCALL 574
#define SYS___realpathat 574
#define SYS_MAXSYSCALL 575

View File

@ -414,4 +414,5 @@ MIASM = \
__sysctlbyname.o \
shm_open2.o \
shm_rename.o \
sigfastblock.o
sigfastblock.o \
__realpathat.o

View File

@ -1823,6 +1823,13 @@ struct sigfastblock_args {
char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)];
char ptr_l_[PADL_(uint32_t *)]; uint32_t * ptr; char ptr_r_[PADR_(uint32_t *)];
};
struct __realpathat_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)];
char size_l_[PADL_(size_t)]; size_t size; char size_r_[PADR_(size_t)];
char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
};
int nosys(struct thread *, struct nosys_args *);
void sys_sys_exit(struct thread *, struct sys_exit_args *);
int sys_fork(struct thread *, struct fork_args *);
@ -2212,6 +2219,7 @@ int sys___sysctlbyname(struct thread *, struct __sysctlbyname_args *);
int sys_shm_open2(struct thread *, struct shm_open2_args *);
int sys_shm_rename(struct thread *, struct shm_rename_args *);
int sys_sigfastblock(struct thread *, struct sigfastblock_args *);
int sys___realpathat(struct thread *, struct __realpathat_args *);
#ifdef COMPAT_43
@ -3136,6 +3144,7 @@ int freebsd12_shm_open(struct thread *, struct freebsd12_shm_open_args *);
#define SYS_AUE_shm_open2 AUE_SHMOPEN
#define SYS_AUE_shm_rename AUE_SHMRENAME
#define SYS_AUE_sigfastblock AUE_NULL
#define SYS_AUE___realpathat AUE_REALPATHAT
#undef PAD_
#undef PADL_