diff options
author | ru <ru@FreeBSD.org> | 2008-02-12 20:09:04 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2008-02-12 20:09:04 +0000 |
commit | 56aa644e2afa86546f32df939678f91cfb827c35 (patch) | |
tree | 6960888c6bfdf1b1f57904fc49a37303e846febf /sys | |
parent | 636c607d81b2881f2edb182ae34c05016420b0c9 (diff) | |
download | FreeBSD-src-56aa644e2afa86546f32df939678f91cfb827c35.zip FreeBSD-src-56aa644e2afa86546f32df939678f91cfb827c35.tar.gz |
Change readlink(2)'s return type and type of the last argument
to match POSIX.
Prodded by: Alexey Lyashkov
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/freebsd32/syscalls.master | 4 | ||||
-rw-r--r-- | sys/kern/syscalls.master | 4 | ||||
-rw-r--r-- | sys/kern/vfs_syscalls.c | 6 | ||||
-rw-r--r-- | sys/sys/syscallsubr.h | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index ce6f374..1394a92 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -132,8 +132,8 @@ 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 { int readlink(char *path, char *buf, \ - int count); } +58 AUE_READLINK NOPROTO { ssize_t readlink(char *path, char *buf, \ + size_t count); } 59 AUE_EXECVE STD { int freebsd32_execve(char *fname, \ u_int32_t *argv, u_int32_t *envv); } 60 AUE_UMASK NOPROTO { int umask(int newmask); } umask \ diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 1609b28..c22f99c 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -139,8 +139,8 @@ 55 AUE_REBOOT STD { int reboot(int opt); } 56 AUE_REVOKE STD { int revoke(char *path); } 57 AUE_SYMLINK STD { int symlink(char *path, char *link); } -58 AUE_READLINK STD { int readlink(char *path, char *buf, \ - int count); } +58 AUE_READLINK STD { ssize_t readlink(char *path, char *buf, \ + size_t count); } 59 AUE_EXECVE STD { int execve(char *fname, char **argv, \ char **envv); } 60 AUE_UMASK STD { int umask(int newmask); } umask umask_args \ diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 3bb6243..d05ca3a 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2307,7 +2307,7 @@ kern_pathconf(struct thread *td, char *path, enum uio_seg pathseg, int name) struct readlink_args { char *path; char *buf; - int count; + size_t count; }; #endif int @@ -2316,7 +2316,7 @@ readlink(td, uap) register struct readlink_args /* { char *path; char *buf; - int count; + size_t count; } */ *uap; { @@ -2326,7 +2326,7 @@ readlink(td, uap) int kern_readlink(struct thread *td, char *path, enum uio_seg pathseg, char *buf, - enum uio_seg bufseg, int count) + enum uio_seg bufseg, size_t count) { register struct vnode *vp; struct iovec aiov; diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index b8d6113..1612f87 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -129,7 +129,7 @@ int kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data); int kern_pwritev(struct thread *td, int fd, struct uio *auio, off_t offset); int kern_readlink(struct thread *td, char *path, enum uio_seg pathseg, - char *buf, enum uio_seg bufseg, int count); + 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); |