sysent
static struct sysent hello_sysent = {
.sv_table = sysent,
.sv_table = sysent,
struct sysent sysent[] = {
syscall_register(int *offset, struct sysent *new_sysent,
struct sysent *old_sysent)
if (sysent[i].sy_call == (sy_call_t *)sys_lkmnosys)
else if (sysent[*offset].sy_call != (sy_call_t *)sys_lkmnosys)
*old_sysent = sysent[*offset];
sysent[*offset] = *new_sysent;
syscall_deregister(int *offset, struct sysent *old_sysent)
sysent[*offset] = *old_sysent;
struct sysent *callp;
struct sysent *callp;
struct sysent *callp;
struct sysent *callp;
static struct sysent syscallname##_sysent = { \
int syscall_register (int *offset, struct sysent *new_sysent,
struct sysent *old_sysent);
int syscall_deregister (int *offset, struct sysent *old_sysent);
struct sysent *sv_table; /* pointer to sysent */
extern struct sysent sysent[];
struct sysent *new_sysent; /* new sysent */
struct sysent old_sysent; /* old sysent */
nfs_prev_nfssvc_sy_narg = sysent[SYS_nfssvc].sy_narg;
sysent[SYS_nfssvc].sy_narg = 2;
nfs_prev_nfssvc_sy_call = sysent[SYS_nfssvc].sy_call;
sysent[SYS_nfssvc].sy_call = (sy_call_t *)sys_nfssvc;
sysent[SYS_nfssvc].sy_narg = nfs_prev_nfssvc_sy_narg;
sysent[SYS_nfssvc].sy_call = nfs_prev_nfssvc_sy_call;