diff options
-rw-r--r-- | include/unistd.h | 2 | ||||
-rw-r--r-- | lib/libc/sys/readlink.2 | 8 | ||||
-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 |
6 files changed, 13 insertions, 13 deletions
diff --git a/include/unistd.h b/include/unistd.h index 0d62a46..a0e3022 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -405,7 +405,7 @@ int getlogin_r(char *, int); /* 1003.1-2001 */ #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE int fchown(int, uid_t, gid_t); -int readlink(const char *, char *, int); +ssize_t readlink(const char *, char *, size_t); #endif #if __POSIX_VISIBLE >= 200112 int gethostname(char *, size_t); diff --git a/lib/libc/sys/readlink.2 b/lib/libc/sys/readlink.2 index 0f630f8..e747e57 100644 --- a/lib/libc/sys/readlink.2 +++ b/lib/libc/sys/readlink.2 @@ -28,7 +28,7 @@ .\" @(#)readlink.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd February 12, 2008 .Dt READLINK 2 .Os .Sh NAME @@ -38,8 +38,8 @@ .Lb libc .Sh SYNOPSIS .In unistd.h -.Ft int -.Fn readlink "const char *path" "char *buf" "int bufsiz" +.Ft ssize_t +.Fn readlink "const char *path" "char *buf" "size_t bufsiz" .Sh DESCRIPTION The .Fn readlink @@ -58,7 +58,7 @@ character to .Fa buf . .Sh RETURN VALUES The call returns the count of characters placed in the buffer -if it succeeds, or a -1 if an error occurs, placing the error +if it succeeds, or a \-1 if an error occurs, placing the error code in the global variable .Va errno . .Sh ERRORS 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); |