diff --git a/sys/include/sys/sysproto_posix.h b/sys/include/sys/sysproto_posix.h index 36a0afa..f0f92a5 100644 --- a/sys/include/sys/sysproto_posix.h +++ b/sys/include/sys/sysproto_posix.h @@ -64,8 +64,8 @@ int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(const void *)]; - const void * buf; - char buf_r_[PADR_(const void *)]; + const void *buf; + char buf_r_[PADR_(const void*)]; char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; @@ -77,8 +77,8 @@ char fd_r_[PADR_(int)]; char buf_l_[PADL_(const void *)]; - const void * buf; - char buf_r_[PADR_(const void *)]; + const void *buf; + char buf_r_[PADR_(const void*)]; char nbyte_l_[PADL_(size_t)]; size_t nbyte; @@ -88,7 +88,7 @@ struct sys_open_args { char path_l_[PADL_(char *)]; char *path; - char path_r_[PADR_(char *)]; + char path_r_[PADR_(char*)]; char flags_l_[PADL_(int)]; int flags; @@ -112,7 +112,7 @@ char status_l_[PADL_(int *)]; int *status; - char status_r_[PADR_(int *)]; + char status_r_[PADR_(int*)]; char options_l_[PADL_(int)]; int options; @@ -120,19 +120,19 @@ char rusage_l_[PADL_(void *)]; void *rusage; - char rusage_r_[PADR_(void *)]; + char rusage_r_[PADR_(void*)]; }; struct sys_chdir_args { char path_l_[PADL_(char *)]; char *path; - char path_r_[PADR_(char *)]; + char path_r_[PADR_(char*)]; }; struct sys_getcwd_args { char buf_l_[PADL_(const void *)]; void *buf; - char buf_r_[PADR_(const void *)]; + char buf_r_[PADR_(const void*)]; char size_l_[PADL_(uint32_t)]; uint32_t size; @@ -154,31 +154,31 @@ struct sys_execve_args { char fname_l_[PADL_(char *)]; char *fname; - char fname_r_[PADR_(char *)]; + char fname_r_[PADR_(char*)]; char argv_l_[PADL_(char **)]; char **argv; - char argv_r_[PADR_(char **)]; + char argv_r_[PADR_(char**)]; char envp_l_[PADL_(char **)]; char **envp; - char envp_r_[PADR_(char **)]; + char envp_r_[PADR_(char**)]; }; struct sys_fopen_args { char path_l_[PADL_(char *)]; - char * path; - char path_r_[PADR_(char *)]; + char *path; + char path_r_[PADR_(char*)]; char mode_l_[PADL_(char *)]; - char * mode; - char mode_r_[PADR_(char *)]; + char *mode; + char mode_r_[PADR_(char*)]; char FILE_l_[PADL_(userFileDescriptor *)]; userFileDescriptor *FILE; - char FILE_r_[PADR_(userFileDescriptor *)]; + char FILE_r_[PADR_(userFileDescriptor*)]; }; struct sys_fread_args { char ptr_l_[PADL_(void *)]; void *ptr; - char ptr_r_[PADR_(void *)]; + char ptr_r_[PADR_(void*)]; char size_l_[PADL_(long)]; long size; char size_r_[PADR_(long)]; @@ -187,25 +187,25 @@ char nmemb_r_[PADR_(long)]; char FILE_l_[PADL_(userFileDescriptor *)]; userFileDescriptor *FILE; - char FILE_r_[PADR_(userFileDescriptor *)]; + char FILE_r_[PADR_(userFileDescriptor*)]; }; struct sys_fclose_args { char FILE_l_[PADL_(userFileDescriptor *)]; userFileDescriptor *FILE; - char FILE_r_[PADR_(userFileDescriptor *)]; + char FILE_r_[PADR_(userFileDescriptor*)]; }; struct sys_fgetc_args { char FILE_l_[PADL_(userFileDescriptor *)]; userFileDescriptor *FILE; - char FILE_r_[PADR_(userFileDescriptor *)]; + char FILE_r_[PADR_(userFileDescriptor*)]; }; struct sys_fseek_args { char FILE_l_[PADL_(userFileDescriptor *)]; userFileDescriptor *FILE; - char FILE_r_[PADR_(userFileDescriptor *)]; + char FILE_r_[PADR_(userFileDescriptor*)]; char offset_l_[PADL_(off_t)]; off_t offset; char offset_r_[PADR_(off_t)]; @@ -229,19 +229,19 @@ struct sys_sysctl_args { char name_l_[PADL_(int *)]; int *name; - char name_r_[PADR_(int *)]; + char name_r_[PADR_(int*)]; char namelen_l_[PADL_(u_int)]; u_int namelen; char namelen_r_[PADR_(u_int)]; char oldp_l_[PADL_(void *)]; void *oldp; - char oldp_r_[PADR_(void *)]; + char oldp_r_[PADR_(void*)]; char oldlenp_l_[PADL_(size_t *)]; size_t *oldlenp; - char oldlenp_r_[PADR_(size_t *)]; + char oldlenp_r_[PADR_(size_t*)]; char newp_l_[PADL_(void *)]; void *newp; - char newp_r_[PADR_(void *)]; + char newp_r_[PADR_(void*)]; char newlenp_l_[PADL_(size_t)]; size_t newlenp; char newlenp_r_[PADR_(size_t)]; @@ -268,17 +268,17 @@ u_int which; char which_r_[PADR_(u_int)]; char itv_l_[PADL_(struct itimerval *)]; - struct itimerval * itv; - char itv_r_[PADR_(struct itimerval *)]; + struct itimerval *itv; + char itv_r_[PADR_(struct itimerval*)]; char oitv_l_[PADL_(struct itimerval *)]; - struct itimerval * oitv; - char oitv_r_[PADR_(struct itimerval *)]; + struct itimerval *oitv; + char oitv_r_[PADR_(struct itimerval*)]; }; struct access_args { char path_l_[PADL_(char *)]; - char * path; - char path_r_[PADR_(char *)]; + char *path; + char path_r_[PADR_(char*)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; @@ -289,14 +289,14 @@ int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(struct statfs *)]; - struct statfs * buf; - char buf_r_[PADR_(struct statfs *)]; + struct statfs *buf; + char buf_r_[PADR_(struct statfs*)]; }; struct mprotect_args { char addr_l_[PADL_(const void *)]; - const void * addr; - char addr_r_[PADR_(const void *)]; + const void *addr; + char addr_r_[PADR_(const void*)]; char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; @@ -309,20 +309,20 @@ struct sysctl_args { char name_l_[PADL_(int *)]; - int * name; - char name_r_[PADR_(int *)]; + int *name; + char name_r_[PADR_(int*)]; char namelen_l_[PADL_(u_int)]; u_int namelen; char namelen_r_[PADR_(u_int)]; char old_l_[PADL_(void *)]; void *oldp; - char old_r_[PADR_(void *)]; + char old_r_[PADR_(void*)]; char oldlenp_l_[PADL_(size_t *)]; - size_t * oldlenp; - char oldlenp_r_[PADR_(size_t *)]; + size_t *oldlenp; + char oldlenp_r_[PADR_(size_t*)]; char new_l_[PADL_(void *)]; - void * newp; - char new_r_[PADR_(void *)]; + void *newp; + char new_r_[PADR_(void*)]; char newlen_l_[PADL_(size_t)]; size_t newlen; char newlen_r_[PADR_(size_t)]; @@ -352,11 +352,11 @@ struct readlink_args { char path_l_[PADL_(char *)]; - char * path; - char path_r_[PADR_(char *)]; + char *path; + char path_r_[PADR_(char*)]; char buf_l_[PADL_(char *)]; - char * buf; - char buf_r_[PADR_(char *)]; + char *buf; + char buf_r_[PADR_(char*)]; char count_l_[PADL_(int)]; int count; char count_r_[PADR_(int)]; @@ -398,26 +398,26 @@ struct sys_stat_args { char path_l_[PADL_(char *)]; - char * path; - char path_r_[PADR_(char *)]; + char *path; + char path_r_[PADR_(char*)]; char ub_l_[PADL_(struct stat *)]; - struct stat * ub; - char ub_r_[PADR_(struct stat *)]; + struct stat *ub; + char ub_r_[PADR_(struct stat*)]; }; struct sys_lstat_args { char path_l_[PADL_(char *)]; char *path; - char path_r_[PADR_(char *)]; + char path_r_[PADR_(char*)]; char sb_l_[PADL_(struct stat *)]; struct stat *sb; - char sb_r_[PADR_(struct stat *)]; + char sb_r_[PADR_(struct stat*)]; }; struct obreak_args { char nsize_l_[PADL_(char *)]; - char * nsize; - char nsize_r_[PADR_(char *)]; + char *nsize; + char nsize_r_[PADR_(char*)]; }; struct sigaction_args { @@ -425,11 +425,11 @@ int sig; char sig_r_[PADR_(int)]; char act_l_[PADL_(const struct sigaction *)]; - const struct sigaction * act; - char act_r_[PADR_(const struct sigaction *)]; + const struct sigaction *act; + char act_r_[PADR_(const struct sigaction*)]; char oact_l_[PADL_(struct sigaction *)]; - struct sigaction * oact; - char oact_r_[PADR_(struct sigaction *)]; + struct sigaction *oact; + char oact_r_[PADR_(struct sigaction*)]; }; struct getdtablesize_args { @@ -438,8 +438,8 @@ struct sys_munmap_args { char addr_l_[PADL_(void *)]; - void * addr; - char addr_r_[PADR_(void *)]; + void *addr; + char addr_r_[PADR_(void*)]; char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; @@ -450,27 +450,27 @@ int how; char how_r_[PADR_(int)]; char set_l_[PADL_(const sigset_t *)]; - const sigset_t * set; - char set_r_[PADR_(const sigset_t *)]; + const sigset_t *set; + char set_r_[PADR_(const sigset_t*)]; char oset_l_[PADL_(sigset_t *)]; - sigset_t * oset; - char oset_r_[PADR_(sigset_t *)]; + sigset_t *oset; + char oset_r_[PADR_(sigset_t*)]; }; struct gettimeofday_args { char tp_l_[PADL_(struct timeval *)]; - struct timeval * tp; - char tp_r_[PADR_(struct timeval *)]; + struct timeval *tp; + char tp_r_[PADR_(struct timeval*)]; char tzp_l_[PADL_(struct timezone *)]; - struct timezone * tzp; - char tzp_r_[PADR_(struct timezone *)]; + struct timezone *tzp; + char tzp_r_[PADR_(struct timezone*)]; }; struct sys_fstat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char sb_l_[PADL_(struct stat *)]; - struct stat * sb; - char sb_r_[PADR_(struct stat *)]; + struct stat *sb; + char sb_r_[PADR_(struct stat*)]; }; struct ioctl_args { char fd_l_[PADL_(int)]; @@ -489,8 +489,8 @@ int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(void *)]; - void * buf; - char buf_r_[PADR_(void *)]; + void *buf; + char buf_r_[PADR_(void*)]; char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; @@ -501,8 +501,8 @@ int fd; char fd_r_[PADR_(int)]; char path_l_[PADL_(char *)]; - char * path; - char path_r_[PADR_(char *)]; + char *path; + char path_r_[PADR_(char*)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; @@ -516,8 +516,8 @@ int op; char op_r_[PADR_(int)]; char parms_l_[PADL_(char *)]; - char * parms; - char parms_r_[PADR_(char *)]; + char *parms; + char parms_r_[PADR_(char*)]; }; struct sys_getpid_args { @@ -553,11 +553,11 @@ int how; char how_r_[PADR_(int)]; char set_l_[PADL_(const sigset_t *)]; - const sigset_t * set; - char set_r_[PADR_(const sigset_t *)]; + const sigset_t *set; + char set_r_[PADR_(const sigset_t*)]; char oset_l_[PADL_(sigset_t *)]; - sigset_t * oset; - char oset_r_[PADR_(sigset_t *)]; + sigset_t *oset; + char oset_r_[PADR_(sigset_t*)]; }; struct sys_sigaction_args { @@ -565,11 +565,11 @@ int sig; char sig_r_[PADR_(int)]; char act_l_[PADL_(const struct sigaction *)]; - const struct sigaction * act; - char act_r_[PADR_(const struct sigaction *)]; + const struct sigaction *act; + char act_r_[PADR_(const struct sigaction*)]; char oact_l_[PADL_(struct sigaction *)]; - struct sigaction * oact; - char oact_r_[PADR_(struct sigaction *)]; + struct sigaction *oact; + char oact_r_[PADR_(struct sigaction*)]; }; struct sys_getpgrp_args { @@ -586,8 +586,8 @@ struct sys_access_args { char path_l_[PADL_(char *)]; - char * path; - char path_r_[PADR_(char *)]; + char *path; + char path_r_[PADR_(char*)]; char amode_l_[PADL_(int)]; int amode; char amode_r_[PADR_(int)]; @@ -595,11 +595,11 @@ struct sys_statfs_args { char path_l_[PADL_(char *)]; - char * path; - char path_r_[PADR_(char *)]; + char *path; + char path_r_[PADR_(char*)]; char buf_l_[PADL_(struct statfs *)]; - struct statfs * buf; - char buf_r_[PADR_(struct statfs *)]; + struct statfs *buf; + char buf_r_[PADR_(struct statfs*)]; }; struct sys_fstatat_args { @@ -607,11 +607,11 @@ int fd; char fd_r_[PADR_(int)]; char path_l_[PADL_(char *)]; - char * path; - char path_r_[PADR_(char *)]; + char *path; + char path_r_[PADR_(char*)]; char buf_l_[PADL_(struct stat *)]; - struct stat * buf; - char buf_r_[PADR_(struct stat *)]; + struct stat *buf; + char buf_r_[PADR_(struct stat*)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; @@ -628,14 +628,14 @@ int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(char *)]; - char * buf; - char buf_r_[PADR_(char *)]; + char *buf; + char buf_r_[PADR_(char*)]; char count_l_[PADL_(u_int)]; u_int count; char count_r_[PADR_(u_int)]; char basep_l_[PADL_(long *)]; - long * basep; - char basep_r_[PADR_(long *)]; + long *basep; + char basep_r_[PADR_(long*)]; }; struct sys_socket_args { @@ -673,26 +673,26 @@ int nd; char nd_r_[PADR_(int)]; char in_l_[PADL_(fd_set *)]; - fd_set * in; - char in_r_[PADR_(fd_set *)]; + fd_set *in; + char in_r_[PADR_(fd_set*)]; char ou_l_[PADL_(fd_set *)]; - fd_set * ou; - char ou_r_[PADR_(fd_set *)]; + fd_set *ou; + char ou_r_[PADR_(fd_set*)]; char ex_l_[PADL_(fd_set *)]; - fd_set * ex; - char ex_r_[PADR_(fd_set *)]; + fd_set *ex; + char ex_r_[PADR_(fd_set*)]; char tv_l_[PADL_(struct timeval *)]; - struct timeval * tv; - char tv_r_[PADR_(struct timeval *)]; + struct timeval *tv; + char tv_r_[PADR_(struct timeval*)]; }; struct sys_gettimeofday_args { char tp_l_[PADL_(struct timeval *)]; - struct timeval * tp; - char tp_r_[PADR_(struct timeval *)]; + struct timeval *tp; + char tp_r_[PADR_(struct timeval*)]; char tzp_l_[PADL_(struct timezone *)]; - struct timezone * tzp; - char tzp_r_[PADR_(struct timezone *)]; + struct timezone *tzp; + char tzp_r_[PADR_(struct timezone*)]; }; struct sys_sendto_args { @@ -718,11 +718,11 @@ struct sys_rename_args { char from_l_[PADL_(char *)]; - char * from; - char from_r_[PADR_(char *)]; + char *from; + char from_r_[PADR_(char*)]; char to_l_[PADL_(char *)]; - char * to; - char to_r_[PADR_(char *)]; + char *to; + char to_r_[PADR_(char*)]; }; struct sys_pread_args { @@ -730,8 +730,8 @@ int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(void *)]; - void * buf; - char buf_r_[PADR_(void *)]; + void *buf; + char buf_r_[PADR_(void*)]; char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; @@ -742,70 +742,69 @@ struct sys_readlink_args { char path_l_[PADL_(char *)]; - char * path; - char path_r_[PADR_(char *)]; + char *path; + char path_r_[PADR_(char*)]; char buf_l_[PADL_(char *)]; - char * buf; - char buf_r_[PADR_(char *)]; + char *buf; + char buf_r_[PADR_(char*)]; char count_l_[PADL_(size_t)]; size_t count; char count_r_[PADR_(size_t)]; }; -int sys_readlink(struct thread *, struct sys_readlink_args *); +int sys_readlink(struct thread*, struct sys_readlink_args*); struct sys_pipe2_args { char fildes_l_[PADL_(int *)]; - int * fildes; - char fildes_r_[PADR_(int *)]; + int *fildes; + char fildes_r_[PADR_(int*)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; -int sys_pipe2(struct thread *, struct sys_pipe2_args *); +int sys_pipe2(struct thread*, struct sys_pipe2_args*); struct sys_getlogin_args { char namebuf_l_[PADL_(char *)]; - char * namebuf; - char namebuf_r_[PADR_(char *)]; + char *namebuf; + char namebuf_r_[PADR_(char*)]; char namelen_l_[PADL_(u_int)]; u_int namelen; char namelen_r_[PADR_(u_int)]; }; -int sys_getlogin(struct thread *, struct sys_getlogin_args *); +int sys_getlogin(struct thread*, struct sys_getlogin_args*); struct sys_setlogin_args { char namebuf_l_[PADL_(char *)]; - char * namebuf; - char namebuf_r_[PADR_(char *)]; + char *namebuf; + char namebuf_r_[PADR_(char*)]; }; -int sys_setlogin(struct thread *, struct sys_setlogin_args *); - +int sys_setlogin(struct thread*, struct sys_setlogin_args*); struct sys_getrlimit_args { char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; char rlp_l_[PADL_(struct rlimit *)]; - struct rlimit * rlp; - char rlp_r_[PADR_(struct rlimit *)]; + struct rlimit *rlp; + char rlp_r_[PADR_(struct rlimit*)]; }; -int sys_getrlimit(struct thread *, struct sys_getrlimit_args *); +int sys_getrlimit(struct thread*, struct sys_getrlimit_args*); struct sys_setrlimit_args { char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; char rlp_l_[PADL_(struct rlimit *)]; - struct rlimit * rlp; - char rlp_r_[PADR_(struct rlimit *)]; + struct rlimit *rlp; + char rlp_r_[PADR_(struct rlimit*)]; }; -int sys_setrlimit(struct thread *, struct sys_setrlimit_args *); +int sys_setrlimit(struct thread*, struct sys_setrlimit_args*); struct sys_dup2_args { char from_l_[PADL_(u_int)]; @@ -818,40 +817,48 @@ int sys_dup2(struct thread*, struct sys_dup2_args*); +struct sys_unlink_args { + char path_l_[PADL_(char *)]; + char *path; + char path_r_[PADR_(char*)]; +}; + +int sys_unlink(struct thread*, struct sys_unlink_args*); + //Func Defs -int sys_invalid(struct thread *, void *); -int sys_exit(struct thread *, struct sys_exit_args *); -int sys_fork(struct thread *, struct sys_fork_args *); -int sys_read(struct thread *, struct sys_read_args *); -int sys_write(struct thread *td, struct sys_write_args *); -int sys_open(struct thread *td, struct sys_open_args *); -int sys_close(struct thread *td, struct sys_close_args *); -int sys_wait4(struct thread *td, struct sys_wait4_args *); -int sys_chdir(struct thread *td, struct sys_chdir_args *); +int sys_invalid(struct thread*, void*); +int sys_exit(struct thread*, struct sys_exit_args*); +int sys_fork(struct thread*, struct sys_fork_args*); +int sys_read(struct thread*, struct sys_read_args*); +int sys_write(struct thread *td, struct sys_write_args*); +int sys_open(struct thread *td, struct sys_open_args*); +int sys_close(struct thread *td, struct sys_close_args*); +int sys_wait4(struct thread *td, struct sys_wait4_args*); +int sys_chdir(struct thread *td, struct sys_chdir_args*); -int sys_setUID(struct thread *td, struct sys_setUID_args *); -int sys_getUID(struct thread *td, void *); -int sys_setGID(struct thread *td, struct sys_setGID_args *); -int sys_getGID(struct thread *td, void *); +int sys_setUID(struct thread *td, struct sys_setUID_args*); +int sys_getUID(struct thread *td, void*); +int sys_setGID(struct thread *td, struct sys_setGID_args*); +int sys_getGID(struct thread *td, void*); -int sys_execve(struct thread *td, struct sys_execve_args *); +int sys_execve(struct thread *td, struct sys_execve_args*); -int sys_fopen(struct thread *td, struct sys_fopen_args *); -int sys_fread(struct thread *td, struct sys_fread_args *); -int sys_fclose(struct thread *td, struct sys_fclose_args *); -int sys_fgetc(struct thread *td, struct sys_fgetc_args *); -int sys_fseek(struct thread *td, struct sys_fseek_args *); -int sys_lseek(struct thread *td, struct sys_lseek_args *); +int sys_fopen(struct thread *td, struct sys_fopen_args*); +int sys_fread(struct thread *td, struct sys_fread_args*); +int sys_fclose(struct thread *td, struct sys_fclose_args*); +int sys_fgetc(struct thread *td, struct sys_fgetc_args*); +int sys_fseek(struct thread *td, struct sys_fseek_args*); +int sys_lseek(struct thread *td, struct sys_lseek_args*); -int sys_sched_yield(struct thread *td, void *); +int sys_sched_yield(struct thread *td, void*); -int sys_getcwd(struct thread *td, struct sys_getcwd_args *); +int sys_getcwd(struct thread *td, struct sys_getcwd_args*); -int sys_mmap(struct thread *td, struct sys_mmap_args *); -int sys_munmap(struct thread *td, struct sys_munmap_args *); -int sys_sysctl(struct thread *td, struct sys_sysctl_args *); +int sys_mmap(struct thread *td, struct sys_mmap_args*); +int sys_munmap(struct thread *td, struct sys_munmap_args*); +int sys_sysctl(struct thread *td, struct sys_sysctl_args*); -int sys_issetugid(struct thread *td, struct sys_issetugid_args *); +int sys_issetugid(struct thread *td, struct sys_issetugid_args*); int setitimer(struct thread *td, struct setitimer_args *uap); int access(struct thread *td, struct access_args *uap); @@ -859,50 +866,48 @@ int mprotect(struct thread *td, struct mprotect_args *uap); int sys_statfs(struct thread *td, struct sys_statfs_args *args); -int sys_fstatfs(struct thread *td, struct sys_fstatfs_args *); -int sys_stat(struct thread *td, struct sys_stat_args *); -int sys_lstat(struct thread *td, struct sys_lstat_args *); -int sys_fstat(struct thread *td, struct sys_fstat_args *); -int sys_fstatat(struct thread *td, struct sys_fstatat_args *); -int sys_openat(struct thread *td, struct sys_openat_args *); +int sys_fstatfs(struct thread *td, struct sys_fstatfs_args*); +int sys_stat(struct thread *td, struct sys_stat_args*); +int sys_lstat(struct thread *td, struct sys_lstat_args*); +int sys_fstat(struct thread *td, struct sys_fstat_args*); +int sys_fstatat(struct thread *td, struct sys_fstatat_args*); +int sys_openat(struct thread *td, struct sys_openat_args*); -int sys_sysarch(struct thread *td, struct sys_sysarch_args *); -int sys_getpid(struct thread *td, struct sys_getpid_args *); -int sys_ioctl(struct thread *td, struct sys_ioctl_args *); +int sys_sysarch(struct thread *td, struct sys_sysarch_args*); +int sys_getpid(struct thread *td, struct sys_getpid_args*); +int sys_ioctl(struct thread *td, struct sys_ioctl_args*); -int sys_geteuid(struct thread *td, struct sys_geteuid_args *); +int sys_geteuid(struct thread *td, struct sys_geteuid_args*); -int sys_getegid(struct thread *td, struct sys_getegid_args *); +int sys_getegid(struct thread *td, struct sys_getegid_args*); -int sys_getppid(struct thread *td, struct sys_getppid_args *); +int sys_getppid(struct thread *td, struct sys_getppid_args*); -int sys_getpgrp(struct thread *td, struct sys_getpgrp_args *); -int sys_setpgrp(struct thread *td, struct sys_setpgid_args *); +int sys_getpgrp(struct thread *td, struct sys_getpgrp_args*); +int sys_setpgrp(struct thread *td, struct sys_setpgid_args*); -int sys_sigprocmask(struct thread *td, struct sys_sigprocmask_args *); -int sys_sigaction(struct thread *td, struct sys_sigaction_args *); +int sys_sigprocmask(struct thread *td, struct sys_sigprocmask_args*); +int sys_sigaction(struct thread *td, struct sys_sigaction_args*); -int sys_getpgrp(struct thread *td, struct sys_getpgrp_args *); -int sys_setpgid(struct thread *td, struct sys_setpgid_args *); +int sys_getpgrp(struct thread *td, struct sys_getpgrp_args*); +int sys_setpgid(struct thread *td, struct sys_setpgid_args*); -int sys_access(struct thread *td, struct sys_access_args *); -int sys_fchdir(struct thread *td, struct sys_fchdir_args *); +int sys_access(struct thread *td, struct sys_access_args*); +int sys_fchdir(struct thread *td, struct sys_fchdir_args*); -int sys_getdirentries(struct thread *td, struct sys_getdirentries_args *); +int sys_getdirentries(struct thread *td, struct sys_getdirentries_args*); -int sys_socket(struct thread *td, struct sys_socket_args *); -int sys_setsockopt(struct thread *td, struct sys_setsockopt_args *); -int sys_select(struct thread *td, struct sys_select_args *); +int sys_socket(struct thread *td, struct sys_socket_args*); +int sys_setsockopt(struct thread *td, struct sys_setsockopt_args*); +int sys_select(struct thread *td, struct sys_select_args*); -int sys_rename(struct thread *td, struct sys_rename_args *); +int sys_rename(struct thread *td, struct sys_rename_args*); -int sys_fcntl(struct thread *td, struct sys_fcntl_args *); +int sys_fcntl(struct thread *td, struct sys_fcntl_args*); -int sys_gettimeofday(struct thread *td, struct sys_gettimeofday_args *); -int sys_sendto(struct thread *td, struct sys_sendto_args *); +int sys_gettimeofday(struct thread *td, struct sys_gettimeofday_args*); +int sys_sendto(struct thread *td, struct sys_sendto_args*); -int sys_pread(struct thread *td, struct sys_pread_args *); - - +int sys_pread(struct thread *td, struct sys_pread_args*); #endif /* END _SYS_SYSPROTO_POSIX_H_ */ diff --git a/sys/kernel/syscalls_posix.c b/sys/kernel/syscalls_posix.c index 3fdda5d..cd6906e 100644 --- a/sys/kernel/syscalls_posix.c +++ b/sys/kernel/syscalls_posix.c @@ -39,37 +39,37 @@ { ARG_COUNT(sys_exit_args), "exit", - (sys_call_t *) sys_exit, + (sys_call_t*) sys_exit, SYSCALL_VALID }, /* 1 */ { ARG_COUNT(sys_fork_args), "fork", - (sys_call_t *) sys_fork, + (sys_call_t*) sys_fork, SYSCALL_VALID }, /* 2 */ { ARG_COUNT(sys_read_args), "read", - (sys_call_t *) sys_read, + (sys_call_t*) sys_read, SYSCALL_VALID }, /* 3 */ { ARG_COUNT(sys_write_args), "write", - (sys_call_t *) sys_write, + (sys_call_t*) sys_write, SYSCALL_VALID }, /* 4 */ { ARG_COUNT(sys_open_args), "open", - (sys_call_t *) sys_open, + (sys_call_t*) sys_open, SYSCALL_VALID }, /* 5 */ { ARG_COUNT(sys_close_args), "close", - (sys_call_t *) sys_close, + (sys_call_t*) sys_close, SYSCALL_VALID }, /* 6 */ { ARG_COUNT(sys_wait4_args), "wiat4", - (sys_call_t *) sys_wait4, + (sys_call_t*) sys_wait4, SYSCALL_VALID }, /* 7 */ { 0, @@ -82,10 +82,10 @@ sys_invalid, SYSCALL_NOTIMP }, /* 9 */ { - 0, + ARG_COUNT(sys_unlink_args), "unlink", - sys_invalid, - SYSCALL_NOTIMP }, /* 10 */ + sys_unlink, + SYSCALL_VALID }, /* 10 */ { 0, "No Call", @@ -94,7 +94,7 @@ { ARG_COUNT(sys_chdir_args), "cgdur", - (sys_call_t *) sys_chdir, + (sys_call_t*) sys_chdir, SYSCALL_VALID }, /* 12 */ { ARG_COUNT(sys_fchdir_args), @@ -149,7 +149,7 @@ { ARG_COUNT(sys_setUID_args), "setuid", - (sys_call_t *) sys_setUID, + (sys_call_t*) sys_setUID, SYSCALL_VALID }, // 23 - setUID { 0, @@ -329,7 +329,7 @@ { ARG_COUNT(sys_execve_args), "execve", - (sys_call_t *) sys_execve, + (sys_call_t*) sys_execve, SYSCALL_VALID }, // 59 - execv { 0, @@ -474,7 +474,7 @@ { 0, "Get Free Page", - (sys_call_t *) sysGetFreePage, + (sys_call_t*) sysGetFreePage, SYSCALL_VALID }, /* 88 - getFreePage TEMP OLD sethostname */ { 0, @@ -485,7 +485,7 @@ ARG_COUNT(sys_dup2_args), "dup2", sys_dup2, - SYSCALL_VALID }, /* 90 - dup2 */ + SYSCALL_VALID }, /* 90 - dup2 */ { 0, "getdopt", @@ -939,7 +939,7 @@ { ARG_COUNT(sys_setGID_args), "setgid", - (sys_call_t *) sys_setGID, + (sys_call_t*) sys_setGID, SYSCALL_VALID }, /* 181 - setgid */ { 0, @@ -974,17 +974,17 @@ { ARG_COUNT(sys_stat_args), "stat", - (sys_call_t *) sys_stat, + (sys_call_t*) sys_stat, SYSCALL_VALID }, /* 188 - sys_stat */ { ARG_COUNT(sys_fstat_args), "fstat", - (sys_call_t *) sys_fstat, + (sys_call_t*) sys_fstat, SYSCALL_VALID }, /* 189 - sys_fstat */ { ARG_COUNT(sys_lstat_args), "lstat", - (sys_call_t *) sys_lstat, + (sys_call_t*) sys_lstat, SYSCALL_VALID }, /* 190 - sys_lstat */ { 0, @@ -1019,7 +1019,7 @@ { ARG_COUNT(sys_mmap_args), "old mmap", - (sys_call_t *) sys_mmap, + (sys_call_t*) sys_mmap, SYSCALL_INVALID }, /* 197 - sys_mmap */ { 0, @@ -1044,7 +1044,7 @@ { ARG_COUNT(sys_sysctl_args), "__sysctl", - (sys_call_t *) sys_sysctl, + (sys_call_t*) sys_sysctl, SYSCALL_VALID }, /* 202 - sys_sysctl */ { 0, @@ -1299,7 +1299,7 @@ { ARG_COUNT(sys_issetugid_args), "issetugid", - (sys_call_t *) sys_issetugid, + (sys_call_t*) sys_issetugid, SYSCALL_VALID }, /* 253 - Invalid */ { 0, @@ -1504,27 +1504,27 @@ { ARG_COUNT(sys_fseek_args), "feek", - (sys_call_t *) sys_fseek, + (sys_call_t*) sys_fseek, SYSCALL_VALID }, /* XXX - Wrong Spot 294 - fseek */ { ARG_COUNT(sys_fgetc_args), "fgetc", - (sys_call_t *) sys_fgetc, + (sys_call_t*) sys_fgetc, SYSCALL_VALID }, /* XXX - Wrong Spot 295 - fgetc */ { ARG_COUNT(sys_fclose_args), "flose", - (sys_call_t *) sys_fclose, + (sys_call_t*) sys_fclose, SYSCALL_VALID }, /* XXX - Wrong Spot 296 - fclose */ { ARG_COUNT(sys_fread_args), "fread", - (sys_call_t *) sys_fread, + (sys_call_t*) sys_fread, SYSCALL_VALID }, /* XXX - Wrong Spot 297 - fread */ { ARG_COUNT(sys_fopen_args), "fopen", - (sys_call_t *) sys_fopen, + (sys_call_t*) sys_fopen, SYSCALL_VALID }, /* XXX - Wrong Spot 298 - fopen */ { 0, @@ -1664,7 +1664,7 @@ { ARG_COUNT(sys_getcwd_args), "__getcwd", - (sys_call_t *) sys_getcwd, + (sys_call_t*) sys_getcwd, SYSCALL_VALID }, /* 326 - sys_getcwd */ { 0, @@ -2014,12 +2014,12 @@ { ARG_COUNT(sys_statfs_args), "statfs", - (sys_call_t *) sys_statfs, + (sys_call_t*) sys_statfs, SYSCALL_VALID }, // 396 statfs { ARG_COUNT(sys_fstatfs_args), "fstatfs", - (sys_call_t *) sys_fstatfs, + (sys_call_t*) sys_fstatfs, SYSCALL_VALID }, // 397 fstatfs { 0, @@ -2419,12 +2419,12 @@ { ARG_COUNT(sys_mmap_args), "mmap", - (sys_call_t *) sys_mmap, + (sys_call_t*) sys_mmap, SYSCALL_VALID }, /* 477 - sys_mmap */ { ARG_COUNT(sys_lseek_args), "lseek", - (sys_call_t *) sys_lseek, + (sys_call_t*) sys_lseek, SYSCALL_VALID }, /* 478 - sys_lseek */ { 0, diff --git a/sys/kernel/vfs_calls.c b/sys/kernel/vfs_calls.c index af442d8..9c57998 100644 --- a/sys/kernel/vfs_calls.c +++ b/sys/kernel/vfs_calls.c @@ -451,3 +451,9 @@ return (error); } + +int sys_unlink(struct thread *td, struct sys_unlink_args *uap) { + int error = 0x0; + kprintf("Path: %s", uap->path); + return (error); +}