Index: head/sys/compat/freebsd32/freebsd32_misc.c =================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c +++ head/sys/compat/freebsd32/freebsd32_misc.c @@ -332,7 +332,7 @@ * the pointers. */ int -freebsd32_exec_copyin_args(struct image_args *args, char *fname, +freebsd32_exec_copyin_args(struct image_args *args, const char *fname, enum uio_seg segflg, u_int32_t *argv, u_int32_t *envv) { char *argp, *envp; Index: head/sys/compat/freebsd32/freebsd32_util.h =================================================================== --- head/sys/compat/freebsd32/freebsd32_util.h +++ head/sys/compat/freebsd32/freebsd32_util.h @@ -118,7 +118,7 @@ void freebsd32_rusage_out(const struct rusage *s, struct rusage32 *s32); struct image_args; -int freebsd32_exec_copyin_args(struct image_args *args, char *fname, +int freebsd32_exec_copyin_args(struct image_args *args, const char *fname, enum uio_seg segflg, u_int32_t *argv, u_int32_t *envv); #endif /* !_COMPAT_FREEBSD32_FREEBSD32_UTIL_H_ */ Index: head/sys/compat/freebsd32/syscalls.master =================================================================== --- head/sys/compat/freebsd32/syscalls.master +++ head/sys/compat/freebsd32/syscalls.master @@ -72,21 +72,22 @@ size_t nbyte); } 4 AUE_WRITE NOPROTO { ssize_t write(int fd, const void *buf, \ size_t nbyte); } -5 AUE_OPEN_RWTC NOPROTO { int open(char *path, int flags, \ +5 AUE_OPEN_RWTC NOPROTO { int open(const char *path, int flags, \ mode_t mode); } 6 AUE_CLOSE NOPROTO { int close(int fd); } 7 AUE_WAIT4 STD { int freebsd32_wait4(int pid, int *status, \ int options, struct rusage32 *rusage); } 8 AUE_CREAT OBSOL old creat -9 AUE_LINK NOPROTO { int link(char *path, char *link); } -10 AUE_UNLINK NOPROTO { int unlink(char *path); } +9 AUE_LINK NOPROTO { int link(const char *path, \ + const char *link); } +10 AUE_UNLINK NOPROTO { int unlink(const char *path); } 11 AUE_NULL OBSOL execv -12 AUE_CHDIR NOPROTO { int chdir(char *path); } +12 AUE_CHDIR NOPROTO { int chdir(const char *path); } 13 AUE_FCHDIR NOPROTO { int fchdir(int fd); } -14 AUE_MKNOD COMPAT11 { int freebsd32_mknod(char *path, \ +14 AUE_MKNOD COMPAT11 { int freebsd32_mknod(const char *path, \ int mode, int dev); } -15 AUE_CHMOD NOPROTO { int chmod(char *path, mode_t mode); } -16 AUE_CHOWN NOPROTO { int chown(char *path, int uid, int gid); } +15 AUE_CHMOD NOPROTO { int chmod(const char *path, mode_t mode); } +16 AUE_CHOWN NOPROTO { int chown(const char *path, int uid, int gid); } 17 AUE_NULL NOPROTO { caddr_t break(char *nsize); } 18 AUE_GETFSSTAT COMPAT4 { int freebsd32_getfsstat( \ struct statfs32 *buf, long bufsize, \ @@ -94,9 +95,10 @@ 19 AUE_LSEEK COMPAT { int freebsd32_lseek(int fd, int offset, \ int whence); } 20 AUE_GETPID NOPROTO { pid_t getpid(void); } -21 AUE_MOUNT NOPROTO { int mount(char *type, char *path, \ +21 AUE_MOUNT NOPROTO { int mount(const char *type, \ + const char *path, \ int flags, caddr_t data); } -22 AUE_UMOUNT NOPROTO { int unmount(char *path, int flags); } +22 AUE_UMOUNT NOPROTO { int unmount(const char *path, int flags); } 23 AUE_SETUID NOPROTO { int setuid(uid_t uid); } 24 AUE_GETUID NOPROTO { uid_t getuid(void); } 25 AUE_GETEUID NOPROTO { uid_t geteuid(void); } @@ -115,15 +117,15 @@ int *alen); } 32 AUE_GETSOCKNAME NOPROTO { int getsockname(int fdes, caddr_t asa, \ int *alen); } -33 AUE_ACCESS NOPROTO { int access(char *path, int amode); } +33 AUE_ACCESS NOPROTO { int access(const char *path, int amode); } 34 AUE_CHFLAGS NOPROTO { int chflags(const char *path, u_long flags); } 35 AUE_FCHFLAGS NOPROTO { int fchflags(int fd, u_long flags); } 36 AUE_SYNC NOPROTO { int sync(void); } 37 AUE_KILL NOPROTO { int kill(int pid, int signum); } -38 AUE_STAT COMPAT { int freebsd32_stat(char *path, \ +38 AUE_STAT COMPAT { int freebsd32_stat(const char *path, \ struct ostat32 *ub); } 39 AUE_GETPPID NOPROTO { pid_t getppid(void); } -40 AUE_LSTAT COMPAT { int freebsd32_lstat(char *path, \ +40 AUE_LSTAT COMPAT { int freebsd32_lstat(const char *path, \ struct ostat *ub); } 41 AUE_DUP NOPROTO { int dup(u_int fd); } 42 AUE_PIPE COMPAT10 { int freebsd32_pipe(void); } @@ -140,8 +142,8 @@ osigset_t mask); } 49 AUE_GETLOGIN NOPROTO { int getlogin(char *namebuf, \ u_int namelen); } -50 AUE_SETLOGIN NOPROTO { int setlogin(char *namebuf); } -51 AUE_ACCT NOPROTO { int acct(char *path); } +50 AUE_SETLOGIN NOPROTO { int setlogin(const char *namebuf); } +51 AUE_ACCT NOPROTO { int acct(const char *path); } 52 AUE_SIGPENDING COMPAT { int freebsd32_sigpending(void); } 53 AUE_SIGALTSTACK STD { int freebsd32_sigaltstack( \ struct sigaltstack32 *ss, \ @@ -149,14 +151,15 @@ 54 AUE_IOCTL STD { int freebsd32_ioctl(int fd, uint32_t com, \ struct md_ioctl32 *data); } 55 AUE_REBOOT NOPROTO { int reboot(int opt); } -56 AUE_REVOKE NOPROTO { int revoke(char *path); } -57 AUE_SYMLINK NOPROTO { int symlink(char *path, char *link); } -58 AUE_READLINK NOPROTO { ssize_t readlink(char *path, char *buf, \ +56 AUE_REVOKE NOPROTO { int revoke(const char *path); } +57 AUE_SYMLINK NOPROTO { int symlink(const char *path, \ + const char *link); } +58 AUE_READLINK NOPROTO { ssize_t readlink(const char *path, char *buf, \ size_t count); } -59 AUE_EXECVE STD { int freebsd32_execve(char *fname, \ +59 AUE_EXECVE STD { int freebsd32_execve(const char *fname, \ uint32_t *argv, uint32_t *envv); } 60 AUE_UMASK NOPROTO { int umask(mode_t newmask); } -61 AUE_CHROOT NOPROTO { int chroot(char *path); } +61 AUE_CHROOT NOPROTO { int chroot(const char *path); } 62 AUE_FSTAT COMPAT { int freebsd32_fstat(int fd, \ struct ostat32 *ub); } 63 AUE_NULL OBSOL ogetkerninfo @@ -192,7 +195,7 @@ struct itimerval32 *oitv); } 84 AUE_NULL OBSOL owait ; XXX implement -85 AUE_SWAPON NOPROTO { int swapon(char *name); } +85 AUE_SWAPON NOPROTO { int swapon(const char *name); } 86 AUE_GETITIMER STD { int freebsd32_getitimer(u_int which, \ struct itimerval32 *itv); } 87 AUE_O_GETHOSTNAME OBSOL ogethostname @@ -257,21 +260,22 @@ 125 AUE_RECVFROM OBSOL orecvfrom 126 AUE_SETREUID NOPROTO { int setreuid(int ruid, int euid); } 127 AUE_SETREGID NOPROTO { int setregid(int rgid, int egid); } -128 AUE_RENAME NOPROTO { int rename(char *from, char *to); } -129 AUE_TRUNCATE COMPAT|NOPROTO { int truncate(char *path, \ +128 AUE_RENAME NOPROTO { int rename(const char *from, \ + const char *to); } +129 AUE_TRUNCATE COMPAT|NOPROTO { int truncate(const char *path, \ int length); } 130 AUE_FTRUNCATE COMPAT|NOPROTO { int ftruncate(int fd, int length); } 131 AUE_FLOCK NOPROTO { int flock(int fd, int how); } -132 AUE_MKFIFO NOPROTO { int mkfifo(char *path, mode_t mode); } +132 AUE_MKFIFO NOPROTO { int mkfifo(const char *path, mode_t mode); } 133 AUE_SENDTO NOPROTO { int sendto(int s, caddr_t buf, \ size_t len, int flags, caddr_t to, \ int tolen); } 134 AUE_SHUTDOWN NOPROTO { int shutdown(int s, int how); } 135 AUE_SOCKETPAIR NOPROTO { int socketpair(int domain, int type, \ int protocol, int *rsv); } -136 AUE_MKDIR NOPROTO { int mkdir(char *path, mode_t mode); } -137 AUE_RMDIR NOPROTO { int rmdir(char *path); } -138 AUE_UTIMES STD { int freebsd32_utimes(char *path, \ +136 AUE_MKDIR NOPROTO { int mkdir(const char *path, mode_t mode); } +137 AUE_RMDIR NOPROTO { int rmdir(const char *path); } +138 AUE_UTIMES STD { int freebsd32_utimes(const char *path, \ struct timeval32 *tptr); } 139 AUE_NULL OBSOL 4.2 sigreturn 140 AUE_ADJTIME STD { int freebsd32_adjtime( \ @@ -284,8 +288,8 @@ 145 AUE_SETRLIMIT OBSOL setrlimit 146 AUE_KILLPG OBSOL killpg 147 AUE_SETSID NOPROTO { int setsid(void); } -148 AUE_QUOTACTL NOPROTO { int quotactl(char *path, int cmd, int uid, \ - caddr_t arg); } +148 AUE_QUOTACTL NOPROTO { int quotactl(const char *path, int cmd, \ + int uid, caddr_t arg); } 149 AUE_O_QUOTA OBSOL oquota 150 AUE_GETSOCKNAME OBSOL ogetsockname @@ -303,13 +307,13 @@ 155 AUE_NFS_SVC UNIMPL nfssvc 156 AUE_GETDIRENTRIES COMPAT { int freebsd32_getdirentries(int fd, \ char *buf, u_int count, uint32_t *basep); } -157 AUE_STATFS COMPAT4 { int freebsd32_statfs(char *path, \ +157 AUE_STATFS COMPAT4 { int freebsd32_statfs(const char *path, \ struct statfs32 *buf); } 158 AUE_FSTATFS COMPAT4 { int freebsd32_fstatfs(int fd, \ struct statfs32 *buf); } 159 AUE_NULL UNIMPL nosys 160 AUE_LGETFH UNIMPL lgetfh -161 AUE_NFS_GETFH NOPROTO { int getfh(char *fname, \ +161 AUE_NFS_GETFH NOPROTO { int getfh(const char *fname, \ struct fhandle *fhp); } 162 AUE_SYSCTL OBSOL getdomainname 163 AUE_SYSCTL OBSOL setdomainname @@ -347,13 +351,13 @@ 185 AUE_NULL OBSOL lfs_markv 186 AUE_NULL OBSOL lfs_segclean 187 AUE_NULL OBSOL lfs_segwait -188 AUE_STAT COMPAT11 { int freebsd32_stat(char *path, \ +188 AUE_STAT COMPAT11 { int freebsd32_stat(const char *path, \ struct freebsd11_stat32 *ub); } 189 AUE_FSTAT COMPAT11 { int freebsd32_fstat(int fd, \ struct freebsd11_stat32 *ub); } -190 AUE_LSTAT COMPAT11 { int freebsd32_lstat(char *path, \ +190 AUE_LSTAT COMPAT11 { int freebsd32_lstat(const char *path, \ struct freebsd11_stat32 *ub); } -191 AUE_PATHCONF NOPROTO { int pathconf(char *path, int name); } +191 AUE_PATHCONF NOPROTO { int pathconf(const char *path, int name); } 192 AUE_FPATHCONF NOPROTO { int fpathconf(int fd, int name); } 193 AUE_NULL UNIMPL nosys 194 AUE_GETRLIMIT NOPROTO { int getrlimit(u_int which, \ @@ -372,7 +376,7 @@ 199 AUE_LSEEK COMPAT6 { off_t freebsd32_lseek(int fd, int pad, \ uint32_t offset1, uint32_t offset2, \ int whence); } -200 AUE_TRUNCATE COMPAT6 { int freebsd32_truncate(char *path, \ +200 AUE_TRUNCATE COMPAT6 { int freebsd32_truncate(const char *path, \ int pad, uint32_t length1, \ uint32_t length2); } 201 AUE_FTRUNCATE COMPAT6 { int freebsd32_ftruncate(int fd, int pad, \ @@ -385,7 +389,7 @@ size_t len); } 204 AUE_MUNLOCK NOPROTO { int munlock(const void *addr, \ size_t len); } -205 AUE_UNDELETE NOPROTO { int undelete(char *path); } +205 AUE_UNDELETE NOPROTO { int undelete(const char *path); } 206 AUE_FUTIMES STD { int freebsd32_futimes(int fd, \ struct timeval32 *tptr); } 207 AUE_GETPGID NOPROTO { int getpgid(pid_t pid); } @@ -473,7 +477,8 @@ 251 AUE_RFORK NOPROTO { int rfork(int flags); } 252 AUE_POLL OBSOL openbsd_poll 253 AUE_ISSETUGID NOPROTO { int issetugid(void); } -254 AUE_LCHOWN NOPROTO { int lchown(char *path, int uid, int gid); } +254 AUE_LCHOWN NOPROTO { int lchown(const char *path, int uid, \ + int gid); } 255 AUE_AIO_READ STD { int freebsd32_aio_read( \ struct aiocb32 *aiocbp); } 256 AUE_AIO_WRITE STD { int freebsd32_aio_write( \ @@ -498,14 +503,16 @@ 272 AUE_O_GETDENTS COMPAT11 { int freebsd32_getdents(int fd, char *buf, \ int count); } 273 AUE_NULL UNIMPL nosys -274 AUE_LCHMOD NOPROTO { int lchmod(char *path, mode_t mode); } +274 AUE_LCHMOD NOPROTO { int lchmod(const char *path, mode_t mode); } 275 AUE_NULL OBSOL netbsd_lchown -276 AUE_LUTIMES STD { int freebsd32_lutimes(char *path, \ +276 AUE_LUTIMES STD { int freebsd32_lutimes(const char *path, \ struct timeval32 *tptr); } 277 AUE_NULL OBSOL netbsd_msync -278 AUE_STAT COMPAT11|NOPROTO { int nstat(char *path, struct nstat *ub); } +278 AUE_STAT COMPAT11|NOPROTO { int nstat(const char *path, \ + struct nstat *ub); } 279 AUE_FSTAT COMPAT11|NOPROTO { int nfstat(int fd, struct nstat *sb); } -280 AUE_LSTAT COMPAT11|NOPROTO { int nlstat(char *path, struct nstat *ub); } +280 AUE_LSTAT COMPAT11|NOPROTO { int nlstat(const char *path, \ + struct nstat *ub); } 281 AUE_NULL UNIMPL nosys 282 AUE_NULL UNIMPL nosys 283 AUE_NULL UNIMPL nosys @@ -680,7 +687,7 @@ const char *attrname); } 374 AUE_SETUGID NOPROTO { int __setugid(int flag); } 375 AUE_NULL OBSOL nfsclnt -376 AUE_EACCESS NOPROTO { int eaccess(char *path, int amode); } +376 AUE_EACCESS NOPROTO { int eaccess(const char *path, int amode); } 377 AUE_NULL UNIMPL afs_syscall 378 AUE_NMOUNT STD { int freebsd32_nmount(struct iovec32 *iovp, \ unsigned int iovcnt, int flags); } @@ -709,7 +716,7 @@ 395 AUE_GETFSSTAT COMPAT11|NOPROTO { int getfsstat( \ struct freebsd11_statfs *buf, \ long bufsize, int mode); } -396 AUE_STATFS COMPAT11|NOPROTO { int statfs(char *path, \ +396 AUE_STATFS COMPAT11|NOPROTO { int statfs(const char *path, \ struct statfs *buf); } 397 AUE_FSTATFS COMPAT11|NOPROTO { int fstatfs(int fd, \ struct freebsd11_statfs *buf); } @@ -808,7 +815,7 @@ 452 AUE_SETAUDIT_ADDR NOPROTO { int setaudit_addr( \ struct auditinfo_addr *auditinfo_addr, \ u_int length); } -453 AUE_AUDITCTL NOPROTO { int auditctl(char *path); } +453 AUE_AUDITCTL NOPROTO { int auditctl(const char *path); } 454 AUE_NULL STD { int freebsd32_umtx_op(void *obj, int op,\ u_long val, void *uaddr, \ void *uaddr2); } @@ -871,7 +878,7 @@ int pad, \ uint32_t offset1, uint32_t offset2, \ int whence); } -479 AUE_TRUNCATE STD { int freebsd32_truncate(char *path, \ +479 AUE_TRUNCATE STD { int freebsd32_truncate(const char *path, \ int pad, \ uint32_t length1, uint32_t length2); } 480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ @@ -890,7 +897,7 @@ 478 AUE_LSEEK STD { off_t freebsd32_lseek(int fd, \ uint32_t offset1, uint32_t offset2, \ int whence); } -479 AUE_TRUNCATE STD { int freebsd32_truncate(char *path, \ +479 AUE_TRUNCATE STD { int freebsd32_truncate(const char *path, \ uint32_t length1, uint32_t length2); } 480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ uint32_t length1, uint32_t length2); } @@ -924,36 +931,39 @@ uint32_t id1, uint32_t id2, \ size_t cpusetsize, \ const cpuset_t *mask); } -489 AUE_FACCESSAT NOPROTO { int faccessat(int fd, char *path, int amode, \ - int flag); } +489 AUE_FACCESSAT NOPROTO { int faccessat(int fd, const char *path, \ + int amode, int flag); } 490 AUE_FCHMODAT NOPROTO { int fchmodat(int fd, const char *path, \ mode_t mode, int flag); } -491 AUE_FCHOWNAT NOPROTO { int fchownat(int fd, char *path, uid_t uid, \ - gid_t gid, int flag); } +491 AUE_FCHOWNAT NOPROTO { int fchownat(int fd, const char *path, \ + uid_t uid, gid_t gid, int flag); } 492 AUE_FEXECVE STD { int freebsd32_fexecve(int fd, \ uint32_t *argv, uint32_t *envv); } 493 AUE_FSTATAT COMPAT11 { int freebsd32_fstatat(int fd, \ - char *path, struct freebsd11_stat32 *buf, \ + const char *path, \ + struct freebsd11_stat32 *buf, \ int flag); } -494 AUE_FUTIMESAT STD { int freebsd32_futimesat(int fd, char *path, \ +494 AUE_FUTIMESAT STD { int freebsd32_futimesat(int fd, \ + const char *path, \ struct timeval *times); } -495 AUE_LINKAT NOPROTO { int linkat(int fd1, char *path1, int fd2, \ - char *path2, int flag); } -496 AUE_MKDIRAT NOPROTO { int mkdirat(int fd, char *path, \ +495 AUE_LINKAT NOPROTO { int linkat(int fd1, const char *path1, \ + int fd2, const char *path2, int flag); } +496 AUE_MKDIRAT NOPROTO { int mkdirat(int fd, const char *path, \ mode_t mode); } -497 AUE_MKFIFOAT NOPROTO { int mkfifoat(int fd, char *path, \ +497 AUE_MKFIFOAT NOPROTO { int mkfifoat(int fd, const char *path, \ mode_t mode); } -498 AUE_MKNODAT COMPAT11 { int freebsd32_mknodat(int fd, char *path, \ - mode_t mode, uint32_t dev); } -499 AUE_OPENAT_RWTC NOPROTO { int openat(int fd, char *path, int flag, \ - mode_t mode); } -500 AUE_READLINKAT NOPROTO { int readlinkat(int fd, char *path, char *buf, \ - size_t bufsize); } -501 AUE_RENAMEAT NOPROTO { int renameat(int oldfd, char *old, int newfd, \ - const char *new); } -502 AUE_SYMLINKAT NOPROTO { int symlinkat(char *path1, int fd, \ - char *path2); } -503 AUE_UNLINKAT NOPROTO { int unlinkat(int fd, char *path, \ +498 AUE_MKNODAT COMPAT11 { int freebsd32_mknodat(int fd, \ + const char *path, mode_t mode, \ + uint32_t dev); } +499 AUE_OPENAT_RWTC NOPROTO { int openat(int fd, const char *path, \ + int flag, mode_t mode); } +500 AUE_READLINKAT NOPROTO { int readlinkat(int fd, const char *path, \ + char *buf, size_t bufsize); } +501 AUE_RENAMEAT NOPROTO { int renameat(int oldfd, const char *old, \ + int newfd, const char *new); } +502 AUE_SYMLINKAT NOPROTO { int symlinkat(const char *path1, int fd, \ + const char *path2); } +503 AUE_UNLINKAT NOPROTO { int unlinkat(int fd, const char *path, \ int flag); } 504 AUE_POSIX_OPENPT NOPROTO { int posix_openpt(int flags); } ; 505 is initialised by the kgssapi code, if present. @@ -970,7 +980,7 @@ struct msqid_ds32 *buf); } 512 AUE_SHMCTL NOSTD { int freebsd32_shmctl(int shmid, int cmd, \ struct shmid_ds32 *buf); } -513 AUE_LPATHCONF NOPROTO { int lpathconf(char *path, int name); } +513 AUE_LPATHCONF NOPROTO { int lpathconf(const char *path, int name); } 514 AUE_NULL OBSOL cap_new 515 AUE_CAP_RIGHTS_GET NOPROTO { int __cap_rights_get(int version, \ int fd, cap_rights_t *rightsp); } @@ -1072,7 +1082,7 @@ 546 AUE_FUTIMES STD { int freebsd32_futimens(int fd, \ struct timespec *times); } 547 AUE_FUTIMESAT STD { int freebsd32_utimensat(int fd, \ - char *path, \ + const char *path, \ struct timespec *times, int flag); } 548 AUE_NULL OBSOL numa_getaffinity 549 AUE_NULL OBSOL numa_setaffinity @@ -1080,7 +1090,7 @@ 551 AUE_FSTAT STD { int freebsd32_fstat(int fd, \ struct stat32 *ub); } 552 AUE_FSTATAT STD { int freebsd32_fstatat(int fd, \ - char *path, struct stat32 *buf, \ + const char *path, struct stat32 *buf, \ int flag); } 553 AUE_FHSTAT STD { int freebsd32_fhstat( \ const struct fhandle *u_fhp, \ @@ -1088,15 +1098,15 @@ 554 AUE_GETDIRENTRIES NOPROTO { ssize_t getdirentries( \ int fd, char *buf, size_t count, \ off_t *basep); } -555 AUE_STATFS NOPROTO { int statfs(char *path, \ +555 AUE_STATFS NOPROTO { int statfs(const char *path, \ struct statfs32 *buf); } 556 AUE_FSTATFS NOPROTO { int fstatfs(int fd, struct statfs32 *buf); } 557 AUE_GETFSSTAT NOPROTO { int getfsstat(struct statfs32 *buf, \ long bufsize, int mode); } 558 AUE_FHSTATFS NOPROTO { int fhstatfs(const struct fhandle *u_fhp, \ struct statfs32 *buf); } -559 AUE_MKNODAT NOPROTO { int mknodat(int fd, char *path, mode_t mode, \ - dev_t dev); } +559 AUE_MKNODAT NOPROTO { int mknodat(int fd, const char *path, \ + mode_t mode, dev_t dev); } 560 AUE_KEVENT STD { int freebsd32_kevent(int fd, \ const struct kevent32 *changelist, \ int nchanges, \ Index: head/sys/dev/filemon/filemon_wrapper.c =================================================================== --- head/sys/dev/filemon/filemon_wrapper.c +++ head/sys/dev/filemon/filemon_wrapper.c @@ -149,7 +149,8 @@ } static void -_filemon_wrapper_openat(struct thread *td, char *upath, int flags, int fd) +_filemon_wrapper_openat(struct thread *td, const char *upath, int flags, + int fd) { int error; struct file *fp; @@ -262,7 +263,8 @@ } static void -_filemon_wrapper_link(struct thread *td, char *upath1, char *upath2) +_filemon_wrapper_link(struct thread *td, const char *upath1, + const char *upath2) { struct filemon *filemon; int error; Index: head/sys/kern/kern_exec.c =================================================================== --- head/sys/kern/kern_exec.c +++ head/sys/kern/kern_exec.c @@ -1167,7 +1167,7 @@ * space into the temporary string buffer. */ int -exec_copyin_args(struct image_args *args, char *fname, +exec_copyin_args(struct image_args *args, const char *fname, enum uio_seg segflg, char **argv, char **envv) { u_long argp, envp; Index: head/sys/kern/syscalls.master =================================================================== --- head/sys/kern/syscalls.master +++ head/sys/kern/syscalls.master @@ -111,7 +111,7 @@ } 5 AUE_OPEN_RWTC STD { int open( - _In_z_ char *path, + _In_z_ const char *path, int flags, mode_t mode ); @@ -134,25 +134,25 @@ } 8 AUE_CREAT COMPAT { int creat( - _In_z_ char *path, + _In_z_ const char *path, int mode ); } 9 AUE_LINK STD { int link( - _In_z_ char *path, - _In_z_ char *link + _In_z_ const char *path, + _In_z_ const char *link ); } 10 AUE_UNLINK STD { int unlink( - _In_z_ char *path + _In_z_ const char *path ); } 11 AUE_NULL OBSOL execv 12 AUE_CHDIR STD { int chdir( - _In_z_ char *path + _In_z_ const char *path ); } 13 AUE_FCHDIR STD { @@ -162,20 +162,20 @@ } 14 AUE_MKNOD COMPAT11 { int mknod( - _In_z_ char *path, + _In_z_ const char *path, int mode, int dev ); } 15 AUE_CHMOD STD { int chmod( - _In_z_ char *path, + _In_z_ const char *path, mode_t mode ); } 16 AUE_CHOWN STD { int chown( - _In_z_ char *path, + _In_z_ const char *path, int uid, int gid ); @@ -204,8 +204,8 @@ } 21 AUE_MOUNT STD { int mount( - _In_z_ char *type, - _In_z_ char *path, + _In_z_ const char *type, + _In_z_ const char *path, int flags, _In_opt_ caddr_t data ); @@ -213,7 +213,7 @@ ; XXX `path' should have type `const char *' but we're not ready for that. 22 AUE_UMOUNT STD { int unmount( - _In_z_ char *path, + _In_z_ const char *path, int flags ); } @@ -283,7 +283,7 @@ } 33 AUE_ACCESS STD { int access( - _In_z_ char *path, + _In_z_ const char *path, int amode ); } @@ -310,7 +310,7 @@ } 38 AUE_STAT COMPAT { int stat( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct ostat *ub ); } @@ -319,7 +319,7 @@ } 40 AUE_LSTAT COMPAT { int lstat( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct ostat *ub ); } @@ -377,12 +377,12 @@ } 50 AUE_SETLOGIN STD { int setlogin( - _In_z_ char *namebuf + _In_z_ const char *namebuf ); } 51 AUE_ACCT STD { int acct( - _In_z_ char *path + _In_z_ const char *path ); } 52 AUE_SIGPENDING COMPAT { @@ -408,25 +408,25 @@ } 56 AUE_REVOKE STD { int revoke( - _In_z_ char *path + _In_z_ const char *path ); } 57 AUE_SYMLINK STD { int symlink( - _In_z_ char *path, - _In_z_ char *link + _In_z_ const char *path, + _In_z_ const char *link ); } 58 AUE_READLINK STD { ssize_t readlink( - _In_z_ char *path, + _In_z_ const char *path, _Out_writes_z_(count) char *buf, size_t count ); } 59 AUE_EXECVE STD { int execve( - _In_z_ char *fname, + _In_z_ const char *fname, _In_z_ char **argv, _In_z_ char **envv ); @@ -438,7 +438,7 @@ } 61 AUE_CHROOT STD { int chroot( - _In_z_ char *path + _In_z_ const char *path ); } 62 AUE_FSTAT COMPAT { @@ -558,7 +558,7 @@ } 85 AUE_SWAPON STD { int swapon( - _In_z_ char *name + _In_z_ const char *name ); } 86 AUE_GETITIMER STD { @@ -815,13 +815,13 @@ } 128 AUE_RENAME STD { int rename( - _In_z_ char *from, - _In_z_ char *to + _In_z_ const char *from, + _In_z_ const char *to ); } 129 AUE_TRUNCATE COMPAT { int truncate( - _In_z_ char *path, + _In_z_ const char *path, long length ); } @@ -839,7 +839,7 @@ } 132 AUE_MKFIFO STD { int mkfifo( - _In_z_ char *path, + _In_z_ const char *path, mode_t mode ); } @@ -869,18 +869,18 @@ } 136 AUE_MKDIR STD { int mkdir( - _In_z_ char *path, + _In_z_ const char *path, mode_t mode ); } 137 AUE_RMDIR STD { int rmdir( - _In_z_ char *path + _In_z_ const char *path ); } 138 AUE_UTIMES STD { int utimes( - _In_z_ char *path, + _In_z_ const char *path, _In_ struct timeval *tptr ); } @@ -929,7 +929,7 @@ } 148 AUE_QUOTACTL STD { int quotactl( - _In_z_ char *path, + _In_z_ const char *path, int cmd, int uid, _In_ caddr_t arg @@ -979,7 +979,7 @@ } 157 AUE_STATFS COMPAT4 { int statfs( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct ostatfs *buf ); } @@ -992,13 +992,13 @@ 159 AUE_NULL UNIMPL nosys 160 AUE_LGETFH STD { int lgetfh( - _In_z_ char *fname, + _In_z_ const char *fname, _Out_ struct fhandle *fhp ); } 161 AUE_NFS_GETFH STD { int getfh( - _In_z_ char *fname, + _In_z_ const char *fname, _Out_ struct fhandle *fhp ); } @@ -1120,7 +1120,7 @@ 187 AUE_NULL OBSOL lfs_segwait 188 AUE_STAT COMPAT11 { int stat( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct freebsd11_stat *ub ); } @@ -1132,13 +1132,13 @@ } 190 AUE_LSTAT COMPAT11 { int lstat( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct freebsd11_stat *ub ); } 191 AUE_PATHCONF STD { int pathconf( - _In_z_ char *path, + _In_z_ const char *path, int name ); } @@ -1193,7 +1193,7 @@ } 200 AUE_TRUNCATE COMPAT6 { int truncate( - _In_z_ char *path, + _In_z_ const char *path, int pad, off_t length ); @@ -1229,7 +1229,7 @@ } 205 AUE_UNDELETE STD { int undelete( - _In_z_ char *path + _In_z_ const char *path ); } 206 AUE_FUTIMES STD { @@ -1455,7 +1455,7 @@ } 254 AUE_LCHOWN STD { int lchown( - _In_z_ char *path, + _In_z_ const char *path, int uid, int gid ); @@ -1489,21 +1489,21 @@ 273 AUE_NULL UNIMPL nosys 274 AUE_LCHMOD STD { int lchmod( - _In_z_ char *path, + _In_z_ const char *path, mode_t mode ); } 275 AUE_NULL OBSOL netbsd_lchown 276 AUE_LUTIMES STD { int lutimes( - _In_z_ char *path, + _In_z_ const char *path, _In_ struct timeval *tptr ); } 277 AUE_NULL OBSOL netbsd_msync 278 AUE_STAT COMPAT11 { int nstat( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct nstat *ub ); } @@ -1515,7 +1515,7 @@ } 280 AUE_LSTAT COMPAT11 { int nlstat( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct nstat *ub ); } @@ -1970,7 +1970,7 @@ 375 AUE_NULL OBSOL nfsclnt 376 AUE_EACCESS STD { int eaccess( - _In_z_ char *path, + _In_z_ const char *path, int amode ); } @@ -2078,7 +2078,7 @@ } 396 AUE_STATFS COMPAT11 { int statfs( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct freebsd11_statfs *buf ); } @@ -2191,7 +2191,7 @@ } 415 AUE_NULL STD { int __mac_execve( - _In_z_ char *fname, + _In_z_ const char *fname, _In_ char **argv, _In_ char **envv, _In_ struct mac *mac_p @@ -2390,7 +2390,7 @@ } 453 AUE_AUDITCTL STD { int auditctl( - _In_z_ char *path + _In_z_ const char *path ); } 454 AUE_NULL STD { @@ -2563,7 +2563,7 @@ } 479 AUE_TRUNCATE STD { int truncate( - _In_z_ char *path, + _In_z_ const char *path, off_t length ); } @@ -2633,7 +2633,7 @@ 489 AUE_FACCESSAT STD { int faccessat( int fd, - _In_z_ char *path, + _In_z_ const char *path, int amode, int flag ); @@ -2641,7 +2641,7 @@ 490 AUE_FCHMODAT STD { int fchmodat( int fd, - _In_z_ char *path, + _In_z_ const char *path, mode_t mode, int flag ); @@ -2649,7 +2649,7 @@ 491 AUE_FCHOWNAT STD { int fchownat( int fd, - _In_z_ char *path, + _In_z_ const char *path, uid_t uid, gid_t gid, int flag @@ -2665,7 +2665,7 @@ 493 AUE_FSTATAT COMPAT11 { int fstatat( int fd, - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct freebsd11_stat *buf, int flag ); @@ -2673,37 +2673,37 @@ 494 AUE_FUTIMESAT STD { int futimesat( int fd, - _In_z_ char *path, + _In_z_ const char *path, _In_reads_(2) struct timeval *times ); } 495 AUE_LINKAT STD { int linkat( int fd1, - _In_z_ char *path1, + _In_z_ const char *path1, int fd2, - _In_z_ char *path2, + _In_z_ const char *path2, int flag ); } 496 AUE_MKDIRAT STD { int mkdirat( int fd, - _In_z_ char *path, + _In_z_ const char *path, mode_t mode ); } 497 AUE_MKFIFOAT STD { int mkfifoat( int fd, - _In_z_ char *path, + _In_z_ const char *path, mode_t mode ); } 498 AUE_MKNODAT COMPAT11 { int mknodat( int fd, - _In_z_ char *path, + _In_z_ const char *path, mode_t mode, uint32_t dev ); @@ -2712,7 +2712,7 @@ 499 AUE_OPENAT_RWTC STD { int openat( int fd, - _In_z_ char *path, + _In_z_ const char *path, int flag, mode_t mode ); @@ -2720,7 +2720,7 @@ 500 AUE_READLINKAT STD { int readlinkat( int fd, - _In_z_ char *path, + _In_z_ const char *path, _Out_writes_bytes_(bufsize) char *buf, size_t bufsize ); @@ -2728,22 +2728,22 @@ 501 AUE_RENAMEAT STD { int renameat( int oldfd, - _In_z_ char *old, + _In_z_ const char *old, int newfd, - _In_z_ char *new + _In_z_ const char *new ); } 502 AUE_SYMLINKAT STD { int symlinkat( - _In_z_ char *path1, + _In_z_ const char *path1, int fd, - _In_z_ char *path2 + _In_z_ const char *path2 ); } 503 AUE_UNLINKAT STD { int unlinkat( int fd, - _In_z_ char *path, + _In_z_ const char *path, int flag ); } @@ -2755,7 +2755,7 @@ ; 505 is initialised by the kgssapi code, if present. 505 AUE_NULL NOSTD { int gssd_syscall( - _In_z_ char *path + _In_z_ const char *path ); } 506 AUE_JAIL_GET STD { @@ -2806,7 +2806,7 @@ } 513 AUE_LPATHCONF STD { int lpathconf( - _In_z_ char *path, + _In_z_ const char *path, int name ); } @@ -3031,7 +3031,7 @@ 547 AUE_FUTIMESAT STD { int utimensat( int fd, - _In_z_ char *path, + _In_z_ const char *path, _In_reads_(2) struct timespec *times, int flag ); @@ -3052,7 +3052,7 @@ 552 AUE_FSTATAT STD { int fstatat( int fd, - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct stat *buf, int flag ); @@ -3073,7 +3073,7 @@ } 555 AUE_STATFS STD { int statfs( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct statfs *buf ); } @@ -3099,7 +3099,7 @@ 559 AUE_MKNODAT STD { int mknodat( int fd, - _In_z_ char *path, + _In_z_ const char *path, mode_t mode, dev_t dev ); Index: head/sys/kern/vfs_syscalls.c =================================================================== --- head/sys/kern/vfs_syscalls.c +++ head/sys/kern/vfs_syscalls.c @@ -298,7 +298,7 @@ } int -kern_statfs(struct thread *td, char *path, enum uio_seg pathseg, +kern_statfs(struct thread *td, const char *path, enum uio_seg pathseg, struct statfs *buf) { struct mount *mp; @@ -876,7 +876,7 @@ } int -kern_chdir(struct thread *td, char *path, enum uio_seg pathseg) +kern_chdir(struct thread *td, const char *path, enum uio_seg pathseg) { struct nameidata nd; int error; @@ -1032,7 +1032,7 @@ } int -kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg, +kern_openat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flags, int mode) { struct proc *p = td->td_proc; @@ -1229,7 +1229,7 @@ #endif /* COMPAT_FREEBSD11 */ int -kern_mknodat(struct thread *td, int fd, char *path, enum uio_seg pathseg, +kern_mknodat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int mode, dev_t dev) { struct vnode *vp; @@ -1358,8 +1358,8 @@ } int -kern_mkfifoat(struct thread *td, int fd, char *path, enum uio_seg pathseg, - int mode) +kern_mkfifoat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, int mode) { struct mount *mp; struct vattr vattr; @@ -1491,8 +1491,8 @@ } int -kern_linkat(struct thread *td, int fd1, int fd2, char *path1, char *path2, - enum uio_seg segflg, int follow) +kern_linkat(struct thread *td, int fd1, int fd2, const char *path1, + const char *path2, enum uio_seg segflg, int follow) { struct vnode *vp; struct mount *mp; @@ -1608,21 +1608,23 @@ } int -kern_symlinkat(struct thread *td, char *path1, int fd, char *path2, +kern_symlinkat(struct thread *td, const char *path1, int fd, const char *path2, enum uio_seg segflg) { struct mount *mp; struct vattr vattr; - char *syspath; + const char *syspath; + char *tmppath; struct nameidata nd; int error; if (segflg == UIO_SYSSPACE) { syspath = path1; } else { - syspath = uma_zalloc(namei_zone, M_WAITOK); - if ((error = copyinstr(path1, syspath, MAXPATHLEN, NULL)) != 0) + tmppath = uma_zalloc(namei_zone, M_WAITOK); + if ((error = copyinstr(path1, tmppath, MAXPATHLEN, NULL)) != 0) goto out; + syspath = tmppath; } AUDIT_ARG_TEXT(syspath); restart: @@ -1669,7 +1671,7 @@ vn_finished_write(mp); out: if (segflg != UIO_SYSSPACE) - uma_zfree(namei_zone, syspath); + uma_zfree(namei_zone, tmppath); return (error); } @@ -1746,7 +1748,7 @@ sys_unlinkat(struct thread *td, struct unlinkat_args *uap) { int fd, flag; - char *path; + const char *path; flag = uap->flag; fd = uap->fd; @@ -1762,8 +1764,8 @@ } int -kern_unlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg, - int flag, ino_t oldinum) +kern_unlinkat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, int flag, ino_t oldinum) { struct mount *mp; struct vnode *vp; @@ -1957,8 +1959,8 @@ } int -kern_accessat(struct thread *td, int fd, char *path, enum uio_seg pathseg, - int flag, int amode) +kern_accessat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, int flag, int amode) { struct ucred *cred, *usecred; struct vnode *vp; @@ -2270,7 +2272,7 @@ } int -kern_statat(struct thread *td, int flag, int fd, char *path, +kern_statat(struct thread *td, int flag, int fd, const char *path, enum uio_seg pathseg, struct stat *sbp, void (*hook)(struct vnode *vp, struct stat *sbp)) { @@ -2429,8 +2431,8 @@ } int -kern_pathconf(struct thread *td, char *path, enum uio_seg pathseg, int name, - u_long flags, long *valuep) +kern_pathconf(struct thread *td, const char *path, enum uio_seg pathseg, + int name, u_long flags, long *valuep) { struct nameidata nd; int error; @@ -2480,8 +2482,8 @@ } int -kern_readlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg, - char *buf, enum uio_seg bufseg, size_t count) +kern_readlinkat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, char *buf, enum uio_seg bufseg, size_t count) { struct vnode *vp; struct iovec aiov; @@ -2749,8 +2751,8 @@ } int -kern_fchmodat(struct thread *td, int fd, char *path, enum uio_seg pathseg, - mode_t mode, int flag) +kern_fchmodat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, mode_t mode, int flag) { struct nameidata nd; int error, follow; @@ -2861,8 +2863,8 @@ } int -kern_fchownat(struct thread *td, int fd, char *path, enum uio_seg pathseg, - int uid, int gid, int flag) +kern_fchownat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, int uid, int gid, int flag) { struct nameidata nd; int error, follow; @@ -3074,8 +3076,8 @@ } int -kern_utimesat(struct thread *td, int fd, char *path, enum uio_seg pathseg, - struct timeval *tptr, enum uio_seg tptrseg) +kern_utimesat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg) { struct nameidata nd; struct timespec ts[2]; @@ -3112,7 +3114,7 @@ } int -kern_lutimes(struct thread *td, char *path, enum uio_seg pathseg, +kern_lutimes(struct thread *td, const char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg) { struct timespec ts[2]; @@ -3214,8 +3216,9 @@ } int -kern_utimensat(struct thread *td, int fd, char *path, enum uio_seg pathseg, - struct timespec *tptr, enum uio_seg tptrseg, int flag) +kern_utimensat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, struct timespec *tptr, enum uio_seg tptrseg, + int flag) { struct nameidata nd; struct timespec ts[2]; @@ -3262,7 +3265,8 @@ } int -kern_truncate(struct thread *td, char *path, enum uio_seg pathseg, off_t length) +kern_truncate(struct thread *td, const char *path, enum uio_seg pathseg, + off_t length) { struct mount *mp; struct vnode *vp; @@ -3437,8 +3441,8 @@ } int -kern_renameat(struct thread *td, int oldfd, char *old, int newfd, char *new, - enum uio_seg pathseg) +kern_renameat(struct thread *td, int oldfd, const char *old, int newfd, + const char *new, enum uio_seg pathseg) { struct mount *mp = NULL; struct vnode *tvp, *fvp, *tdvp; @@ -3599,7 +3603,7 @@ } int -kern_mkdirat(struct thread *td, int fd, char *path, enum uio_seg segflg, +kern_mkdirat(struct thread *td, int fd, const char *path, enum uio_seg segflg, int mode) { struct mount *mp; @@ -3676,7 +3680,7 @@ } int -kern_rmdirat(struct thread *td, int fd, char *path, enum uio_seg pathseg, +kern_rmdirat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flag) { struct mount *mp; Index: head/sys/security/audit/audit.h =================================================================== --- head/sys/security/audit/audit.h +++ head/sys/security/audit/audit.h @@ -122,7 +122,7 @@ void audit_arg_upath2_canon(char *upath); void audit_arg_vnode1(struct vnode *vp); void audit_arg_vnode2(struct vnode *vp); -void audit_arg_text(char *text); +void audit_arg_text(const char *text); void audit_arg_cmd(int cmd); void audit_arg_svipc_cmd(int cmd); void audit_arg_svipc_perm(struct ipc_perm *perm); Index: head/sys/security/audit/audit_arg.c =================================================================== --- head/sys/security/audit/audit_arg.c +++ head/sys/security/audit/audit_arg.c @@ -536,7 +536,7 @@ } void -audit_arg_text(char *text) +audit_arg_text(const char *text) { struct kaudit_record *ar; Index: head/sys/sys/imgact.h =================================================================== --- head/sys/sys/imgact.h +++ head/sys/sys/imgact.h @@ -102,7 +102,7 @@ int exec_new_vmspace(struct image_params *, struct sysentvec *); void exec_setregs(struct thread *, struct image_params *, u_long); int exec_shell_imgact(struct image_params *); -int exec_copyin_args(struct image_args *, char *, enum uio_seg, +int exec_copyin_args(struct image_args *, const char *, enum uio_seg, char **, char **); int exec_copyin_data_fds(struct thread *, struct image_args *, const void *, size_t, const int *, size_t); Index: head/sys/sys/syscallsubr.h =================================================================== --- head/sys/sys/syscallsubr.h +++ head/sys/sys/syscallsubr.h @@ -69,7 +69,7 @@ socklen_t *namelen, struct file **fp); int kern_accept4(struct thread *td, int s, struct sockaddr **name, socklen_t *namelen, int flags, struct file **fp); -int kern_accessat(struct thread *td, int fd, char *path, +int kern_accessat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flags, int mode); int kern_adjtime(struct thread *td, struct timeval *delta, struct timeval *olddelta); @@ -80,7 +80,7 @@ int kern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds, size_t ncmds); int kern_cap_rights_limit(struct thread *td, int fd, cap_rights_t *rights); -int kern_chdir(struct thread *td, char *path, enum uio_seg pathseg); +int kern_chdir(struct thread *td, const char *path, enum uio_seg pathseg); int kern_clock_getcpuclockid2(struct thread *td, id_t id, int which, clockid_t *clk_id); int kern_clock_getres(struct thread *td, clockid_t clock_id, @@ -112,9 +112,9 @@ int kern_dup(struct thread *td, u_int mode, int flags, int old, int new); int kern_execve(struct thread *td, struct image_args *args, struct mac *mac_p); -int kern_fchmodat(struct thread *td, int fd, char *path, +int kern_fchmodat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, mode_t mode, int flag); -int kern_fchownat(struct thread *td, int fd, char *path, +int kern_fchownat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int uid, int gid, int flag); int kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg); int kern_fcntl_freebsd(struct thread *td, int fd, int cmd, long arg); @@ -157,19 +157,19 @@ int kern_kldload(struct thread *td, const char *file, int *fileid); int kern_kldstat(struct thread *td, int fileid, struct kld_file_stat *stat); int kern_kldunload(struct thread *td, int fileid, int flags); -int kern_linkat(struct thread *td, int fd1, int fd2, char *path1, - char *path2, enum uio_seg segflg, int follow); +int kern_linkat(struct thread *td, int fd1, int fd2, const char *path1, + const char *path2, enum uio_seg segflg, int follow); int kern_listen(struct thread *td, int s, int backlog); int kern_lseek(struct thread *td, int fd, off_t offset, int whence); -int kern_lutimes(struct thread *td, char *path, enum uio_seg pathseg, +int kern_lutimes(struct thread *td, const char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); int kern_madvise(struct thread *td, uintptr_t addr, size_t len, int behav); int kern_mincore(struct thread *td, uintptr_t addr, size_t len, char *vec); -int kern_mkdirat(struct thread *td, int fd, char *path, +int kern_mkdirat(struct thread *td, int fd, const char *path, enum uio_seg segflg, int mode); -int kern_mkfifoat(struct thread *td, int fd, char *path, +int kern_mkfifoat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int mode); -int kern_mknodat(struct thread *td, int fd, char *path, +int kern_mknodat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int mode, dev_t dev); int kern_mlock(struct proc *proc, struct ucred *cred, uintptr_t addr, size_t len); @@ -186,10 +186,10 @@ struct timespec *rmt); int kern_ogetdirentries(struct thread *td, struct ogetdirentries_args *uap, long *ploff); -int kern_openat(struct thread *td, int fd, char *path, +int kern_openat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flags, int mode); -int kern_pathconf(struct thread *td, char *path, enum uio_seg pathseg, - int name, u_long flags, long *valuep); +int kern_pathconf(struct thread *td, const char *path, + enum uio_seg pathseg, int name, u_long flags, long *valuep); int kern_pipe(struct thread *td, int fildes[2], int flags, struct filecaps *fcaps1, struct filecaps *fcaps2); int kern_poll(struct thread *td, struct pollfd *fds, u_int nfds, @@ -211,14 +211,14 @@ int kern_pwrite(struct thread *td, int fd, const void *buf, size_t nbyte, off_t offset); int kern_pwritev(struct thread *td, int fd, struct uio *auio, off_t offset); -int kern_readlinkat(struct thread *td, int fd, char *path, +int kern_readlinkat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, char *buf, enum uio_seg bufseg, size_t count); int kern_readv(struct thread *td, int fd, struct uio *auio); int kern_recvit(struct thread *td, int s, struct msghdr *mp, enum uio_seg fromseg, struct mbuf **controlp); -int kern_renameat(struct thread *td, int oldfd, char *old, int newfd, - char *new, enum uio_seg pathseg); -int kern_rmdirat(struct thread *td, int fd, char *path, +int kern_renameat(struct thread *td, int oldfd, const char *old, int newfd, + const char *new, enum uio_seg pathseg); +int kern_rmdirat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flag); int kern_sched_getparam(struct thread *td, struct thread *targettd, struct sched_param *param); @@ -264,13 +264,13 @@ int kern_sigqueue(struct thread *td, pid_t pid, int signum, union sigval *value); int kern_socket(struct thread *td, int domain, int type, int protocol); -int kern_statat(struct thread *td, int flag, int fd, char *path, +int kern_statat(struct thread *td, int flag, int fd, const char *path, enum uio_seg pathseg, struct stat *sbp, void (*hook)(struct vnode *vp, struct stat *sbp)); -int kern_statfs(struct thread *td, char *path, enum uio_seg pathseg, +int kern_statfs(struct thread *td, const char *path, enum uio_seg pathseg, struct statfs *buf); -int kern_symlinkat(struct thread *td, char *path1, int fd, char *path2, - enum uio_seg segflg); +int kern_symlinkat(struct thread *td, const char *path1, int fd, + const char *path2, enum uio_seg segflg); int kern_ktimer_create(struct thread *td, clockid_t clock_id, struct sigevent *evp, int *timerid, int preset_id); int kern_ktimer_delete(struct thread *, int); @@ -283,13 +283,13 @@ int kern_thr_exit(struct thread *td); int kern_thr_new(struct thread *td, struct thr_param *param); int kern_thr_suspend(struct thread *td, struct timespec *tsp); -int kern_truncate(struct thread *td, char *path, enum uio_seg pathseg, - off_t length); -int kern_unlinkat(struct thread *td, int fd, char *path, +int kern_truncate(struct thread *td, const char *path, + enum uio_seg pathseg, off_t length); +int kern_unlinkat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flag, ino_t oldinum); -int kern_utimesat(struct thread *td, int fd, char *path, +int kern_utimesat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); -int kern_utimensat(struct thread *td, int fd, char *path, +int kern_utimensat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, struct timespec *tptr, enum uio_seg tptrseg, int follow); int kern_wait(struct thread *td, pid_t pid, int *status, int options,