PERFORCE change 135279 for review
Marcel Moolenaar
marcel at FreeBSD.org
Tue Feb 12 12:59:46 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=135279
Change 135279 by marcel at marcel_xcllnt on 2008/02/12 20:59:20
IFC @135278
Affected files ...
.. //depot/projects/powerpc/include/unistd.h#4 integrate
.. //depot/projects/powerpc/lib/libc/sys/readlink.2#3 integrate
.. //depot/projects/powerpc/sys/compat/freebsd32/freebsd32_proto.h#8 integrate
.. //depot/projects/powerpc/sys/compat/freebsd32/freebsd32_syscall.h#8 integrate
.. //depot/projects/powerpc/sys/compat/freebsd32/freebsd32_syscalls.c#8 integrate
.. //depot/projects/powerpc/sys/compat/freebsd32/freebsd32_sysent.c#8 integrate
.. //depot/projects/powerpc/sys/compat/freebsd32/syscalls.master#8 integrate
.. //depot/projects/powerpc/sys/kern/init_sysent.c#9 integrate
.. //depot/projects/powerpc/sys/kern/syscalls.c#9 integrate
.. //depot/projects/powerpc/sys/kern/syscalls.master#10 integrate
.. //depot/projects/powerpc/sys/kern/systrace_args.c#6 integrate
.. //depot/projects/powerpc/sys/kern/sysv_shm.c#8 integrate
.. //depot/projects/powerpc/sys/kern/vfs_syscalls.c#14 integrate
.. //depot/projects/powerpc/sys/powerpc/aim/machdep.c#4 integrate
.. //depot/projects/powerpc/sys/powerpc/aim/ofw_machdep.c#5 integrate
.. //depot/projects/powerpc/sys/powerpc/conf/NOTES#8 integrate
.. //depot/projects/powerpc/sys/sys/ipc.h#5 integrate
.. //depot/projects/powerpc/sys/sys/shm.h#5 integrate
.. //depot/projects/powerpc/sys/sys/syscall.h#9 integrate
.. //depot/projects/powerpc/sys/sys/syscall.mk#9 integrate
.. //depot/projects/powerpc/sys/sys/syscallsubr.h#5 integrate
.. //depot/projects/powerpc/sys/sys/sysproto.h#9 integrate
Differences ...
==== //depot/projects/powerpc/include/unistd.h#4 (text+ko) ====
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)unistd.h 8.12 (Berkeley) 4/27/95
- * $FreeBSD: src/include/unistd.h,v 1.82 2008/01/18 08:48:32 davidxu Exp $
+ * $FreeBSD: src/include/unistd.h,v 1.83 2008/02/12 20:09:03 ru Exp $
*/
#ifndef _UNISTD_H_
@@ -405,7 +405,7 @@
/* 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);
==== //depot/projects/powerpc/lib/libc/sys/readlink.2#3 (text+ko) ====
@@ -26,9 +26,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)readlink.2 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/sys/readlink.2,v 1.14 2007/01/09 00:28:15 imp Exp $
+.\" $FreeBSD: src/lib/libc/sys/readlink.2,v 1.15 2008/02/12 20:09:03 ru Exp $
.\"
-.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 @@
.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
==== //depot/projects/powerpc/sys/compat/freebsd32/freebsd32_proto.h#8 (text+ko) ====
@@ -2,8 +2,8 @@
* System call prototypes.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.81 2008/01/20 23:44:24 rwatson Exp $
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.95 2008/01/20 23:43:06 rwatson Exp
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.82 2008/02/12 20:11:54 ru Exp $
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.96 2008/02/12 20:09:03 ru Exp
*/
#ifndef _FREEBSD32_SYSPROTO_H_
==== //depot/projects/powerpc/sys/compat/freebsd32/freebsd32_syscall.h#8 (text+ko) ====
@@ -2,8 +2,8 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.79 2008/01/20 23:44:24 rwatson Exp $
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.95 2008/01/20 23:43:06 rwatson Exp
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.80 2008/02/12 20:11:54 ru Exp $
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.96 2008/02/12 20:09:03 ru Exp
*/
#define FREEBSD32_SYS_syscall 0
==== //depot/projects/powerpc/sys/compat/freebsd32/freebsd32_syscalls.c#8 (text+ko) ====
@@ -2,8 +2,8 @@
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.70 2008/01/20 23:44:24 rwatson Exp $
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.95 2008/01/20 23:43:06 rwatson Exp
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.71 2008/02/12 20:11:54 ru Exp $
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.96 2008/02/12 20:09:03 ru Exp
*/
const char *freebsd32_syscallnames[] = {
==== //depot/projects/powerpc/sys/compat/freebsd32/freebsd32_sysent.c#8 (text+ko) ====
@@ -2,8 +2,8 @@
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.80 2008/01/20 23:44:24 rwatson Exp $
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.95 2008/01/20 23:43:06 rwatson Exp
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.81 2008/02/12 20:11:54 ru Exp $
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.96 2008/02/12 20:09:03 ru Exp
*/
#include "opt_compat.h"
==== //depot/projects/powerpc/sys/compat/freebsd32/syscalls.master#8 (text+ko) ====
@@ -1,4 +1,4 @@
- $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.95 2008/01/20 23:43:06 rwatson Exp $
+ $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.96 2008/02/12 20:09:03 ru Exp $
; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94
; from: src/sys/kern/syscalls.master 1.107
;
@@ -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 \
==== //depot/projects/powerpc/sys/kern/init_sysent.c#9 (text+ko) ====
@@ -2,8 +2,8 @@
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/kern/init_sysent.c,v 1.232 2008/01/20 23:44:23 rwatson Exp $
- * created from FreeBSD: src/sys/kern/syscalls.master,v 1.236 2008/01/20 23:43:06 rwatson Exp
+ * $FreeBSD: src/sys/kern/init_sysent.c,v 1.233 2008/02/12 20:11:54 ru Exp $
+ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.237 2008/02/12 20:09:04 ru Exp
*/
#include "opt_compat.h"
==== //depot/projects/powerpc/sys/kern/syscalls.c#9 (text+ko) ====
@@ -2,8 +2,8 @@
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/kern/syscalls.c,v 1.216 2008/01/20 23:44:23 rwatson Exp $
- * created from FreeBSD: src/sys/kern/syscalls.master,v 1.236 2008/01/20 23:43:06 rwatson Exp
+ * $FreeBSD: src/sys/kern/syscalls.c,v 1.217 2008/02/12 20:11:54 ru Exp $
+ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.237 2008/02/12 20:09:04 ru Exp
*/
const char *syscallnames[] = {
==== //depot/projects/powerpc/sys/kern/syscalls.master#10 (text+ko) ====
@@ -1,4 +1,4 @@
- $FreeBSD: src/sys/kern/syscalls.master,v 1.236 2008/01/20 23:43:06 rwatson Exp $
+ $FreeBSD: src/sys/kern/syscalls.master,v 1.237 2008/02/12 20:09:04 ru Exp $
; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94
;
; System call name/number master file.
@@ -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 \
==== //depot/projects/powerpc/sys/kern/systrace_args.c#6 (text+ko) ====
@@ -2,7 +2,7 @@
* System call argument to DTrace register array converstion.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/kern/systrace_args.c,v 1.16 2008/01/20 23:44:23 rwatson Exp $
+ * $FreeBSD: src/sys/kern/systrace_args.c,v 1.17 2008/02/12 20:11:54 ru Exp $
* This file is part of the DTrace syscall provider.
*/
@@ -391,7 +391,7 @@
struct readlink_args *p = params;
uarg[0] = (intptr_t) p->path; /* char * */
uarg[1] = (intptr_t) p->buf; /* char * */
- iarg[2] = p->count; /* int */
+ uarg[2] = p->count; /* size_t */
*n_args = 3;
break;
}
==== //depot/projects/powerpc/sys/kern/sysv_shm.c#8 (text+ko) ====
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/sysv_shm.c,v 1.112 2007/10/24 19:03:55 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/sysv_shm.c,v 1.113 2008/02/12 20:55:03 csjp Exp $");
#include "opt_compat.h"
#include "opt_sysvipc.h"
@@ -545,6 +545,15 @@
mtx_lock(&Giant);
switch (cmd) {
+ /*
+ * It is possible that kern_shmctl is being called from the Linux ABI
+ * layer, in which case, we will need to implement IPC_INFO. It should
+ * be noted that other shmctl calls will be funneled through here for
+ * Linix binaries as well.
+ *
+ * NB: The Linux ABI layer will convert this data to structure(s) more
+ * consistent with the Linux ABI.
+ */
case IPC_INFO:
memcpy(buf, &shminfo, sizeof(shminfo));
if (bufsz)
@@ -639,6 +648,15 @@
struct shmid_ds buf;
size_t bufsz;
+ /*
+ * The only reason IPC_INFO, SHM_INFO, SHM_STAT exists is to support
+ * Linux binaries. If we see the call come through the FreeBSD ABI,
+ * return an error back to the user since we do not to support this.
+ */
+ if (uap->cmd == IPC_INFO || uap->cmd == SHM_INFO ||
+ uap->cmd == SHM_STAT)
+ return (EINVAL);
+
/* IPC_SET needs to copyin the buffer before calling kern_shmctl */
if (uap->cmd == IPC_SET) {
if ((error = copyin(uap->buf, &buf, sizeof(struct shmid_ds))))
@@ -651,9 +669,6 @@
/* Cases in which we need to copyout */
switch (uap->cmd) {
- case IPC_INFO:
- case SHM_INFO:
- case SHM_STAT:
case IPC_STAT:
error = copyout(&buf, uap->buf, bufsz);
break;
==== //depot/projects/powerpc/sys/kern/vfs_syscalls.c#14 (text+ko) ====
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/vfs_syscalls.c,v 1.448 2008/01/13 14:44:10 attilio Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/vfs_syscalls.c,v 1.449 2008/02/12 20:09:04 ru Exp $");
#include "opt_compat.h"
#include "opt_mac.h"
@@ -2307,7 +2307,7 @@
struct readlink_args {
char *path;
char *buf;
- int count;
+ size_t count;
};
#endif
int
@@ -2316,7 +2316,7 @@
register struct readlink_args /* {
char *path;
char *buf;
- int count;
+ size_t count;
} */ *uap;
{
@@ -2326,7 +2326,7 @@
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;
==== //depot/projects/powerpc/sys/powerpc/aim/machdep.c#4 (text+ko) ====
@@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/powerpc/aim/machdep.c,v 1.107 2007/12/25 17:52:00 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/powerpc/aim/machdep.c,v 1.108 2008/02/12 20:55:51 marcel Exp $");
#include "opt_compat.h"
#include "opt_ddb.h"
==== //depot/projects/powerpc/sys/powerpc/aim/ofw_machdep.c#5 (text+ko) ====
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/powerpc/aim/ofw_machdep.c,v 1.19 2007/12/19 18:00:49 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/powerpc/aim/ofw_machdep.c,v 1.20 2008/02/12 20:55:51 marcel Exp $");
#include <sys/param.h>
#include <sys/bus.h>
==== //depot/projects/powerpc/sys/powerpc/conf/NOTES#8 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/powerpc/conf/NOTES,v 1.11 2007/12/19 18:00:49 marcel Exp $
+# $FreeBSD: src/sys/powerpc/conf/NOTES,v 1.12 2008/02/12 19:38:39 marcel Exp $
#
# This file contains machine dependent kernel configuration notes. For
# machine independent notes, look in /sys/conf/NOTES.
==== //depot/projects/powerpc/sys/sys/ipc.h#5 (text+ko) ====
@@ -37,7 +37,7 @@
* SUCH DAMAGE.
*
* @(#)ipc.h 8.4 (Berkeley) 2/19/95
- * $FreeBSD: src/sys/sys/ipc.h,v 1.25 2005/01/07 02:29:23 imp Exp $
+ * $FreeBSD: src/sys/sys/ipc.h,v 1.26 2008/02/12 20:55:03 csjp Exp $
*/
/*
@@ -100,6 +100,9 @@
#define IPC_SET 1 /* set options */
#define IPC_STAT 2 /* get options */
#if __BSD_VISIBLE
+/*
+ * For Linux compatability.
+ */
#define IPC_INFO 3 /* get info */
#endif
==== //depot/projects/powerpc/sys/sys/shm.h#5 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/sys/shm.h,v 1.24 2005/08/06 07:20:17 csjp Exp $ */
+/* $FreeBSD: src/sys/sys/shm.h,v 1.25 2008/02/12 20:55:03 csjp Exp $ */
/* $NetBSD: shm.h,v 1.15 1994/06/29 06:45:17 cgd Exp $ */
/*-
@@ -56,7 +56,7 @@
#define SHM_LOCK 11
#define SHM_UNLOCK 12
-/* ipcs shmctl commands */
+/* ipcs shmctl commands for Linux compatability */
#define SHM_STAT 13
#define SHM_INFO 14
==== //depot/projects/powerpc/sys/sys/syscall.h#9 (text+ko) ====
@@ -2,8 +2,8 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/sys/syscall.h,v 1.213 2008/01/20 23:44:24 rwatson Exp $
- * created from FreeBSD: src/sys/kern/syscalls.master,v 1.236 2008/01/20 23:43:06 rwatson Exp
+ * $FreeBSD: src/sys/sys/syscall.h,v 1.214 2008/02/12 20:11:53 ru Exp $
+ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.237 2008/02/12 20:09:04 ru Exp
*/
#define SYS_syscall 0
==== //depot/projects/powerpc/sys/sys/syscall.mk#9 (text+ko) ====
@@ -1,7 +1,7 @@
# FreeBSD system call names.
# DO NOT EDIT-- this file is automatically generated.
-# $FreeBSD: src/sys/sys/syscall.mk,v 1.168 2008/01/20 23:44:24 rwatson Exp $
-# created from FreeBSD: src/sys/kern/syscalls.master,v 1.236 2008/01/20 23:43:06 rwatson Exp
+# $FreeBSD: src/sys/sys/syscall.mk,v 1.169 2008/02/12 20:11:53 ru Exp $
+# created from FreeBSD: src/sys/kern/syscalls.master,v 1.237 2008/02/12 20:09:04 ru Exp
MIASM = \
syscall.o \
exit.o \
==== //depot/projects/powerpc/sys/sys/syscallsubr.h#5 (text+ko) ====
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/sys/syscallsubr.h,v 1.47 2008/01/07 20:05:19 jhb Exp $
+ * $FreeBSD: src/sys/sys/syscallsubr.h,v 1.48 2008/02/12 20:09:04 ru Exp $
*/
#ifndef _SYS_SYSCALLSUBR_H_
@@ -129,7 +129,7 @@
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);
==== //depot/projects/powerpc/sys/sys/sysproto.h#9 (text+ko) ====
@@ -2,8 +2,8 @@
* System call prototypes.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/sys/sysproto.h,v 1.217 2008/01/20 23:44:24 rwatson Exp $
- * created from FreeBSD: src/sys/kern/syscalls.master,v 1.236 2008/01/20 23:43:06 rwatson Exp
+ * $FreeBSD: src/sys/sys/sysproto.h,v 1.218 2008/02/12 20:11:54 ru Exp $
+ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.237 2008/02/12 20:09:04 ru Exp
*/
#ifndef _SYS_SYSPROTO_H_
@@ -236,7 +236,7 @@
struct readlink_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)];
- char count_l_[PADL_(int)]; int count; char count_r_[PADR_(int)];
+ char count_l_[PADL_(size_t)]; size_t count; char count_r_[PADR_(size_t)];
};
struct execve_args {
char fname_l_[PADL_(char *)]; char * fname; char fname_r_[PADR_(char *)];
More information about the p4-projects
mailing list