Change readlink(2)'s return type and type of the last argument
to match POSIX. Prodded by: Alexey Lyashkov
This commit is contained in:
parent
22999b6056
commit
5f56182b6f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=176215
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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 \
|
||||
|
@ -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 \
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user