Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Make debug code compile
details: https://anonhg.NetBSD.org/src/rev/006dea8079f9
branches: trunk
changeset: 356303:006dea8079f9
user: martin <martin%NetBSD.org@localhost>
date: Sat Sep 16 09:04:50 2017 +0000
description:
Make debug code compile
diffstat:
sys/arch/sparc64/sparc64/svr4_machdep.c | 6 ++--
sys/compat/svr4/svr4_stream.c | 43 ++++++++++++++++++--------------
sys/compat/svr4_32/svr4_32_ioctl.c | 8 +++---
sys/compat/svr4_32/svr4_32_misc.c | 9 +++---
sys/compat/svr4_32/svr4_32_signal.c | 10 +++---
5 files changed, 41 insertions(+), 35 deletions(-)
diffs (282 lines):
diff -r e0b1fdcbc6c1 -r 006dea8079f9 sys/arch/sparc64/sparc64/svr4_machdep.c
--- a/sys/arch/sparc64/sparc64/svr4_machdep.c Sat Sep 16 08:46:06 2017 +0000
+++ b/sys/arch/sparc64/sparc64/svr4_machdep.c Sat Sep 16 09:04:50 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: svr4_machdep.c,v 1.55 2011/03/04 22:25:29 joerg Exp $ */
+/* $NetBSD: svr4_machdep.c,v 1.56 2017/09/16 09:05:07 martin Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: svr4_machdep.c,v 1.55 2011/03/04 22:25:29 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_machdep.c,v 1.56 2017/09/16 09:05:07 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -236,7 +236,7 @@
#endif
#ifdef DEBUG_SVR4
- svr4_printmcontext("setmcontext", uc);
+ svr4_printmcontext("setmcontext", mc);
#endif
write_user_windows();
diff -r e0b1fdcbc6c1 -r 006dea8079f9 sys/compat/svr4/svr4_stream.c
--- a/sys/compat/svr4/svr4_stream.c Sat Sep 16 08:46:06 2017 +0000
+++ b/sys/compat/svr4/svr4_stream.c Sat Sep 16 09:04:50 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: svr4_stream.c,v 1.91 2017/07/28 17:52:47 riastradh Exp $ */
+/* $NetBSD: svr4_stream.c,v 1.92 2017/09/16 09:05:29 martin Exp $ */
/*-
* Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: svr4_stream.c,v 1.91 2017/07/28 17:52:47 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_stream.c,v 1.92 2017/09/16 09:05:29 martin Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -201,9 +201,10 @@
ptr = (u_char *) malloc(len, M_TEMP, M_WAITOK);
uprintf("%s cmd = %ld, timeout = %d, len = %d, buf = %p { ",
- str, ioc->cmd, ioc->timeout, ioc->len, ioc->buf);
+ str, (long)ioc->cmd, ioc->timeout, ioc->len,
+ NETBSD32PTR(ioc->buf));
- if ((error = copyin(ioc->buf, ptr, len)) != 0) {
+ if ((error = copyin(NETBSD32PTR(ioc->buf), ptr, len)) != 0) {
free((char *) ptr, M_TEMP);
return error;
}
@@ -237,13 +238,14 @@
if (len > 0) {
ptr = (u_char *) malloc(len, M_TEMP, M_WAITOK);
- if ((error = copyin(str->buf, ptr, len)) != 0) {
+ if ((error = copyin(NETBSD32PTR(str->buf), ptr, len)) != 0) {
free((char *) ptr, M_TEMP);
return error;
}
}
- uprintf(", { %d, %d, %p=[ ", str->maxlen, str->len, str->buf);
+ uprintf(", { %d, %d, %p=[ ", str->maxlen, str->len,
+ NETBSD32PTR(str->buf));
if (ptr)
bufprint(ptr, len);
@@ -353,7 +355,7 @@
na->port = sain->sin_port;
na->addr = sain->sin_addr.s_addr;
DPRINTF(("sockaddr_in -> netaddr %d %d %lx\n", na->family, na->port,
- na->addr));
+ (unsigned long)na->addr));
}
@@ -540,7 +542,7 @@
return EINVAL;
if (lst.cmd != SVR4_TI_OLD_BIND_REQUEST) {
- DPRINTF(("si_listen: bad request %ld\n", lst.cmd));
+ DPRINTF(("si_listen: bad request %ld\n", (long)lst.cmd));
return EINVAL;
}
@@ -707,7 +709,8 @@
return si_getudata(fp, fd, ioc, l);
default:
- DPRINTF(("Unknown sockmod ioctl %lx\n", ioc->cmd));
+ DPRINTF(("Unknown sockmod ioctl %lx\n",
+ (unsigned long)ioc->cmd));
return 0;
}
@@ -779,7 +782,7 @@
return error;
if (bnd.cmd != SVR4_TI_OLD_BIND_REQUEST) {
- DPRINTF(("ti_bind: bad request %ld\n", bnd.cmd));
+ DPRINTF(("ti_bind: bad request %ld\n", (long)bnd.cmd));
return EINVAL;
}
if (bnd.offs < 0 ||
@@ -880,7 +883,7 @@
return 0;
default:
- DPRINTF(("Unknown timod ioctl %lx\n", ioc->cmd));
+ DPRINTF(("Unknown timod ioctl %lx\n", (unsigned long)ioc->cmd));
return 0;
}
}
@@ -1400,8 +1403,8 @@
#ifdef DEBUG_SVR4
- show_msg(">putmsg", SCARG(uap, fd), SCARG(uap, ctl),
- SCARG(uap, dat), SCARG(uap, flags));
+ show_msg(">putmsg", SCARG(uap, fd), NETBSD32PTR(SCARG(uap, ctl)),
+ NETBSD32PTR(SCARG(uap, dat)), SCARG(uap, flags));
#endif /* DEBUG_SVR4 */
if ((fp = fd_getfile(SCARG(uap, fd))) == NULL)
@@ -1476,7 +1479,8 @@
goto out;
}
#endif
- DPRINTF(("putmsg: Invalid inet length %ld\n", sc.len));
+ DPRINTF(("putmsg: Invalid inet length %ld\n",
+ (long)sc.len));
error = EINVAL;
goto out;
}
@@ -1541,7 +1545,8 @@
*retval = 0;
return error;
default:
- DPRINTF(("putmsg: Unimplemented command %lx\n", sc.cmd));
+ DPRINTF(("putmsg: Unimplemented command %lx\n",
+ (unsigned long)sc.cmd));
error = ENOSYS;
goto out;
}
@@ -1571,8 +1576,8 @@
memset(&sc, 0, sizeof(sc));
#ifdef DEBUG_SVR4
- show_msg(">getmsg", SCARG(uap, fd), SCARG(uap, ctl),
- SCARG(uap, dat), 0);
+ show_msg(">getmsg", SCARG(uap, fd), NETBSD32PTR(SCARG(uap, ctl)),
+ NETBSD32PTR(SCARG(uap, dat)), 0);
#endif /* DEBUG_SVR4 */
if ((fp = fd_getfile(SCARG(uap, fd))) == NULL)
@@ -1869,8 +1874,8 @@
*retval = 0;
#ifdef DEBUG_SVR4
- show_msg("<getmsg", SCARG(uap, fd), SCARG(uap, ctl),
- SCARG(uap, dat), fl);
+ show_msg("<getmsg", SCARG(uap, fd), NETBSD32PTR(SCARG(uap, ctl)),
+ NETBSD32PTR(SCARG(uap, dat)), fl);
#endif /* DEBUG_SVR4 */
out:
diff -r e0b1fdcbc6c1 -r 006dea8079f9 sys/compat/svr4_32/svr4_32_ioctl.c
--- a/sys/compat/svr4_32/svr4_32_ioctl.c Sat Sep 16 08:46:06 2017 +0000
+++ b/sys/compat/svr4_32/svr4_32_ioctl.c Sat Sep 16 09:04:50 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: svr4_32_ioctl.c,v 1.22 2009/03/14 21:04:19 dsl Exp $ */
+/* $NetBSD: svr4_32_ioctl.c,v 1.23 2017/09/16 09:04:50 martin Exp $ */
/*-
* Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: svr4_32_ioctl.c,v 1.22 2009/03/14 21:04:19 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_32_ioctl.c,v 1.23 2017/09/16 09:04:50 martin Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -103,8 +103,8 @@
svr4_32_decode_cmd(SCARG(uap, com), dir, &c, &num, &argsiz);
- uprintf("svr4_32_ioctl(%d, _IO%s(%c, %d, %d), %#x);\n", SCARG(uap, fd),
- dir, c, num, argsiz, SCARG(uap, data));
+ uprintf("svr4_32_ioctl(%d, _IO%s(%c, %d, %d), %p);\n", SCARG(uap, fd),
+ dir, c, num, argsiz, NETBSD32PTR64(SCARG(uap, data)));
#endif
cmd = SCARG(uap, com);
diff -r e0b1fdcbc6c1 -r 006dea8079f9 sys/compat/svr4_32/svr4_32_misc.c
--- a/sys/compat/svr4_32/svr4_32_misc.c Sat Sep 16 08:46:06 2017 +0000
+++ b/sys/compat/svr4_32/svr4_32_misc.c Sat Sep 16 09:04:50 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: svr4_32_misc.c,v 1.78 2017/07/28 15:34:07 riastradh Exp $ */
+/* $NetBSD: svr4_32_misc.c,v 1.79 2017/09/16 09:04:50 martin Exp $ */
/*-
* Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.78 2017/07/28 15:34:07 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.79 2017/09/16 09:04:50 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1012,7 +1012,8 @@
}
DPRINTF(("siginfo [pid %ld signo %d code %d errno %d status %d]\n",
- i.si_pid, i.si_signo, i.si_code, i.si_errno, i.si_status));
+ (long)i.si_pid, i.si_signo, i.si_code, i.si_errno,
+ i.si_status));
return copyout(&i, s, sizeof(i));
}
@@ -1043,7 +1044,7 @@
DPRINTF(("waitsys(%d, %d, %p, %x)\n",
SCARG(uap, grp), id,
- SCARG(uap, info), SCARG(uap, options)));
+ NETBSD32PTR64(SCARG(uap, info)), SCARG(uap, options)));
/* Translate options */
options = 0;
diff -r e0b1fdcbc6c1 -r 006dea8079f9 sys/compat/svr4_32/svr4_32_signal.c
--- a/sys/compat/svr4_32/svr4_32_signal.c Sat Sep 16 08:46:06 2017 +0000
+++ b/sys/compat/svr4_32/svr4_32_signal.c Sat Sep 16 09:04:50 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: svr4_32_signal.c,v 1.30 2017/07/30 12:31:46 christos Exp $ */
+/* $NetBSD: svr4_32_signal.c,v 1.31 2017/09/16 09:04:50 martin Exp $ */
/*-
* Copyright (c) 1994, 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: svr4_32_signal.c,v 1.30 2017/07/30 12:31:46 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_32_signal.c,v 1.31 2017/09/16 09:04:50 martin Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_svr4.h"
@@ -651,12 +651,12 @@
switch (SCARG(uap, func)) {
case SVR4_GETCONTEXT:
- DPRINTF(("getcontext(%p)\n", SCARG(uap, uc)));
+ DPRINTF(("getcontext(%p)\n", NETBSD32PTR64(SCARG(uap, uc))));
svr4_32_getcontext(l, &uc, &l->l_sigmask);
return copyout(&uc, SCARG_P32(uap, uc), sizeof(uc));
case SVR4_SETCONTEXT:
- DPRINTF(("setcontext(%p)\n", SCARG(uap, uc)));
+ DPRINTF(("setcontext(%p)\n", NETBSD32PTR64(SCARG(uap, uc))));
if (!SCARG_P32(uap, uc))
exit1(l, 0, 0);
else if ((error = copyin(SCARG_P32(uap, uc),
@@ -667,7 +667,7 @@
default:
DPRINTF(("context(%d, %p)\n", SCARG(uap, func),
- SCARG(uap, uc)));
+ NETBSD32PTR64(SCARG(uap, uc))));
return ENOSYS;
}
return 0;
Home |
Main Index |
Thread Index |
Old Index