CVS commit: src/sys/arch/mips
Module Name:src Committed By: matt Date: Wed Aug 17 06:59:29 UTC 2011 Modified Files: src/sys/arch/mips/include: mips_opcode.h src/sys/arch/mips/mips: mips_emul.c Log Message: emulate the special3 opcode LX (lwx, ldx, lhx, lbux) instructions. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/mips/include/mips_opcode.h cvs rdiff -u -r1.23 -r1.24 src/sys/arch/mips/mips/mips_emul.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/mips_opcode.h diff -u src/sys/arch/mips/include/mips_opcode.h:1.16 src/sys/arch/mips/include/mips_opcode.h:1.17 --- src/sys/arch/mips/include/mips_opcode.h:1.16 Tue Mar 15 07:33:54 2011 +++ src/sys/arch/mips/include/mips_opcode.h Wed Aug 17 06:59:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_opcode.h,v 1.16 2011/03/15 07:33:54 matt Exp $ */ +/* $NetBSD: mips_opcode.h,v 1.17 2011/08/17 06:59:28 matt Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -266,8 +266,14 @@ /* * Values for the 'func' field when 'op' == OP_SPECIAL3. */ +#define OP_LX 012 /* DSP */ #define OP_RDHWR 073 /* MIPS32/64 r2 */ +#define OP_LX_LWX 0 /* lwx */ +#define OP_LX_LHX 4 /* lhx */ +#define OP_LX_LBUX 6 /* lbux */ +#define OP_LX_LDX 8 /* ldx */ + /* * Values for the 'func' field when 'op' == OP_BCOND. */ Index: src/sys/arch/mips/mips/mips_emul.c diff -u src/sys/arch/mips/mips/mips_emul.c:1.23 src/sys/arch/mips/mips/mips_emul.c:1.24 --- src/sys/arch/mips/mips/mips_emul.c:1.23 Tue Mar 15 07:39:23 2011 +++ src/sys/arch/mips/mips/mips_emul.c Wed Aug 17 06:59:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_emul.c,v 1.23 2011/03/15 07:39:23 matt Exp $ */ +/* $NetBSD: mips_emul.c,v 1.24 2011/08/17 06:59:29 matt Exp $ */ /* * Copyright (c) 1999 Shuichiro URATA. All rights reserved. @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mips_emul.c,v 1.23 2011/03/15 07:39:23 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: mips_emul.c,v 1.24 2011/08/17 06:59:29 matt Exp $); #include sys/param.h #include sys/systm.h @@ -399,6 +399,59 @@ ksiginfo_t ksi; const InstFmt instfmt = { .word = inst }; switch (instfmt.RType.func) { + case OP_LX: { + const intptr_t vaddr = tf-tf_regs[instfmt.RType.rs] + + tf-tf_regs[instfmt.RType.rt]; + mips_reg_t r; + int error = EFAULT; + if (vaddr 0) { + addr_err: + send_sigsegv(vaddr, T_ADDR_ERR_LD, tf, cause); + return; + } + switch (instfmt.RType.shamt) { +#if !defined(__mips_o32) + case OP_LX_LDX: { + uint64_t tmp64; + if (vaddr 7) +goto addr_err; + error = copyin((void *)vaddr, tmp64, sizeof(tmp64)); + r = tmp64; + break; + } +#endif + case OP_LX_LWX: { + int32_t tmp32; + if (vaddr 3) +goto addr_err; + error = copyin((void *)vaddr, tmp32, sizeof(tmp32)); + r = tmp32; + break; + } + case OP_LX_LHX: { + int16_t tmp16; + if (vaddr 1) +goto addr_err; + error = copyin((void *)vaddr, tmp16, sizeof(tmp16)); + r = tmp16; + break; + } + case OP_LX_LBUX: { + uint8_t tmp8; + error = copyin((void *)vaddr, tmp8, sizeof(tmp8)); + r = tmp8; + break; + } + default: + goto illopc; + } + if (error) { + send_sigsegv(vaddr, T_TLB_LD_MISS, tf, cause); + return; + } + tf-tf_regs[instfmt.RType.rd] = r; + break; + } case OP_RDHWR: switch (instfmt.RType.rd) { case 29: @@ -407,6 +460,7 @@ break; } /* FALLTHROUGH */ + illopc: default: tf-tf_regs[_R_CAUSE] = cause; tf-tf_regs[_R_BADVADDR] = tf-tf_regs[_R_PC];
CVS commit: src
Module Name:src Committed By: manu Date: Wed Aug 17 07:22:35 UTC 2011 Modified Files: src/distrib/sets/lists/comp: mi src/lib/libc/sys: Makefile.inc utimes.2 src/sys/kern: syscalls.master vfs_syscalls.c Log Message: Add futimens(2) and part of utimnsat(2) To generate a diff of this commit: cvs rdiff -u -r1.1662 -r1.1663 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.208 -r1.209 src/lib/libc/sys/Makefile.inc cvs rdiff -u -r1.26 -r1.27 src/lib/libc/sys/utimes.2 cvs rdiff -u -r1.251 -r1.252 src/sys/kern/syscalls.master cvs rdiff -u -r1.433 -r1.434 src/sys/kern/vfs_syscalls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1662 src/distrib/sets/lists/comp/mi:1.1663 --- src/distrib/sets/lists/comp/mi:1.1662 Mon Aug 15 15:14:00 2011 +++ src/distrib/sets/lists/comp/mi Wed Aug 17 07:22:34 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1662 2011/08/15 15:14:00 wiz Exp $ +# $NetBSD: mi,v 1.1663 2011/08/17 07:22:34 manu Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -4680,6 +4680,7 @@ ./usr/share/man/cat2/fsync_range.0 comp-c-catman .cat ./usr/share/man/cat2/ftruncate.0 comp-c-catman .cat ./usr/share/man/cat2/futimes.0 comp-c-catman .cat +./usr/share/man/cat2/futimens.0 comp-c-catman .cat ./usr/share/man/cat2/getcontext.0 comp-c-catman .cat ./usr/share/man/cat2/getdents.0 comp-c-catman .cat ./usr/share/man/cat2/getdirentries.0 comp-obsolete obsolete @@ -4865,6 +4866,7 @@ ./usr/share/man/cat2/undelete.0 comp-c-catman .cat ./usr/share/man/cat2/unlink.0 comp-c-catman .cat ./usr/share/man/cat2/unmount.0 comp-c-catman .cat +./usr/share/man/cat2/utimensat.0 comp-c-catman .cat ./usr/share/man/cat2/utimes.0 comp-c-catman .cat ./usr/share/man/cat2/utrace.0 comp-c-catman .cat ./usr/share/man/cat2/uuidgen.0 comp-c-catman .cat @@ -10864,6 +10866,7 @@ ./usr/share/man/html2/fsync_range.html comp-c-htmlman html ./usr/share/man/html2/ftruncate.html comp-c-htmlman html ./usr/share/man/html2/futimes.html comp-c-htmlman html +./usr/share/man/html2/futimens.html comp-c-htmlman html ./usr/share/man/html2/getcontext.html comp-c-htmlman html ./usr/share/man/html2/getdents.html comp-c-htmlman html ./usr/share/man/html2/getegid.html comp-c-htmlman html @@ -11037,6 +11040,7 @@ ./usr/share/man/html2/undelete.html comp-c-htmlman html ./usr/share/man/html2/unlink.html comp-c-htmlman html ./usr/share/man/html2/unmount.html comp-c-htmlman html +./usr/share/man/html2/utimensat.html comp-c-htmlman html ./usr/share/man/html2/utimes.html comp-c-htmlman html ./usr/share/man/html2/utrace.html comp-c-htmlman html ./usr/share/man/html2/uuidgen.html comp-c-htmlman html @@ -16822,6 +16826,7 @@ ./usr/share/man/man2/fsync_range.2 comp-c-man .man ./usr/share/man/man2/ftruncate.2 comp-c-man .man ./usr/share/man/man2/futimes.2 comp-c-man .man +./usr/share/man/man2/futimens.2 comp-c-man .man ./usr/share/man/man2/getcontext.2 comp-c-man .man ./usr/share/man/man2/getdents.2 comp-c-man .man ./usr/share/man/man2/getegid.2 comp-c-man .man @@ -17005,6 +17010,7 @@ ./usr/share/man/man2/undelete.2 comp-c-man .man ./usr/share/man/man2/unlink.2 comp-c-man .man ./usr/share/man/man2/unmount.2 comp-c-man .man +./usr/share/man/man2/utimensat.2 comp-c-man .man ./usr/share/man/man2/utimes.2 comp-c-man .man ./usr/share/man/man2/utrace.2 comp-c-man .man ./usr/share/man/man2/uuidgen.2 comp-c-man .man Index: src/lib/libc/sys/Makefile.inc diff -u src/lib/libc/sys/Makefile.inc:1.208 src/lib/libc/sys/Makefile.inc:1.209 --- src/lib/libc/sys/Makefile.inc:1.208 Mon Aug 8 12:08:53 2011 +++ src/lib/libc/sys/Makefile.inc Wed Aug 17 07:22:33 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.208 2011/08/08 12:08:53 manu Exp $ +# $NetBSD: Makefile.inc,v 1.209 2011/08/17 07:22:33 manu Exp $ # @(#)Makefile.inc 8.3 (Berkeley) 10/24/94 # sys sources @@ -90,7 +90,7 @@ faccessat.S fchdir.S fchflags.S fchmod.S fchmodat.S fchown.S \ fchownat.S fchroot.S fexecve.S __fhopen40.S __fhstat50.S \ __fhstatvfs140.S fktrace.S flock.S fpathconf.S __fstat50.S \ - fstatvfs1.S fstatat.S __futimes50.S \ + fstatvfs1.S fstatat.S __futimes50.S futimens.S \ __getcwd.S __getdents30.S __getfh30.S getvfsstat.S getgroups.S\ __getitimer50.S __getlogin.S getpeername.S getpgid.S getpgrp.S \ getpriority.S getrlimit.S __getrusage50.S getsid.S \ @@ -315,6 +315,7 @@ MLINKS+=syscall.2 __syscall.2 MLINKS+=truncate.2 ftruncate.2 MLINKS+=utimes.2 futimes.2 utimes.2 lutimes.2 +MLINKS+=utimes.2 futimens.2 utimes.2 utimensat.2 MLINKS+=wait.2 wait3.2 wait.2 wait4.2 wait.2 waitpid.2 MLINKS+=write.2 writev.2 write.2 pwrite.2 write.2 pwritev.2 MLINKS+=pipe.2 pipe2.2 Index: src/lib/libc/sys/utimes.2 diff -u src/lib/libc/sys/utimes.2:1.26
CVS commit: src/sys/sys
Module Name:src Committed By: manu Date: Wed Aug 17 07:25:30 UTC 2011 Modified Files: src/sys/sys: stat.h Log Message: Add futimens(2) and part utimensat(2) (missing bit from previous commit) To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/sys/stat.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/stat.h diff -u src/sys/sys/stat.h:1.61 src/sys/sys/stat.h:1.62 --- src/sys/sys/stat.h:1.61 Mon Aug 8 12:08:54 2011 +++ src/sys/sys/stat.h Wed Aug 17 07:25:30 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: stat.h,v 1.61 2011/08/08 12:08:54 manu Exp $ */ +/* $NetBSD: stat.h,v 1.62 2011/08/17 07:25:30 manu Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -207,6 +207,12 @@ #endif /* _KERNEL */ #endif /* _NETBSD_SOURCE */ +/* + * Special values for utimensat and futimens + */ +#define UTIME_NOW ((1 30) - 1) +#define UTIME_OMIT ((1 30) - 2) + #if !defined(_KERNEL) !defined(_STANDALONE) #include sys/cdefs.h @@ -242,6 +248,8 @@ int utimensat(int, const char *, const struct timespec *, int); #endif +int futimens(int, const struct timespec *); + __END_DECLS #endif /* !_KERNEL !_STANDALONE */
CVS commit: src/sys
Module Name:src Committed By: manu Date: Wed Aug 17 07:26:17 UTC 2011 Modified Files: src/sys/kern: init_sysent.c syscalls.c src/sys/sys: syscall.h syscallargs.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.257 -r1.258 src/sys/kern/init_sysent.c cvs rdiff -u -r1.248 -r1.249 src/sys/kern/syscalls.c cvs rdiff -u -r1.244 -r1.245 src/sys/sys/syscall.h cvs rdiff -u -r1.227 -r1.228 src/sys/sys/syscallargs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/init_sysent.c diff -u src/sys/kern/init_sysent.c:1.257 src/sys/kern/init_sysent.c:1.258 --- src/sys/kern/init_sysent.c:1.257 Mon Aug 8 12:17:27 2011 +++ src/sys/kern/init_sysent.c Wed Aug 17 07:26:17 2011 @@ -1,14 +1,14 @@ -/* $NetBSD: init_sysent.c,v 1.257 2011/08/08 12:17:27 manu Exp $ */ +/* $NetBSD: init_sysent.c,v 1.258 2011/08/17 07:26:17 manu Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.251 2011/08/08 12:08:53 manu Exp + * created from NetBSD: syscalls.master,v 1.252 2011/08/17 07:22:34 manu Exp */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.257 2011/08/08 12:17:27 manu Exp $); +__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.258 2011/08/17 07:26:17 manu Exp $); #include opt_modular.h #include opt_ntp.h @@ -1136,8 +1136,8 @@ (sy_call_t *)sys_symlinkat }, /* 470 = symlinkat */ { ns(struct sys_unlinkat_args), 0, (sy_call_t *)sys_unlinkat }, /* 471 = unlinkat */ - { 0, 0, 0, - sys_nosys }, /* 472 = filler */ + { ns(struct sys_futimens_args), 0, + (sy_call_t *)sys_futimens }, /* 472 = futimens */ { 0, 0, 0, sys_nosys }, /* 473 = filler */ { 0, 0, 0, Index: src/sys/kern/syscalls.c diff -u src/sys/kern/syscalls.c:1.248 src/sys/kern/syscalls.c:1.249 --- src/sys/kern/syscalls.c:1.248 Mon Aug 8 12:17:28 2011 +++ src/sys/kern/syscalls.c Wed Aug 17 07:26:17 2011 @@ -1,14 +1,14 @@ -/* $NetBSD: syscalls.c,v 1.248 2011/08/08 12:17:28 manu Exp $ */ +/* $NetBSD: syscalls.c,v 1.249 2011/08/17 07:26:17 manu Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.251 2011/08/08 12:08:53 manu Exp + * created from NetBSD: syscalls.master,v 1.252 2011/08/17 07:22:34 manu Exp */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.248 2011/08/08 12:17:28 manu Exp $); +__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.249 2011/08/17 07:26:17 manu Exp $); #if defined(_KERNEL_OPT) #include opt_modular.h @@ -561,7 +561,7 @@ /* 469 */ readlinkat, /* 470 */ symlinkat, /* 471 */ unlinkat, - /* 472 */ # filler, + /* 472 */ futimens, /* 473 */ # filler, /* 474 */ # filler, /* 475 */ # filler, Index: src/sys/sys/syscall.h diff -u src/sys/sys/syscall.h:1.244 src/sys/sys/syscall.h:1.245 --- src/sys/sys/syscall.h:1.244 Mon Aug 8 12:17:27 2011 +++ src/sys/sys/syscall.h Wed Aug 17 07:26:16 2011 @@ -1,10 +1,10 @@ -/* $NetBSD: syscall.h,v 1.244 2011/08/08 12:17:27 manu Exp $ */ +/* $NetBSD: syscall.h,v 1.245 2011/08/17 07:26:16 manu Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.251 2011/08/08 12:08:53 manu Exp + * created from NetBSD: syscalls.master,v 1.252 2011/08/17 07:22:34 manu Exp */ #ifndef _SYS_SYSCALL_H_ @@ -1339,6 +1339,9 @@ /* syscall: unlinkat ret: int args: int const char * int */ #define SYS_unlinkat 471 -#define SYS_MAXSYSCALL 472 +/* syscall: futimens ret: int args: int const struct timespec * */ +#define SYS_futimens 472 + +#define SYS_MAXSYSCALL 473 #define SYS_NSYSENT 512 #endif /* _SYS_SYSCALL_H_ */ Index: src/sys/sys/syscallargs.h diff -u src/sys/sys/syscallargs.h:1.227 src/sys/sys/syscallargs.h:1.228 --- src/sys/sys/syscallargs.h:1.227 Mon Aug 8 12:17:27 2011 +++ src/sys/sys/syscallargs.h Wed Aug 17 07:26:16 2011 @@ -1,10 +1,10 @@ -/* $NetBSD: syscallargs.h,v 1.227 2011/08/08 12:17:27 manu Exp $ */ +/* $NetBSD: syscallargs.h,v 1.228 2011/08/17 07:26:16 manu Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.251 2011/08/08 12:08:53 manu Exp + * created from NetBSD: syscalls.master,v 1.252 2011/08/17 07:22:34 manu Exp */ #ifndef _SYS_SYSCALLARGS_H_ @@ -2682,6 +2682,12 @@ }; check_syscall_args(sys_unlinkat) +struct sys_futimens_args { + syscallarg(int) fd; + syscallarg(const struct timespec *) tptr; +}; +check_syscall_args(sys_futimens) + /* * System call prototypes. */ @@ -3562,4 +3568,6 @@ int sys_unlinkat(struct lwp *, const struct sys_unlinkat_args *, register_t *); +int sys_futimens(struct lwp *, const struct sys_futimens_args *, register_t *); + #endif /* _SYS_SYSCALLARGS_H_ */
CVS commit: src/dist/dhcp/client
Module Name:src Committed By: christos Date: Wed Aug 17 08:06:38 UTC 2011 Modified Files: src/dist/dhcp/client: dhclient.c Log Message: Instead of printing the raw suspect value instead of the name (!?!?), print the name and the suspect value vis encoded. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/dist/dhcp/client/dhclient.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/dhcp/client/dhclient.c diff -u src/dist/dhcp/client/dhclient.c:1.21 src/dist/dhcp/client/dhclient.c:1.22 --- src/dist/dhcp/client/dhclient.c:1.21 Wed Apr 6 16:24:16 2011 +++ src/dist/dhcp/client/dhclient.c Wed Aug 17 04:06:38 2011 @@ -32,11 +32,12 @@ #ifndef lint static char ocopyright[] = -$Id: dhclient.c,v 1.21 2011/04/06 20:24:16 christos Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n; +$Id: dhclient.c,v 1.22 2011/08/17 08:06:38 christos Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n; #endif /* not lint */ #include dhcpd.h #include version.h +#include vis.h TIME default_lease_time = 43200; /* 12 hours... */ TIME max_lease_time = 86400; /* 24 hours... */ @@ -86,6 +87,14 @@ void do_release(struct client_state *); +static void +suspect(const char *name, const char *value) +{ + char buf[1024]; + (void)strnvis(buf, sizeof(buf), value, VIS_WHITE); + log_error(suspect value in %s option (%s) - discarded, name, buf); +} + #if !defined (SMALL) static isc_result_t verify_addr (omapi_object_t *l, omapi_addr_t *addr) @@ -2492,11 +2501,8 @@ client_envadd(es-client, es-prefix, name, %s, value); } else { - log_error(suspect value in %s - option - discarded, - name); + suspect(name, value); } - data_string_forget (data, MDL); } } @@ -2576,9 +2582,7 @@ client_envadd(client, prefix, filename, %s, lease-filename); } else { - log_error(suspect value in %s - option - discarded, - lease-filename); + suspect(filename, lease-filename); } } @@ -2589,9 +2593,7 @@ client_envadd (client, prefix, server_name, %s, lease-server_name); } else { - log_error(suspect value in %s - option - discarded, - lease-server_name); + suspect(server_mame, lease-server_name); } } for (i = 0; i lease - options - universe_count; i++) {
CVS commit: src/external/bsd/am-utils/dist/amd
Module Name:src Committed By: christos Date: Wed Aug 17 08:22:50 UTC 2011 Modified Files: src/external/bsd/am-utils/dist/amd: readdir.c Log Message: fix type-punned warnings using memcpy To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/am-utils/dist/amd/readdir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/am-utils/dist/amd/readdir.c diff -u src/external/bsd/am-utils/dist/amd/readdir.c:1.1.1.2 src/external/bsd/am-utils/dist/amd/readdir.c:1.2 --- src/external/bsd/am-utils/dist/amd/readdir.c:1.1.1.2 Fri Mar 20 16:26:50 2009 +++ src/external/bsd/am-utils/dist/amd/readdir.c Wed Aug 17 04:22:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: readdir.c,v 1.1.1.2 2009/03/20 20:26:50 christos Exp $ */ +/* $NetBSD: readdir.c,v 1.2 2011/08/17 08:22:50 christos Exp $ */ /* * Copyright (c) 1997-2009 Erez Zadok @@ -57,6 +57,7 @@ #define DOT_DOT_COOKIE (u_int) 1 #define MAX_CHAIN 2048 +static const u_int zero = 0, dot_dot_cookie = DOT_DOT_COOKIE; / *** FORWARD DEFINITIONS *** @@ -181,7 +182,7 @@ /* we have space. put entry in next cell */ ++last_cookie; chain[num_entries].ne_fileid = (u_int) last_cookie; - *(u_int *) chain[num_entries].ne_cookie = (u_int) last_cookie; + memcpy(chain[num_entries].ne_cookie, last_cookie, sizeof(last_cookie)); chain[num_entries].ne_name = key; if (num_entries max_entries - 1) { /* link to next one */ chain[num_entries].ne_nextentry = chain[num_entries + 1]; @@ -255,7 +256,7 @@ ep[0].ne_fileid = mp-am_gen; ep[0].ne_name = .; ep[0].ne_nextentry = ep[1]; -*(u_int *) ep[0].ne_cookie = 0; +memcpy(ep[0].ne_cookie, zero, sizeof(zero)); /* construct .. */ if (mp-am_parent) @@ -265,7 +266,7 @@ ep[1].ne_name = ..; ep[1].ne_nextentry = NULL; -*(u_int *) ep[1].ne_cookie = DOT_DOT_COOKIE; +memcpy(ep[1].ne_cookie, dot_dot_cookie, sizeof(dot_dot_cookie)); /* * If map is browsable, call a function make_entry_chain() to construct @@ -302,9 +303,12 @@ nfsentry *ne; for (j = 0, ne = te; ne; ne = ne-ne_nextentry) plog(XLOG_DEBUG, gen2 key %4d \%s\, j++, ne-ne_name); - for (j = 0, ne = ep; ne; ne = ne-ne_nextentry) - plog(XLOG_DEBUG, gen2+ key %4d \%s\ fi=%d ck=%d, - j++, ne-ne_name, ne-ne_fileid, *(u_int *)ne-ne_cookie); + for (j = 0, ne = ep; ne; ne = ne-ne_nextentry) { +u_int cookie; + memcpy(cookie, ne-ne_cookie, sizeof(cookie)); + plog(XLOG_DEBUG, gen2+ key %4d \%s\ fi=%d ck=%u, + j++, ne-ne_name, ne-ne_fileid, cookie); + } plog(XLOG_DEBUG, EOF is %d, dp-dl_eof); } return 0; @@ -414,7 +418,7 @@ ep[0].ne_fileid = mp-am_gen; ep[0].ne_name = .; ep[0].ne_nextentry = ep[1]; -*(u_int *) ep[0].ne_cookie = 0; +memcpy(ep[0].ne_cookie, zero, sizeof(zero)); /* construct .. */ if (mp-am_parent) @@ -423,7 +427,8 @@ ep[1].ne_fileid = mp-am_gen; ep[1].ne_name = ..; ep[1].ne_nextentry = NULL; -*(u_int *) ep[1].ne_cookie = (xp ? xp-am_gen : DOT_DOT_COOKIE); +memcpy(ep[1].ne_cookie, (xp ? xp-am_gen : dot_dot_cookie), + sizeof(dot_dot_cookie)); if (!xp) dp-dl_eof = TRUE; /* by default assume readdir done */ @@ -431,9 +436,12 @@ if (amuDebug(D_READDIR)) { nfsentry *ne; int j; - for (j = 0, ne = ep; ne; ne = ne-ne_nextentry) - plog(XLOG_DEBUG, gen1 key %4d \%s\ fi=%d ck=%d, - j++, ne-ne_name, ne-ne_fileid, *(u_int *)ne-ne_cookie); + for (j = 0, ne = ep; ne; ne = ne-ne_nextentry) { + u_int cookie; + memcpy(cookie, ne-ne_cookie, sizeof(cookie)); + plog(XLOG_DEBUG, gen1 key %4d \%s\ fi=%d ck=%u, + j++, ne-ne_name, ne-ne_fileid, cookie); + } } return 0; } @@ -462,9 +470,9 @@ am_node *xp_next = next_nonerror_node(xp-am_osib); if (xp_next) { - *(u_int *) ep-ne_cookie = xp_next-am_gen; + memcpy(ep-ne_cookie, xp_next-am_gen, sizeof(xp_next-am_gen)); } else { - *(u_int *) ep-ne_cookie = DOT_DOT_COOKIE; + memcpy(ep-ne_cookie, dot_dot_cookie, sizeof(dot_dot_cookie)); dp-dl_eof = TRUE; } @@ -490,9 +498,12 @@ if (amuDebug(D_READDIR)) { nfsentry *ne; int j; - for (j=0,ne=ep; ne; ne=ne-ne_nextentry) - plog(XLOG_DEBUG, gen2 key %4d \%s\ fi=%d ck=%d, - j++, ne-ne_name, ne-ne_fileid, *(u_int *)ne-ne_cookie); + for (j=0,ne=ep; ne; ne=ne-ne_nextentry) { +u_int cookie; + memcpy(cookie, ne-ne_cookie, sizeof(cookie)); + plog(XLOG_DEBUG, gen2 key %4d \%s\ fi=%d ck=%u, + j++, ne-ne_name, ne-ne_fileid, cookie); + } } return 0; }
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Wed Aug 17 08:29:20 UTC 2011 Modified Files: src/lib/libc/sys: utimes.2 Log Message: Remove trailing whitespace. Bump date for previous. New sentence, new live. End sentence with dot. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/lib/libc/sys/utimes.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/utimes.2 diff -u src/lib/libc/sys/utimes.2:1.27 src/lib/libc/sys/utimes.2:1.28 --- src/lib/libc/sys/utimes.2:1.27 Wed Aug 17 07:22:33 2011 +++ src/lib/libc/sys/utimes.2 Wed Aug 17 08:29:20 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: utimes.2,v 1.27 2011/08/17 07:22:33 manu Exp $ +.\ $NetBSD: utimes.2,v 1.28 2011/08/17 08:29:20 wiz Exp $ .\ .\ Copyright (c) 1990, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ @(#)utimes.2 8.1 (Berkeley) 6/4/93 .\ -.Dd April 29, 2010 +.Dd August 17, 2011 .Dt UTIMES 2 .Os .Sh NAME @@ -52,8 +52,7 @@ .Ft int .Fn futimens int fd const struct timespec times[2] .Ft int -.Fn utimensat int fd const char *path const struct timespec times[2] \ -int flag +.Fn utimensat int fd const char *path const struct timespec times[2] int flag .Sh DESCRIPTION The access and modification times of the file named by .Fa path @@ -106,9 +105,9 @@ .Fn futimes except that time is specified with nanosecond instead of microseconds. .Pp -.Fn utimensat -also allows time to be specifed with nanoseconds. When it operates on -a symbolic link, it will change the target's time if +.Fn utimensat +also allows time to be specifed with nanoseconds. +When it operates on a symbolic link, it will change the target's time if .Ar follow is unset. If @@ -121,7 +120,7 @@ .Fn futimes and .Fn utimensat -can be set to the special value +can be set to the special value .Dv UTIME_NOW to set the current time, or to .Dv UTIME_OMIT @@ -132,7 +131,7 @@ is partially implemented. It will return .Er ENOSYS -for +for .Fa fd values different than .Dv AT_FDCWD . @@ -230,9 +229,9 @@ It was however marked as legacy in the .St -p1003.1-2004 revision. -.Fn futimens +.Fn futimens and -.Fn utmensat +.Fn utmensat functions conform to .St -p1003.1-2008 . .Sh HISTORY @@ -254,7 +253,7 @@ and .Fn utimensat functions calls appreared in -.Nx 6.0 +.Nx 6.0 . .Sh BUGS .Fn utimensat is partially implemented.
CVS commit: src/sys/kern
Module Name:src Committed By: martin Date: Wed Aug 17 08:31:27 UTC 2011 Modified Files: src/sys/kern: vfs_syscalls.c Log Message: add missing prototype To generate a diff of this commit: cvs rdiff -u -r1.434 -r1.435 src/sys/kern/vfs_syscalls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_syscalls.c diff -u src/sys/kern/vfs_syscalls.c:1.434 src/sys/kern/vfs_syscalls.c:1.435 --- src/sys/kern/vfs_syscalls.c:1.434 Wed Aug 17 07:22:34 2011 +++ src/sys/kern/vfs_syscalls.c Wed Aug 17 08:31:27 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.434 2011/08/17 07:22:34 manu Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.435 2011/08/17 08:31:27 martin Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.434 2011/08/17 07:22:34 manu Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.435 2011/08/17 08:31:27 martin Exp $); #ifdef _KERNEL_OPT #include opt_fileassoc.h @@ -117,6 +117,8 @@ static int change_flags(struct vnode *, u_long, struct lwp *); static int change_mode(struct vnode *, int, struct lwp *l); static int change_owner(struct vnode *, uid_t, gid_t, struct lwp *, int); +int do_sys_utimens(struct lwp *l, struct vnode *vp, const char *path, + int flag, const struct timespec *tptr, enum uio_seg seg); /* * This table is used to maintain compatibility with 4.3BSD
CVS commit: src/external/bsd/am-utils
Module Name:src Committed By: christos Date: Wed Aug 17 09:03:47 UTC 2011 Modified Files: src/external/bsd/am-utils/bin/amd: Makefile src/external/bsd/am-utils/bin/amq: Makefile src/external/bsd/am-utils/bin/hlfsd: Makefile src/external/bsd/am-utils/dist/hlfsd: stubs.c Log Message: fix aliasing issues and remove gcc hacks. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/bsd/am-utils/bin/amd/Makefile cvs rdiff -u -r1.3 -r1.4 src/external/bsd/am-utils/bin/amq/Makefile cvs rdiff -u -r1.2 -r1.3 src/external/bsd/am-utils/bin/hlfsd/Makefile cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/am-utils/dist/hlfsd/stubs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/am-utils/bin/amd/Makefile diff -u src/external/bsd/am-utils/bin/amd/Makefile:1.8 src/external/bsd/am-utils/bin/amd/Makefile:1.9 --- src/external/bsd/am-utils/bin/amd/Makefile:1.8 Tue Jun 21 22:49:42 2011 +++ src/external/bsd/am-utils/bin/amd/Makefile Wed Aug 17 05:03:47 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2011/06/22 02:49:42 mrg Exp $ +# $NetBSD: Makefile,v 1.9 2011/08/17 09:03:47 christos Exp $ .include ${.CURDIR}/../Makefile.inc @@ -44,10 +44,6 @@ SRCS+= info_nis.c .endif -.if defined(HAVE_GCC) -COPTS.amq_subr.c+= -fno-strict-aliasing -.endif - # the following are not supported on NetBSD # info_ldap.c info_nisplus.c ops_cachefs.c ops_efs.c ops_lofs.c ops_xfs.c MAN+= amd.8 @@ -83,8 +79,3 @@ .include bsd.prog.mk - -# XXX -.if ${HAVE_GCC} == 45 -COPTS.readdir.c+= -fno-strict-aliasing -.endif Index: src/external/bsd/am-utils/bin/amq/Makefile diff -u src/external/bsd/am-utils/bin/amq/Makefile:1.3 src/external/bsd/am-utils/bin/amq/Makefile:1.4 --- src/external/bsd/am-utils/bin/amq/Makefile:1.3 Mon Jun 20 03:43:57 2011 +++ src/external/bsd/am-utils/bin/amq/Makefile Wed Aug 17 05:03:47 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2011/06/20 07:43:57 mrg Exp $ +# $NetBSD: Makefile,v 1.4 2011/08/17 09:03:47 christos Exp $ .include ${.CURDIR}/../Makefile.inc @@ -13,9 +13,4 @@ CPPFLAGS+= -I${DIST} LDADD+= ${LIBAMU} -.if defined(HAVE_GCC) -COPTS.amq_xdr.c+= -fno-strict-aliasing -COPTS.amq.c+= -fno-strict-aliasing -.endif - .include bsd.prog.mk Index: src/external/bsd/am-utils/bin/hlfsd/Makefile diff -u src/external/bsd/am-utils/bin/hlfsd/Makefile:1.2 src/external/bsd/am-utils/bin/hlfsd/Makefile:1.3 --- src/external/bsd/am-utils/bin/hlfsd/Makefile:1.2 Tue Jun 21 22:49:42 2011 +++ src/external/bsd/am-utils/bin/hlfsd/Makefile Wed Aug 17 05:03:47 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2011/06/22 02:49:42 mrg Exp $ +# $NetBSD: Makefile,v 1.3 2011/08/17 09:03:47 christos Exp $ .include ${.CURDIR}/../Makefile.inc @@ -14,8 +14,3 @@ LDADD+= ${LIBAMU} -lrpcsvc .include bsd.prog.mk - -# XXX -.if ${HAVE_GCC} == 45 -COPTS.stubs.c+= -fno-strict-aliasing -.endif Index: src/external/bsd/am-utils/dist/hlfsd/stubs.c diff -u src/external/bsd/am-utils/dist/hlfsd/stubs.c:1.1.1.2 src/external/bsd/am-utils/dist/hlfsd/stubs.c:1.2 --- src/external/bsd/am-utils/dist/hlfsd/stubs.c:1.1.1.2 Fri Mar 20 16:26:55 2009 +++ src/external/bsd/am-utils/dist/hlfsd/stubs.c Wed Aug 17 05:03:47 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: stubs.c,v 1.1.1.2 2009/03/20 20:26:55 christos Exp $ */ +/* $NetBSD: stubs.c,v 1.2 2011/08/17 09:03:47 christos Exp $ */ /* * Copyright (c) 1997-2009 Erez Zadok @@ -166,8 +166,9 @@ if (gid != hlfs_gid) { res.ns_status = NFSERR_STALE; } else { - memset((char *) uid, 0, sizeof(int)); - uid = *(u_int *) argp-fh_data; + u_int xuid; + memcpy(xuid, argp-fh_data, sizeof(xuid)); + uid = xuid; if (plt_search(uid) != (uid2home_t *) NULL) { res.ns_status = NFS_OK; un_fattr.na_fileid = uid; @@ -282,13 +283,15 @@ res.dr_status = NFSERR_NOENT; return res; } else { /* entry found and gid is permitted */ + u_int xuid; un_fattr.na_fileid = untab[idx].uid; res.dr_u.dr_drok_u.drok_attributes = un_fattr; - memset((char *) un_fhandle, 0, sizeof(am_nfs_fh)); - *(u_int *) un_fhandle.fh_data = (u_int) untab[idx].uid; - xstrlcpy((char *) un_fhandle.fh_data[sizeof(int)], + memset(un_fhandle, 0, sizeof(am_nfs_fh)); + xuid = (u_int) untab[idx].uid; + memcpy(un_fhandle.fh_data, xuid, sizeof(xuid)); + xstrlcpy((char *) un_fhandle.fh_data[sizeof(xuid)], untab[idx].username, - sizeof(am_nfs_fh) - sizeof(int)); + sizeof(am_nfs_fh) - sizeof(xuid)); res.dr_u.dr_drok_u.drok_fhandle = un_fhandle; res.dr_status = NFS_OK; dlog(nfs_lookup: successful lookup for uid=%ld, gid=%ld: username=%s, @@ -309,7 +312,7 @@ uid_t userid = (uid_t) INVALIDID; gid_t groupid = hlfs_gid + 1; /* anything not hlfs_gid */ int retval = 0; - char *path_val = (char *) NULL; + char *path_val = NULL; char *username;
CVS commit: src
Module Name:src Committed By: mrg Date: Wed Aug 17 09:18:38 UTC 2011 Modified Files: src: UPDATING src/doc: CHANGES src/share/mk: bsd.own.mk Log Message: switch sparc to GCC 4.5.3. To generate a diff of this commit: cvs rdiff -u -r1.227 -r1.228 src/UPDATING cvs rdiff -u -r1.1595 -r1.1596 src/doc/CHANGES cvs rdiff -u -r1.678 -r1.679 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/UPDATING diff -u src/UPDATING:1.227 src/UPDATING:1.228 --- src/UPDATING:1.227 Fri Aug 12 03:26:51 2011 +++ src/UPDATING Wed Aug 17 09:18:38 2011 @@ -1,4 +1,4 @@ -$NetBSD: UPDATING,v 1.227 2011/08/12 03:26:51 riastradh Exp $ +$NetBSD: UPDATING,v 1.228 2011/08/17 09:18:38 mrg Exp $ This file (UPDATING) is intended to be a brief reference to recent changes that might cause problems in the build process, and a guide for @@ -15,6 +15,10 @@ Recent changes: ^^^ +20110817: + sparc has been changed to use GCC 4.5.3, so any objdir or + DESTDIR for them should be deleted before updating. + 20110806: i386 and amd64 have been changed to use GCC 4.5.3, so any objdir or DESTDIR for them should be deleted before updating. Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1595 src/doc/CHANGES:1.1596 --- src/doc/CHANGES:1.1595 Tue Aug 16 07:05:15 2011 +++ src/doc/CHANGES Wed Aug 17 09:18:37 2011 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1595 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1596 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -1105,4 +1105,5 @@ cards. [mbalmer 20110811] gpio(4), gpiosim(4): Build as modules. [mbalmer 20110812] mips: add support for MIPS DSP v2 ASE. [matt 20110815] + sparc: Switch to GCC 4.5.3 [mrg 20110817] Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.678 src/share/mk/bsd.own.mk:1.679 --- src/share/mk/bsd.own.mk:1.678 Sun Aug 7 08:15:02 2011 +++ src/share/mk/bsd.own.mk Wed Aug 17 09:18:38 2011 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.678 2011/08/07 08:15:02 mrg Exp $ +# $NetBSD: bsd.own.mk,v 1.679 2011/08/17 09:18:38 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -52,6 +52,7 @@ .if ${MACHINE_ARCH} == i386 || \ ${MACHINE_CPU} == mips || \ ${MACHINE_ARCH} == powerpc || \ +${MACHINE_ARCH} == sparc|| \ ${MACHINE_ARCH} == sparc64 || \ ${MACHINE_ARCH} == x86_64 HAVE_GCC?=45
CVS commit: src/external/bsd/fetch/dist/libfetch
Module Name:src Committed By: christos Date: Wed Aug 17 09:19:38 UTC 2011 Modified Files: src/external/bsd/fetch/dist/libfetch: ftp.c Log Message: fix gcc array out of bounds confusion. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/fetch/dist/libfetch/ftp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/fetch/dist/libfetch/ftp.c diff -u src/external/bsd/fetch/dist/libfetch/ftp.c:1.4 src/external/bsd/fetch/dist/libfetch/ftp.c:1.5 --- src/external/bsd/fetch/dist/libfetch/ftp.c:1.4 Sat Jun 25 16:27:01 2011 +++ src/external/bsd/fetch/dist/libfetch/ftp.c Wed Aug 17 05:19:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ftp.c,v 1.4 2011/06/25 20:27:01 christos Exp $ */ +/* $NetBSD: ftp.c,v 1.5 2011/08/17 09:19:38 christos Exp $ */ /*- * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav * Copyright (c) 2008, 2009, 2010 Joerg Sonnenberger jo...@netbsd.org @@ -860,7 +860,6 @@ int arg; #endif int d; - char *ap; char hname[INET6_ADDRSTRLEN]; switch (u.ss.ss_family) { @@ -903,7 +902,6 @@ ((unsigned int)p 8) 0xff, p 0xff); break; case AF_INET6: -#define UC(b) (((int)b)0xff) e = -1; u.sin6.sin6_scope_id = 0; if (getnameinfo(u.sa, l, @@ -915,17 +913,18 @@ goto ouch; } if (e != FTP_OK) { -ap = (char *)(void *)u.sin6.sin6_addr; +uint8_t aa[sizeof(u.sin6.sin6_addr)]; +memcpy(aa, u.sin6.sin6_addr, sizeof(aa)); +p = ntohs(u.sin6.sin6_port); e = ftp_cmd(conn, LPRT %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\r\n, 6, 16, -UC(ap[0]), UC(ap[1]), UC(ap[2]), UC(ap[3]), -UC(ap[4]), UC(ap[5]), UC(ap[6]), UC(ap[7]), -UC(ap[8]), UC(ap[9]), UC(ap[10]), UC(ap[11]), -UC(ap[12]), UC(ap[13]), UC(ap[14]), UC(ap[15]), +aa[ 0], aa[ 1], aa[ 2], aa[ 3], +aa[ 4], aa[ 5], aa[ 6], aa[ 7], +aa[ 8], aa[ 9], aa[10], aa[11], +aa[12], aa[13], aa[14], aa[15], 2, -((unsigned int)ntohs(u.sin6.sin6_port) 8) 0xff, -ntohs(u.sin6.sin6_port) 0xff); +((unsigned int)p 8) 0xff, p 0xff); } break; default:
CVS commit: src/external/bsd/fetch/lib
Module Name:src Committed By: christos Date: Wed Aug 17 09:20:14 UTC 2011 Modified Files: src/external/bsd/fetch/lib: Makefile Log Message: remove gcc hacks. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/fetch/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/fetch/lib/Makefile diff -u src/external/bsd/fetch/lib/Makefile:1.7 src/external/bsd/fetch/lib/Makefile:1.8 --- src/external/bsd/fetch/lib/Makefile:1.7 Tue Aug 9 09:00:58 2011 +++ src/external/bsd/fetch/lib/Makefile Wed Aug 17 05:20:14 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2011/08/09 13:00:58 joerg Exp $ +# $NetBSD: Makefile,v 1.8 2011/08/17 09:20:14 christos Exp $ LIB= fetch SRCS= fetch.c common.c ftp.c http.c file.c @@ -37,8 +37,3 @@ ${LIBFETCHDIR}/http.errors ${.TARGET} .include bsd.lib.mk - -.if ${HAVE_GCC} == 45 -# XXX -COPTS.ftp.c+= ${${ACTIVE_CC} == gcc:?-Wno-array-bounds:} -.endif
CVS commit: src/external/bsd/iscsi
Module Name:src Committed By: christos Date: Wed Aug 17 09:24:24 UTC 2011 Modified Files: src/external/bsd/iscsi/dist/src/initiator: iscsi-initiator.c src/external/bsd/iscsi/initiator: Makefile Log Message: fix strict aliasing issues. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.c cvs rdiff -u -r1.4 -r1.5 src/external/bsd/iscsi/initiator/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.c diff -u src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.c:1.7 src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.c:1.8 --- src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.c:1.7 Tue Feb 22 08:04:31 2011 +++ src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.c Wed Aug 17 05:24:23 2011 @@ -163,12 +163,14 @@ iscsi_err(__FILE__, __LINE__, READ_CAPACITY failed (status %#x)\n, args.status); return -1; } - *maxlba = ISCSI_NTOHL(*((uint32_t *) (data))); - *blocklen = ISCSI_NTOHL(*((uint32_t *) (data + 4))); + memcpy(maxlba, data, sizeof(*maxlba)); + *maxlba = ISCSI_NTOHL(*maxlba); if (*maxlba == 0) { iscsi_err(__FILE__, __LINE__, Device returned Maximum LBA of zero\n); return -1; } + memcpy(blocklen, data + 4, sizeof(*blocklen)); + *blocklen = ISCSI_NTOHL(*blocklen); if (*blocklen % 2) { iscsi_err(__FILE__, __LINE__, Device returned strange block len: %u\n, *blocklen); return -1; Index: src/external/bsd/iscsi/initiator/Makefile diff -u src/external/bsd/iscsi/initiator/Makefile:1.4 src/external/bsd/iscsi/initiator/Makefile:1.5 --- src/external/bsd/iscsi/initiator/Makefile:1.4 Tue Jun 21 22:49:42 2011 +++ src/external/bsd/iscsi/initiator/Makefile Wed Aug 17 05:24:23 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2011/06/22 02:49:42 mrg Exp $ +# $NetBSD: Makefile,v 1.5 2011/08/17 09:24:23 christos Exp $ .sinclude ${.CURDIR}/../Makefile.inc @@ -26,8 +26,3 @@ .endif .include bsd.prog.mk - -# XXX -.if ${HAVE_GCC} == 45 -COPTS.iscsi-initiator.c+= -fno-strict-aliasing -.endif
CVS commit: src/sys
Module Name:src Committed By: manu Date: Wed Aug 17 09:29:59 UTC 2011 Modified Files: src/sys/kern: vfs_syscalls.c src/sys/sys: vfs_syscalls.h Log Message: Missing bit in previous commit: do_sys_utimens prototype in the right place. To generate a diff of this commit: cvs rdiff -u -r1.435 -r1.436 src/sys/kern/vfs_syscalls.c cvs rdiff -u -r1.15 -r1.16 src/sys/sys/vfs_syscalls.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_syscalls.c diff -u src/sys/kern/vfs_syscalls.c:1.435 src/sys/kern/vfs_syscalls.c:1.436 --- src/sys/kern/vfs_syscalls.c:1.435 Wed Aug 17 08:31:27 2011 +++ src/sys/kern/vfs_syscalls.c Wed Aug 17 09:29:59 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.435 2011/08/17 08:31:27 martin Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.436 2011/08/17 09:29:59 manu Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.435 2011/08/17 08:31:27 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.436 2011/08/17 09:29:59 manu Exp $); #ifdef _KERNEL_OPT #include opt_fileassoc.h @@ -117,8 +117,6 @@ static int change_flags(struct vnode *, u_long, struct lwp *); static int change_mode(struct vnode *, int, struct lwp *l); static int change_owner(struct vnode *, uid_t, gid_t, struct lwp *, int); -int do_sys_utimens(struct lwp *l, struct vnode *vp, const char *path, - int flag, const struct timespec *tptr, enum uio_seg seg); /* * This table is used to maintain compatibility with 4.3BSD Index: src/sys/sys/vfs_syscalls.h diff -u src/sys/sys/vfs_syscalls.h:1.15 src/sys/sys/vfs_syscalls.h:1.16 --- src/sys/sys/vfs_syscalls.h:1.15 Sun Jun 5 09:04:22 2011 +++ src/sys/sys/vfs_syscalls.h Wed Aug 17 09:29:59 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.h,v 1.15 2011/06/05 09:04:22 dsl Exp $*/ +/* $NetBSD: vfs_syscalls.h,v 1.16 2011/08/17 09:29:59 manu Exp $*/ /* * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -54,6 +54,8 @@ int do_sys_utimes(struct lwp *, struct vnode *, const char *, int, const struct timeval *, enum uio_seg); +int do_sys_utimens(struct lwp *, struct vnode *, const char *, int flag, +const struct timespec *, enum uio_seg); int vfs_copyinfh_alloc(const void *, size_t, fhandle_t **); void vfs_copyinfh_free(fhandle_t *);
CVS commit: src/external/bsd/mdocml
Module Name:src Committed By: christos Date: Wed Aug 17 09:30:14 UTC 2011 Modified Files: src/external/bsd/mdocml/dist: mdoc_validate.c src/external/bsd/mdocml/lib/libmandoc: Makefile Log Message: fix cast warnings To generate a diff of this commit: cvs rdiff -u -r1.1.1.13 -r1.2 src/external/bsd/mdocml/dist/mdoc_validate.c cvs rdiff -u -r1.2 -r1.3 src/external/bsd/mdocml/lib/libmandoc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/mdocml/dist/mdoc_validate.c diff -u src/external/bsd/mdocml/dist/mdoc_validate.c:1.1.1.13 src/external/bsd/mdocml/dist/mdoc_validate.c:1.2 --- src/external/bsd/mdocml/dist/mdoc_validate.c:1.1.1.13 Fri Apr 15 09:45:35 2011 +++ src/external/bsd/mdocml/dist/mdoc_validate.c Wed Aug 17 05:30:13 2011 @@ -723,7 +723,7 @@ if (LIST_column == lt) { n-norm-Bl.ncols = n-args-argv[i].sz; -n-norm-Bl.cols = (const char **) +n-norm-Bl.cols = (void *) n-args-argv[i].value; } } @@ -1537,7 +1537,7 @@ ((size_t)mdoc-last-nchild * sizeof(char *)); mdoc-last-norm-Bl.ncols = np-args-argv[j].sz; - mdoc-last-norm-Bl.cols = (const char **)np-args-argv[j].value; + mdoc-last-norm-Bl.cols = (void *)np-args-argv[j].value; for (i = 0, nn = mdoc-last-child; nn; i++) { np-args-argv[j].value[i] = nn-string; Index: src/external/bsd/mdocml/lib/libmandoc/Makefile diff -u src/external/bsd/mdocml/lib/libmandoc/Makefile:1.2 src/external/bsd/mdocml/lib/libmandoc/Makefile:1.3 --- src/external/bsd/mdocml/lib/libmandoc/Makefile:1.2 Tue Jun 21 22:49:42 2011 +++ src/external/bsd/mdocml/lib/libmandoc/Makefile Wed Aug 17 05:30:13 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2011/06/22 02:49:42 mrg Exp $ +# $NetBSD: Makefile,v 1.3 2011/08/17 09:30:13 christos Exp $ LIBISPRIVATE= yes @@ -11,8 +11,3 @@ MAN= mandoc.3 .include bsd.lib.mk - -# XXX -.if ${HAVE_GCC} == 45 -COPTS.mdoc_validate.c+= -Wno-error -.endif
CVS commit: [cherry-xenmp] src/sys/arch
Module Name:src Committed By: cherry Date: Wed Aug 17 09:40:40 UTC 2011 Modified Files: src/sys/arch/i386/include [cherry-xenmp]: cpu.h src/sys/arch/x86/include [cherry-xenmp]: cpu.h src/sys/arch/x86/x86 [cherry-xenmp]: pmap.c src/sys/arch/xen/include [cherry-xenmp]: evtchn.h intr.h xenpmap.h src/sys/arch/xen/x86 [cherry-xenmp]: cpu.c hypervisor_machdep.c intr.c x86_xpmap.c xen_ipi.c src/sys/arch/xen/xen [cherry-xenmp]: evtchn.c xentests.c Log Message: Pullup relevant changes from -current To generate a diff of this commit: cvs rdiff -u -r1.176 -r1.176.12.1 src/sys/arch/i386/include/cpu.h cvs rdiff -u -r1.34.2.3 -r1.34.2.4 src/sys/arch/x86/include/cpu.h cvs rdiff -u -r1.121.2.4 -r1.121.2.5 src/sys/arch/x86/x86/pmap.c cvs rdiff -u -r1.18.10.2 -r1.18.10.3 src/sys/arch/xen/include/evtchn.h cvs rdiff -u -r1.31.10.3 -r1.31.10.4 src/sys/arch/xen/include/intr.h cvs rdiff -u -r1.27.2.2 -r1.27.2.3 src/sys/arch/xen/include/xenpmap.h cvs rdiff -u -r1.56.2.5 -r1.56.2.6 src/sys/arch/xen/x86/cpu.c cvs rdiff -u -r1.14.2.2 -r1.14.2.3 src/sys/arch/xen/x86/hypervisor_machdep.c cvs rdiff -u -r1.27.6.1 -r1.27.6.2 src/sys/arch/xen/x86/intr.c cvs rdiff -u -r1.26.2.5 -r1.26.2.6 src/sys/arch/xen/x86/x86_xpmap.c cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/xen/x86/xen_ipi.c cvs rdiff -u -r1.47.6.3 -r1.47.6.4 src/sys/arch/xen/xen/evtchn.c cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/xen/xen/xentests.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/cpu.h diff -u src/sys/arch/i386/include/cpu.h:1.176 src/sys/arch/i386/include/cpu.h:1.176.12.1 --- src/sys/arch/i386/include/cpu.h:1.176 Mon Dec 29 19:59:09 2008 +++ src/sys/arch/i386/include/cpu.h Wed Aug 17 09:40:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.176 2008/12/29 19:59:09 pooka Exp $ */ +/* $NetBSD: cpu.h,v 1.176.12.1 2011/08/17 09:40:39 cherry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -68,6 +68,7 @@ (*(struct cpu_info * const *)offsetof(struct cpu_info, ci_curlwp))); return l; } + __inline static void __unused cpu_set_curpri(int pri) { Index: src/sys/arch/x86/include/cpu.h diff -u src/sys/arch/x86/include/cpu.h:1.34.2.3 src/sys/arch/x86/include/cpu.h:1.34.2.4 --- src/sys/arch/x86/include/cpu.h:1.34.2.3 Sat Jul 16 10:59:45 2011 +++ src/sys/arch/x86/include/cpu.h Wed Aug 17 09:40:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.34.2.3 2011/07/16 10:59:45 cherry Exp $ */ +/* $NetBSD: cpu.h,v 1.34.2.4 2011/08/17 09:40:39 cherry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -67,8 +67,6 @@ #include sys/evcnt.h #include sys/device_if.h /* for device_t */ -#include sys/device_if.h /* for device_t */ - #ifdef XEN #include xen/xen3-public/xen.h #include xen/xen3-public/event_channel.h @@ -316,6 +314,8 @@ void cpu_init_idle_lwps(void); void cpu_init_msrs(struct cpu_info *, bool); void cpu_load_pmap(struct pmap *); +void cpu_broadcast_halt(void); +void cpu_kick(struct cpu_info *); extern uint32_t cpus_attached; Index: src/sys/arch/x86/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.121.2.4 src/sys/arch/x86/x86/pmap.c:1.121.2.5 --- src/sys/arch/x86/x86/pmap.c:1.121.2.4 Sun Jul 31 20:49:11 2011 +++ src/sys/arch/x86/x86/pmap.c Wed Aug 17 09:40:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.121.2.4 2011/07/31 20:49:11 cherry Exp $ */ +/* $NetBSD: pmap.c,v 1.121.2.5 2011/08/17 09:40:39 cherry Exp $ */ /*- * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. @@ -171,7 +171,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.121.2.4 2011/07/31 20:49:11 cherry Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.121.2.5 2011/08/17 09:40:39 cherry Exp $); #include opt_user_ldt.h #include opt_lockdebug.h @@ -1619,10 +1619,6 @@ VM_PROT_READ | VM_PROT_WRITE, 0); pmap_update(pmap_kernel()); - - xpq_queue_lock(); - xpq_queue_pin_l3_table(xpmap_ptom_masked(ci-ci_pae_l3_pdirpa)); - xpq_queue_unlock(); #endif #if defined(XEN) defined (__x86_64) KASSERT(ci != NULL); Index: src/sys/arch/xen/include/evtchn.h diff -u src/sys/arch/xen/include/evtchn.h:1.18.10.2 src/sys/arch/xen/include/evtchn.h:1.18.10.3 --- src/sys/arch/xen/include/evtchn.h:1.18.10.2 Thu Aug 4 09:07:46 2011 +++ src/sys/arch/xen/include/evtchn.h Wed Aug 17 09:40:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: evtchn.h,v 1.18.10.2 2011/08/04 09:07:46 cherry Exp $ */ +/* $NetBSD: evtchn.h,v 1.18.10.3 2011/08/17 09:40:39 cherry Exp $ */ /* * @@ -41,10 +41,9 @@ int event_set_handler(int, int (*func)(void *), void *, int, const char *); int event_remove_handler(int, int (*func)(void *), void *); +struct cpu_info; struct intrhand; -void event_set_iplhandler(struct cpu_info *ci, - struct intrhand *, - int); +void event_set_iplhandler(struct cpu_info *, struct intrhand *, int); extern int
CVS commit: src/lib/libc
Module Name:src Committed By: christos Date: Wed Aug 17 09:53:54 UTC 2011 Modified Files: src/lib/libc: Makefile src/lib/libc/resolv: res_comp.c src/lib/libc/stdio: vfwprintf.c vswprintf.c Log Message: fix the rest of libc mi gcc-4.5 hacks. portmasters should fix the md ones. To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/lib/libc/Makefile cvs rdiff -u -r1.10 -r1.11 src/lib/libc/resolv/res_comp.c cvs rdiff -u -r1.23 -r1.24 src/lib/libc/stdio/vfwprintf.c cvs rdiff -u -r1.1 -r1.2 src/lib/libc/stdio/vswprintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/Makefile diff -u src/lib/libc/Makefile:1.147 src/lib/libc/Makefile:1.148 --- src/lib/libc/Makefile:1.147 Mon Jun 20 22:32:55 2011 +++ src/lib/libc/Makefile Wed Aug 17 05:53:53 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.147 2011/06/21 02:32:55 mrg Exp $ +# $NetBSD: Makefile,v 1.148 2011/08/17 09:53:53 christos Exp $ # @(#)Makefile 8.2 (Berkeley) 2/3/94 # # All library objects contain sccsid strings by default; they may be @@ -146,11 +146,3 @@ # force the dynamic linker to initialize libc first SHLIB_SHFLAGS+= -Wl,-z,initfirst - -# XXX -.if ${HAVE_GCC} = 45 -COPTS.res_comp.c+= -Wno-cast-qual -COPTS.vfwprintf.c+= -Wno-cast-qual -COPTS.vfprintf.c+= -Wno-cast-qual -COPTS.vswprintf.c+= -Wno-cast-qual -.endif Index: src/lib/libc/resolv/res_comp.c diff -u src/lib/libc/resolv/res_comp.c:1.10 src/lib/libc/resolv/res_comp.c:1.11 --- src/lib/libc/resolv/res_comp.c:1.10 Sun Apr 12 13:07:17 2009 +++ src/lib/libc/resolv/res_comp.c Wed Aug 17 05:53:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: res_comp.c,v 1.10 2009/04/12 17:07:17 christos Exp $ */ +/* $NetBSD: res_comp.c,v 1.11 2011/08/17 09:53:53 christos Exp $ */ /* * Copyright (c) 1985, 1993 @@ -75,7 +75,7 @@ static const char sccsid[] = @(#)res_comp.c 8.1 (Berkeley) 6/4/93; static const char rcsid[] = Id: res_comp.c,v 1.5 2005/07/28 06:51:50 marka Exp; #else -__RCSID($NetBSD: res_comp.c,v 1.10 2009/04/12 17:07:17 christos Exp $); +__RCSID($NetBSD: res_comp.c,v 1.11 2011/08/17 09:53:53 christos Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -135,8 +135,8 @@ u_char **dnptrs, u_char **lastdnptr) { return (ns_name_compress(src, dst, (size_t)dstsiz, - (const u_char **)dnptrs, - (const u_char **)lastdnptr)); + (void *)dnptrs, + (void *)lastdnptr)); } /*% Index: src/lib/libc/stdio/vfwprintf.c diff -u src/lib/libc/stdio/vfwprintf.c:1.23 src/lib/libc/stdio/vfwprintf.c:1.24 --- src/lib/libc/stdio/vfwprintf.c:1.23 Thu Dec 16 12:42:27 2010 +++ src/lib/libc/stdio/vfwprintf.c Wed Aug 17 05:53:54 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vfwprintf.c,v 1.23 2010/12/16 17:42:27 wiz Exp $ */ +/* $NetBSD: vfwprintf.c,v 1.24 2011/08/17 09:53:54 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -38,7 +38,7 @@ static char sccsid[] = @(#)vfprintf.c 8.1 (Berkeley) 6/4/93; __FBSDID($FreeBSD: src/lib/libc/stdio/vfwprintf.c,v 1.27 2007/01/09 00:28:08 imp Exp $); #else -__RCSID($NetBSD: vfwprintf.c,v 1.23 2010/12/16 17:42:27 wiz Exp $); +__RCSID($NetBSD: vfwprintf.c,v 1.24 2011/08/17 09:53:54 christos Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -494,7 +494,7 @@ if (prec 0) { p = wcsarg; mbs = initial; - nbytes = wcsrtombs(NULL, (const wchar_t **)p, 0, mbs); + nbytes = wcsrtombs(NULL, (void *)p, 0, mbs); if (nbytes == (size_t)-1) return (NULL); } else { @@ -524,7 +524,7 @@ /* Fill the output buffer. */ p = wcsarg; mbs = initial; - if ((nbytes = wcsrtombs(convbuf, (const wchar_t **)p, + if ((nbytes = wcsrtombs(convbuf, (void *)p, nbytes, mbs)) == (size_t)-1) { free(convbuf); return (NULL); Index: src/lib/libc/stdio/vswprintf.c diff -u src/lib/libc/stdio/vswprintf.c:1.1 src/lib/libc/stdio/vswprintf.c:1.2 --- src/lib/libc/stdio/vswprintf.c:1.1 Sat May 14 19:51:02 2005 +++ src/lib/libc/stdio/vswprintf.c Wed Aug 17 05:53:54 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vswprintf.c,v 1.1 2005/05/14 23:51:02 christos Exp $ */ +/* $NetBSD: vswprintf.c,v 1.2 2011/08/17 09:53:54 christos Exp $ */ /* * Copyright (c) 1997 Todd C. Miller todd.mil...@courtesan.com @@ -32,7 +32,7 @@ #if 0 __FBSDID($FreeBSD: src/lib/libc/stdio/vswprintf.c,v 1.6 2005/02/21 19:41:44 fjoe Exp $); #else -__RCSID($NetBSD: vswprintf.c,v 1.1 2005/05/14 23:51:02 christos Exp $); +__RCSID($NetBSD: vswprintf.c,v 1.2 2011/08/17 09:53:54 christos Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -84,7 +84,7 @@ * fputwc() did in __vfwprintf(). */ mbs = initial; - nwc = mbsrtowcs(s, (const char **)mbp, n, mbs); + nwc = mbsrtowcs(s, (void *)mbp, n, mbs); free(f._bf._base); if (nwc == (size_t)-1) { errno = EILSEQ;
CVS commit: src/dist/openpam/lib
Module Name:src Committed By: christos Date: Wed Aug 17 09:55:41 UTC 2011 Modified Files: src/dist/openpam/lib: openpam_dispatch.c Log Message: fix gcc-4.5 cast warning To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/dist/openpam/lib/openpam_dispatch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/openpam/lib/openpam_dispatch.c diff -u src/dist/openpam/lib/openpam_dispatch.c:1.4 src/dist/openpam/lib/openpam_dispatch.c:1.5 --- src/dist/openpam/lib/openpam_dispatch.c:1.4 Sat Jan 26 20:22:59 2008 +++ src/dist/openpam/lib/openpam_dispatch.c Wed Aug 17 05:55:41 2011 @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: openpam_dispatch.c,v 1.4 2008/01/27 01:22:59 christos Exp $ + * $Id: openpam_dispatch.c,v 1.5 2011/08/17 09:55:41 christos Exp $ */ #include sys/param.h @@ -121,7 +121,7 @@ _pam_sm_func_name[primitive], chain-module-path); #endif r = (chain-module-func[primitive])(pamh, flags, - chain-optc, (const char **)chain-optv); + chain-optc, (void *)chain-optv); pamh-current = NULL; #ifdef DEBUG openpam_log(PAM_LOG_DEBUG, %s: %s(): %s,
CVS commit: src/lib/libpam/libpam
Module Name:src Committed By: christos Date: Wed Aug 17 09:56:03 UTC 2011 Modified Files: src/lib/libpam/libpam: Makefile Log Message: remove gcc-4.5 hacks To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libpam/libpam/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpam/libpam/Makefile diff -u src/lib/libpam/libpam/Makefile:1.12 src/lib/libpam/libpam/Makefile:1.13 --- src/lib/libpam/libpam/Makefile:1.12 Mon Jun 20 22:32:55 2011 +++ src/lib/libpam/libpam/Makefile Wed Aug 17 05:56:03 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2011/06/21 02:32:55 mrg Exp $ +# $NetBSD: Makefile,v 1.13 2011/08/17 09:56:03 christos Exp $ #- # Copyright (c) 1998 Juniper Networks, Inc. # All rights reserved. @@ -191,8 +191,3 @@ .PATH.h: ${DIST}/include .PATH.c: ${DIST}/lib .PATH.3: ${DIST}/doc/man - -# XXX -.if ${HAVE_GCC} = 45 -COPTS.openpam_dispatch.c+= -Wno-cast-qual -.endif
CVS commit: src/lib/libisns
Module Name:src Committed By: christos Date: Wed Aug 17 10:08:43 UTC 2011 Modified Files: src/lib/libisns: Makefile isns_pdu.h isns_util.h Log Message: fix gcc aliasing issues. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libisns/Makefile cvs rdiff -u -r1.1.1.1 -r1.2 src/lib/libisns/isns_pdu.h \ src/lib/libisns/isns_util.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libisns/Makefile diff -u src/lib/libisns/Makefile:1.2 src/lib/libisns/Makefile:1.3 --- src/lib/libisns/Makefile:1.2 Mon Jun 20 22:32:55 2011 +++ src/lib/libisns/Makefile Wed Aug 17 06:08:43 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2011/06/21 02:32:55 mrg Exp $ +# $NetBSD: Makefile,v 1.3 2011/08/17 10:08:43 christos Exp $ .include bsd.own.mk @@ -14,7 +14,3 @@ WARNS= 4 .include bsd.lib.mk - -.if ${HAVE_GCC} = 45 -COPTS.isns_pdu.c+= -fno-strict-aliasing -.endif Index: src/lib/libisns/isns_pdu.h diff -u src/lib/libisns/isns_pdu.h:1.1.1.1 src/lib/libisns/isns_pdu.h:1.2 --- src/lib/libisns/isns_pdu.h:1.1.1.1 Sat Jan 15 20:22:50 2011 +++ src/lib/libisns/isns_pdu.h Wed Aug 17 06:08:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: isns_pdu.h,v 1.1.1.1 2011/01/16 01:22:50 agc Exp $ */ +/* $NetBSD: isns_pdu.h,v 1.2 2011/08/17 10:08:43 christos Exp $ */ /*- * Copyright (c) 2004,2009 The NetBSD Foundation, Inc. @@ -37,8 +37,10 @@ #define _ISNS_PDU_H_ #include pthread.h +#include string.h #include isns_defs.h +#include isns_util.h #define ISNSP_VERSION (0x0001) @@ -101,32 +103,36 @@ /* * TLV buffer access/manipulation-related macros. */ -#define ISNS_TLV_HDR_SIZE 8 +#define ISNS_TLV_HDR_SIZE (sizeof(uint32_t) * 2) #define ISNS_PAD4_LEN(n) (uint32_t)(((n)+3) ~0x03) #define ISNS_PAD4_BYTES(n) ((4 - ((n) 0x03)) 0x03) -#define ISNS_TLV_TAG_REF(_buf) \ - (*(uint32_t *)(void *)(_buf)) -#define ISNS_TLV_GET_TAG(_buf) \ - isns_ntohl(ISNS_TLV_TAG_REF(_buf)) -#define ISNS_TLV_SET_TAG(_buf, _tag)\ - do { \ - ISNS_TLV_TAG_REF(_buf) = isns_htonl(_tag); \ - } while (/* CONSTCOND */0) - -#define ISNS_TLV_LEN_REF(_buf) \ - (*(uint32_t *)(void *)((uint8_t *)(_buf)+4)) -#define ISNS_TLV_GET_LEN(_buf) \ - isns_ntohl(ISNS_TLV_LEN_REF(_buf)) -#define ISNS_TLV_SET_LEN(_buf, _len)\ - do { \ - ISNS_TLV_LEN_REF(_buf) = isns_htonl(_len); \ - } while (/* CONSTCOND */0) - -#define ISNS_TLV_DATA_PTR(_buf) \ - ((void *)((uint8_t *)(_buf)+8)) - +static inline uint32_t ISNS_TLV_GET_TAG(const void *buf) { + uint32_t tag; + memcpy(tag, buf, sizeof(tag)); + return isns_ntohl(tag); +} + +static inline void ISNS_TLV_SET_TAG(void *buf, uint32_t tag) { + tag = isns_htonl(tag); + memcpy(buf, tag, sizeof(tag)); +} + +static inline uint32_t ISNS_TLV_GET_LEN(const void *buf) { + uint32_t len; + memcpy(len, (const uint8_t *)buf + sizeof(len), sizeof(len)); + return isns_ntohl(len); +} + +static inline void ISNS_TLV_SET_LEN(void *buf, uint32_t len) { + len = isns_htonl(len); + memcpy((uint8_t *)buf + sizeof(len), len, sizeof(len)); +} + +static inline void *ISNS_TLV_DATA_PTR(void *buf) { + return (uint8_t *)buf + ISNS_TLV_HDR_SIZE; +} /* * ISNS transaction and PDU structs. Index: src/lib/libisns/isns_util.h diff -u src/lib/libisns/isns_util.h:1.1.1.1 src/lib/libisns/isns_util.h:1.2 --- src/lib/libisns/isns_util.h:1.1.1.1 Sat Jan 15 20:22:50 2011 +++ src/lib/libisns/isns_util.h Wed Aug 17 06:08:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: isns_util.h,v 1.1.1.1 2011/01/16 01:22:50 agc Exp $ */ +/* $NetBSD: isns_util.h,v 1.2 2011/08/17 10:08:43 christos Exp $ */ /*- * Copyright (c) 2004,2009 The NetBSD Foundation, Inc. @@ -48,6 +48,7 @@ #define ARRAY_ELEMS(a) (sizeof(a)/sizeof((a)[0])) +struct isns_config_s; int isns_issue_cmd(struct isns_config_s *, uint8_t); int isns_issue_cmd_with_data(struct isns_config_s *, uint8_t, uint8_t *, int);
CVS commit: src/sys/sys
Module Name:src Committed By: martin Date: Wed Aug 17 10:46:39 UTC 2011 Modified Files: src/sys/sys: bus_proto.h Log Message: Add missing prototypes for bus_*_is_equal functions. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/sys/bus_proto.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/bus_proto.h diff -u src/sys/sys/bus_proto.h:1.5 src/sys/sys/bus_proto.h:1.6 --- src/sys/sys/bus_proto.h:1.5 Wed May 25 22:58:29 2011 +++ src/sys/sys/bus_proto.h Wed Aug 17 10:46:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_proto.h,v 1.5 2011/05/25 22:58:29 dyoung Exp $ */ +/* $NetBSD: bus_proto.h,v 1.6 2011/08/17 10:46:38 martin Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001, 2007 The NetBSD Foundation, Inc. @@ -298,6 +298,10 @@ bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); +bool bus_space_is_equal(bus_space_tag_t, bus_space_tag_t); +bool bus_space_handle_is_equal(bus_space_tag_t, bus_space_handle_t, +bus_space_handle_t); + /* * bus_dma(9) */
CVS commit: src/external/bsd/tcpdump
Module Name:src Committed By: christos Date: Wed Aug 17 10:48:02 UTC 2011 Modified Files: src/external/bsd/tcpdump/bin: Makefile src/external/bsd/tcpdump/dist: extract.h print-isakmp.c Log Message: fix strict aliasing issues. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/tcpdump/bin/Makefile cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/tcpdump/dist/extract.h cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/print-isakmp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tcpdump/bin/Makefile diff -u src/external/bsd/tcpdump/bin/Makefile:1.6 src/external/bsd/tcpdump/bin/Makefile:1.7 --- src/external/bsd/tcpdump/bin/Makefile:1.6 Tue Jun 21 22:49:43 2011 +++ src/external/bsd/tcpdump/bin/Makefile Wed Aug 17 06:48:02 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2011/06/22 02:49:43 mrg Exp $ +# $NetBSD: Makefile,v 1.7 2011/08/17 10:48:02 christos Exp $ WARNS?= 1 # XXX: need to cleanup later @@ -89,8 +89,3 @@ cp ${.ALLSRC} ${.TARGET} .include bsd.prog.mk - -# XXX -.if ${HAVE_GCC} == 45 -COPTS+= -fno-strict-aliasing -.endif Index: src/external/bsd/tcpdump/dist/extract.h diff -u src/external/bsd/tcpdump/dist/extract.h:1.1.1.1 src/external/bsd/tcpdump/dist/extract.h:1.2 --- src/external/bsd/tcpdump/dist/extract.h:1.1.1.1 Sat Dec 4 22:15:01 2010 +++ src/external/bsd/tcpdump/dist/extract.h Wed Aug 17 06:48:02 2011 @@ -21,6 +21,97 @@ * @(#) Header: /tcpdump/master/tcpdump/extract.h,v 1.25 2006-01-30 16:20:07 hannes Exp (LBL) */ +#ifdef __NetBSD__ +#include string.h + +/* + * Do it the portable way and let the compiler optimize the code + */ +static inline uint16_t EXTRACT_16BITS(const void *p) +{ + uint16_t t; + memcpy(t, p, sizeof(t)); + return ntohs(t); +} + +static inline uint32_t EXTRACT_24BITS(const void *p) +{ + uint8_t t[3]; + memcpy(t, p, sizeof(t)); + return + ((uint32_t)t[0] 16) | + ((uint32_t)t[1] 8) | + t[2]; +} + +static inline uint32_t EXTRACT_32BITS(const void *p) +{ + uint32_t t; + memcpy(t, p, sizeof(t)); + return ntohl(t); +} + +static inline uint64_t EXTRACT_64BITS(const void *p) +{ + uint32_t t[2]; + memcpy(t[0], p, sizeof(t[0])); + memcpy(t[1], (const uint8_t *)p + sizeof(t[0]), sizeof(t[1])); + return ((uint64_t)ntohl(t[0]) 32) | ntohl(t[1]); +} + +static inline uint8_t EXTRACT_LE_8BITS(const void *p) +{ + uint8_t t[1]; + memcpy(t, p, sizeof(t)); + return t[0]; +} + +static inline uint16_t EXTRACT_LE_16BITS(const void *p) +{ + uint8_t t[2]; + memcpy(t, p, sizeof(t)); + return + ((uint16_t)t[1] 8) | + t[0]; +} + +static inline uint32_t EXTRACT_LE_24BITS(const void *p) +{ + uint8_t t[3]; + memcpy(t, p, sizeof(t)); + return + ((uint32_t)t[2] 16) | + ((uint32_t)t[1] 8) | + t[0]; +} + +static inline uint32_t EXTRACT_LE_32BITS(const void *p) +{ + uint8_t t[4]; + memcpy(t, p, sizeof(t)); + return + ((uint32_t)t[3] 24) | + ((uint32_t)t[2] 16) | + ((uint32_t)t[1] 8) | + t[0]; +} + +static inline uint64_t EXTRACT_LE_64BITS(const void *p) +{ + uint8_t t[8]; + memcpy(t, p, sizeof(t)); + return + ((uint64_t)t[7] 56) | + ((uint64_t)t[6] 48) | + ((uint64_t)t[5] 40) | + ((uint64_t)t[4] 32) | + ((uint64_t)t[3] 24) | + ((uint64_t)t[2] 16) | + ((uint64_t)t[1] 8) | + t[0]; +} + +#else /* Fast Loose */ /* * Macros to extract possibly-unaligned big-endian integral values. */ @@ -128,3 +219,4 @@ (u_int64_t)*((const u_int8_t *)(p) + 2) 16 | \ (u_int64_t)*((const u_int8_t *)(p) + 1) 8 | \ (u_int64_t)*((const u_int8_t *)(p) + 0))) +#endif /* __NetBSD__ */ Index: src/external/bsd/tcpdump/dist/print-isakmp.c diff -u src/external/bsd/tcpdump/dist/print-isakmp.c:1.2 src/external/bsd/tcpdump/dist/print-isakmp.c:1.3 --- src/external/bsd/tcpdump/dist/print-isakmp.c:1.2 Sun Dec 5 00:11:30 2010 +++ src/external/bsd/tcpdump/dist/print-isakmp.c Wed Aug 17 06:48:02 2011 @@ -34,7 +34,7 @@ static const char rcsid[] _U_ = @(#) Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.61 2008-02-05 19:34:25 guy Exp (LBL); #else -__RCSID($NetBSD: print-isakmp.c,v 1.2 2010/12/05 05:11:30 christos Exp $); +__RCSID($NetBSD: print-isakmp.c,v 1.3 2011/08/17 10:48:02 christos Exp $); #endif #endif @@ -2229,11 +2229,13 @@ u_char np; int i; int phase; + uint32_t msgid; p = (const struct isakmp *)bp; ep = ndo-ndo_snapend; - phase = (*(u_int32_t *)base-msgid == 0) ? 1 : 2; + memcpy(msgid, base-msgid, sizeof(msgid)); + phase = (msgid == 0) ? 1 : 2; if (phase == 1) ND_PRINT((ndo, phase %d, phase)); else @@ -2400,11 +2402,13 @@ const u_char *ep; u_char np; int phase; + uint32_t msgid; p = (const struct isakmp *)bp; ep = ndo-ndo_snapend; - phase = (*(u_int32_t *)base-msgid == 0) ? 1 : 2; + memcpy(msgid, base-msgid, sizeof(msgid)); + phase = (msgid == 0) ? 1 : 2; if (phase == 1)
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Wed Aug 17 12:03:47 UTC 2011 Modified Files: src/doc: 3RDPARTY Log Message: mdocml-1.11.6 is out To generate a diff of this commit: cvs rdiff -u -r1.858 -r1.859 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.858 src/doc/3RDPARTY:1.859 --- src/doc/3RDPARTY:1.858 Wed Aug 10 09:42:28 2011 +++ src/doc/3RDPARTY Wed Aug 17 12:03:47 2011 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.858 2011/08/10 09:42:28 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.859 2011/08/17 12:03:47 wiz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -650,7 +650,7 @@ Package: mdocml Version: 1.11.1 -Current Vers: 1.11.5 +Current Vers: 1.11.6 Maintainer: Kristaps Džonsons Archive Site: http://mdocml.bsd.lv/snapshots/ Home Page: http://mdocml.bsd.lv/
CVS commit: src/sbin/gpt
Module Name:src Committed By: martin Date: Wed Aug 17 12:27:50 UTC 2011 Modified Files: src/sbin/gpt: biosboot.c Log Message: Fix sign compare bugs To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sbin/gpt/biosboot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/biosboot.c diff -u src/sbin/gpt/biosboot.c:1.3 src/sbin/gpt/biosboot.c:1.4 --- src/sbin/gpt/biosboot.c:1.3 Wed Aug 17 00:45:55 2011 +++ src/sbin/gpt/biosboot.c Wed Aug 17 12:27:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: biosboot.c,v 1.3 2011/08/17 00:45:55 jakllsch Exp $ */ +/* $NetBSD: biosboot.c,v 1.4 2011/08/17 12:27:50 martin Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include sys/cdefs.h #ifdef __RCSID -__RCSID($NetBSD: biosboot.c,v 1.3 2011/08/17 00:45:55 jakllsch Exp $); +__RCSID($NetBSD: biosboot.c,v 1.4 2011/08/17 12:27:50 martin Exp $); #endif #include sys/stat.h @@ -212,7 +212,7 @@ hdr = gpt-map_data; - for (int j = 0; j le32toh(hdr-hdr_entries); j++) { + for (uint32_t j = 0; j le32toh(hdr-hdr_entries); j++) { ent = (void*)((char*)tbl-map_data + j * le32toh(hdr-hdr_entsz)); ent-ent_attr = ~GPT_ENT_ATTR_LEGACY_BIOS_BOOTABLE; } @@ -231,7 +231,7 @@ hdr = tpg-map_data; - for (int j = 0; j le32toh(hdr-hdr_entries); j++) { + for (uint32_t j = 0; j le32toh(hdr-hdr_entries); j++) { ent = (void*)((char*)lbt-map_data + j * le32toh(hdr-hdr_entsz)); ent-ent_attr = ~GPT_ENT_ATTR_LEGACY_BIOS_BOOTABLE; }
CVS commit: src/dist/nvi
Module Name:src Committed By: christos Date: Wed Aug 17 12:56:55 UTC 2011 Modified Files: src/dist/nvi/common: msg.c src/dist/nvi/ex: ex_tag.c Log Message: fix raw string formats To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/common/msg.c cvs rdiff -u -r1.9 -r1.10 src/dist/nvi/ex/ex_tag.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/nvi/common/msg.c diff -u src/dist/nvi/common/msg.c:1.4 src/dist/nvi/common/msg.c:1.5 --- src/dist/nvi/common/msg.c:1.4 Mon Mar 21 10:53:02 2011 +++ src/dist/nvi/common/msg.c Wed Aug 17 08:56:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.c,v 1.4 2011/03/21 14:53:02 tnozaki Exp $ */ +/* $NetBSD: msg.c,v 1.5 2011/08/17 12:56:55 christos Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -388,7 +388,7 @@ const char *nstr; if (str == NULL) { - msgq(sp, mtype, fmt); + msgq(sp, mtype, %s, fmt); return; } INT2CHAR(sp, str, STRLEN(str) + 1, nstr, nlen); @@ -408,7 +408,7 @@ char *p; if (str == NULL) { - msgq(sp, mtype, fmt); + msgq(sp, mtype, %s, fmt); return; } Index: src/dist/nvi/ex/ex_tag.c diff -u src/dist/nvi/ex/ex_tag.c:1.9 src/dist/nvi/ex/ex_tag.c:1.10 --- src/dist/nvi/ex/ex_tag.c:1.9 Mon Mar 21 10:53:03 2011 +++ src/dist/nvi/ex/ex_tag.c Wed Aug 17 08:56:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ex_tag.c,v 1.9 2011/03/21 14:53:03 tnozaki Exp $ */ +/* $NetBSD: ex_tag.c,v 1.10 2011/08/17 12:56:55 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -204,7 +204,7 @@ if (tqp-current-msg) { INT2CHAR(sp, tqp-current-msg, tqp-current-mlen + 1, np, nlen); - msgq(sp, M_INFO, np); + msgq(sp, M_INFO, %s, np); } return (0); }
CVS commit: src/usr.bin/nvi/build
Module Name:src Committed By: christos Date: Wed Aug 17 12:57:19 UTC 2011 Modified Files: src/usr.bin/nvi/build: Makefile Log Message: document non-literal format strings. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.bin/nvi/build/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/nvi/build/Makefile diff -u src/usr.bin/nvi/build/Makefile:1.15 src/usr.bin/nvi/build/Makefile:1.16 --- src/usr.bin/nvi/build/Makefile:1.15 Mon Jun 20 03:44:01 2011 +++ src/usr.bin/nvi/build/Makefile Wed Aug 17 08:57:19 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2011/06/20 07:44:01 mrg Exp $ +# $NetBSD: Makefile,v 1.16 2011/08/17 12:57:19 christos Exp $ .include bsd.own.mk @@ -61,4 +61,7 @@ .PATH: ${DIST}/regex .PATH: ${DIST}/docs/vi.man +COPTS.exf.c += -Wno-format-nonliteral +COPTS.msg.c += -Wno-format-nonliteral + .include bsd.prog.mk
CVS commit: src/usr.bin/error
Module Name:src Committed By: christos Date: Wed Aug 17 13:11:22 UTC 2011 Modified Files: src/usr.bin/error: error.h main.c pi.c Log Message: avoid ... dutch being interpreted as a pascal continuation message, and core-dumping. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/error/error.h src/usr.bin/error/pi.c cvs rdiff -u -r1.20 -r1.21 src/usr.bin/error/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/error/error.h diff -u src/usr.bin/error/error.h:1.17 src/usr.bin/error/error.h:1.18 --- src/usr.bin/error/error.h:1.17 Fri May 20 20:43:31 2011 +++ src/usr.bin/error/error.h Wed Aug 17 09:11:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: error.h,v 1.17 2011/05/21 00:43:31 christos Exp $ */ +/* $NetBSD: error.h,v 1.18 2011/08/17 13:11:22 christos Exp $ */ /* * Copyright (c) 1980, 1993 @@ -203,6 +203,7 @@ */ extern int language; extern char *currentfilename; +extern char default_currentfilename[]; /* * Macros for initializing arrays of string constants. Index: src/usr.bin/error/pi.c diff -u src/usr.bin/error/pi.c:1.17 src/usr.bin/error/pi.c:1.18 --- src/usr.bin/error/pi.c:1.17 Thu Aug 13 02:59:37 2009 +++ src/usr.bin/error/pi.c Wed Aug 17 09:11:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pi.c,v 1.17 2009/08/13 06:59:37 dholland Exp $ */ +/* $NetBSD: pi.c,v 1.18 2011/08/17 13:11:22 christos Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)pi.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: pi.c,v 1.17 2009/08/13 06:59:37 dholland Exp $); +__RCSID($NetBSD: pi.c,v 1.18 2011/08/17 13:11:22 christos Exp $); #endif /* not lint */ #include stdio.h @@ -364,7 +364,8 @@ cur_wordc += 1 + 3; return (C_THISFILE); } - if (strcmp(cur_wordv[1], ...) == 0) { + if (strcmp(cur_wordv[1], ...) == 0 c_linenumber + currentfilename != default_currentfilename) { /* * have a continuation error message * of the form: ... message Index: src/usr.bin/error/main.c diff -u src/usr.bin/error/main.c:1.20 src/usr.bin/error/main.c:1.21 --- src/usr.bin/error/main.c:1.20 Fri May 20 20:43:42 2011 +++ src/usr.bin/error/main.c Wed Aug 17 09:11:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.20 2011/05/21 00:43:42 christos Exp $ */ +/* $NetBSD: main.c,v 1.21 2011/08/17 13:11:22 christos Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)main.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: main.c,v 1.20 2011/05/21 00:43:42 christos Exp $); +__RCSID($NetBSD: main.c,v 1.21 2011/08/17 13:11:22 christos Exp $); #endif /* not lint */ #include signal.h @@ -68,7 +68,7 @@ boolean *touchedfiles; /* which files we touched */ int language = INCC; -static char default_currentfilename[] = ; +char default_currentfilename[] = ; char *currentfilename = default_currentfilename; boolean query = false; /* query the operator if touch files */
CVS commit: src/usr.bin/radioctl
Module Name:src Committed By: christos Date: Wed Aug 17 13:12:39 UTC 2011 Modified Files: src/usr.bin/radioctl: radioctl.c Log Message: fix non-literal format stringg. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.bin/radioctl/radioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/radioctl/radioctl.c diff -u src/usr.bin/radioctl/radioctl.c:1.9 src/usr.bin/radioctl/radioctl.c:1.10 --- src/usr.bin/radioctl/radioctl.c:1.9 Tue May 24 08:40:11 2011 +++ src/usr.bin/radioctl/radioctl.c Wed Aug 17 09:12:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: radioctl.c,v 1.9 2011/05/24 12:40:11 joerg Exp $ */ +/* $NetBSD: radioctl.c,v 1.10 2011/08/17 13:12:39 christos Exp $ */ /* $OpenBSD: radioctl.c,v 1.5 2001/12/18 18:42:19 mickey Exp $ */ /* $RuOBSD: radioctl.c,v 1.4 2001/10/20 18:09:10 pva Exp $ */ @@ -29,7 +29,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: radioctl.c,v 1.9 2011/05/24 12:40:11 joerg Exp $); +__RCSID($NetBSD: radioctl.c,v 1.10 2011/08/17 13:12:39 christos Exp $); #endif #include sys/ioctl.h @@ -360,7 +360,7 @@ */ static int parse_opt(char *s, struct opt_t *o) { - const char *badvalue = bad value `%s'; +#define badvalue bad value `%s' char *topt = NULL; int slen, optlen;
CVS commit: src/usr.bin/seq
Module Name:src Committed By: christos Date: Wed Aug 17 13:19:09 UTC 2011 Modified Files: src/usr.bin/seq: Makefile Log Message: document non literal string format To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/seq/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/seq/Makefile diff -u src/usr.bin/seq/Makefile:1.3 src/usr.bin/seq/Makefile:1.4 --- src/usr.bin/seq/Makefile:1.3 Tue Apr 14 18:15:26 2009 +++ src/usr.bin/seq/Makefile Wed Aug 17 09:19:09 2011 @@ -1,7 +1,9 @@ -# $NetBSD: Makefile,v 1.3 2009/04/14 22:15:26 lukem Exp $ +# $NetBSD: Makefile,v 1.4 2011/08/17 13:19:09 christos Exp $ PROG= seq DPADD= ${LIBMATH} LDADD= -lm +COPTS.seq.c += -Wno-format-nonliteral + .include bsd.prog.mk
CVS commit: src/usr.bin/stat
Module Name:src Committed By: christos Date: Wed Aug 17 13:22:33 UTC 2011 Modified Files: src/usr.bin/stat: Makefile Log Message: document non-literal format strings To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.bin/stat/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/stat/Makefile diff -u src/usr.bin/stat/Makefile:1.7 src/usr.bin/stat/Makefile:1.8 --- src/usr.bin/stat/Makefile:1.7 Thu Jul 24 23:21:17 2003 +++ src/usr.bin/stat/Makefile Wed Aug 17 09:22:33 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2003/07/25 03:21:17 atatat Exp $ +# $NetBSD: Makefile,v 1.8 2011/08/17 13:22:33 christos Exp $ PROG= stat @@ -7,4 +7,6 @@ MLINKS= stat.1 readlink.1 .endif +COPTS.stat.c += -Wno-format-nonliteral + .include bsd.prog.mk
CVS commit: src/usr.bin/systat
Module Name:src Committed By: christos Date: Wed Aug 17 13:26:49 UTC 2011 Modified Files: src/usr.bin/systat: ps.c Log Message: eliminate non-literal format strings. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/usr.bin/systat/ps.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/systat/ps.c diff -u src/usr.bin/systat/ps.c:1.34 src/usr.bin/systat/ps.c:1.35 --- src/usr.bin/systat/ps.c:1.34 Wed Oct 21 17:12:07 2009 +++ src/usr.bin/systat/ps.c Wed Aug 17 09:26:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ps.c,v 1.34 2009/10/21 21:12:07 rmind Exp $ */ +/* $NetBSD: ps.c,v 1.35 2011/08/17 13:26:49 christos Exp $ */ /*- * Copyright (c) 1999 @@ -45,7 +45,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: ps.c,v 1.34 2009/10/21 21:12:07 rmind Exp $); +__RCSID($NetBSD: ps.c,v 1.35 2011/08/17 13:26:49 christos Exp $); #endif /* not lint */ #include sys/param.h @@ -282,11 +282,12 @@ * they are printed within parentheses. */ if (kp-p_flag P_SYSTEM) - fmt = [%s]; + fmt = []; else - fmt = (%s); + fmt = (); - snprintf(commstr, sizeof(commstr), fmt, kp-p_comm); + snprintf(commstr, sizeof(commstr), %c%s%c, fmt[0], + kp-p_comm, fmt[1]); } return commstr; @@ -324,12 +325,10 @@ time(now); if (now - u_start.tv_sec 24 * SECSPERHOUR) { /* I *hate* SCCS... */ - static char fmt[] = %l:% M%p; - strftime(startstr, sizeof(startstr) - 1, fmt, tp); + strftime(startstr, sizeof(startstr) - 1, %l:% M%p, tp); } else if (now - u_start.tv_sec 7 * SECSPERDAY) { /* I *hate* SCCS... */ - static char fmt[] = %a% I%p; - strftime(startstr, sizeof(startstr) - 1, fmt, tp); + strftime(startstr, sizeof(startstr) - 1, %a% I%p, tp); } else strftime(startstr, sizeof(startstr) - 1, %e%b%y, tp);
CVS commit: src/usr.bin/time
Module Name:src Committed By: christos Date: Wed Aug 17 13:29:39 UTC 2011 Modified Files: src/usr.bin/time: Makefile Log Message: document non-literal string format To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.bin/time/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/time/Makefile diff -u src/usr.bin/time/Makefile:1.7 src/usr.bin/time/Makefile:1.8 --- src/usr.bin/time/Makefile:1.7 Tue Apr 14 18:15:27 2009 +++ src/usr.bin/time/Makefile Wed Aug 17 09:29:39 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2009/04/14 22:15:27 lukem Exp $ +# $NetBSD: Makefile,v 1.8 2011/08/17 13:29:39 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 .include bsd.own.mk @@ -8,6 +8,8 @@ SRCS= time.c strpct.c xtime.c PROG= time +COPTS.strpct.c += -Wno-format-nonliteral + .PATH: ${NETBSDSRCDIR}/bin/csh .include bsd.prog.mk
CVS commit: src/usr.bin/w
Module Name:src Committed By: christos Date: Wed Aug 17 13:48:11 UTC 2011 Modified Files: src/usr.bin/w: Makefile pr_time.c Log Message: Eliminate non-literal format strings, and now that gcc warns, kill y2k format warning. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/usr.bin/w/Makefile cvs rdiff -u -r1.17 -r1.18 src/usr.bin/w/pr_time.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/w/Makefile diff -u src/usr.bin/w/Makefile:1.19 src/usr.bin/w/Makefile:1.20 --- src/usr.bin/w/Makefile:1.19 Wed Feb 26 10:01:09 2003 +++ src/usr.bin/w/Makefile Wed Aug 17 09:48:11 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2003/02/26 15:01:09 christos Exp $ +# $NetBSD: Makefile,v 1.20 2011/08/17 13:48:11 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 .include bsd.own.mk @@ -13,4 +13,6 @@ .PATH: ${NETBSDSRCDIR}/bin/ps +COPTS.pr_time.c += -Wno-format-y2k + .include bsd.prog.mk Index: src/usr.bin/w/pr_time.c diff -u src/usr.bin/w/pr_time.c:1.17 src/usr.bin/w/pr_time.c:1.18 --- src/usr.bin/w/pr_time.c:1.17 Tue Apr 14 03:41:36 2009 +++ src/usr.bin/w/pr_time.c Wed Aug 17 09:48:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pr_time.c,v 1.17 2009/04/14 07:41:36 lukem Exp $ */ +/* $NetBSD: pr_time.c,v 1.18 2011/08/17 13:48:11 christos Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)pr_time.c 8.2 (Berkeley) 4/4/94; #else -__RCSID($NetBSD: pr_time.c,v 1.17 2009/04/14 07:41:36 lukem Exp $); +__RCSID($NetBSD: pr_time.c,v 1.18 2011/08/17 13:48:11 christos Exp $); #endif #endif /* not lint */ @@ -62,25 +62,22 @@ int tnow_yday; struct tm *tp; time_t diff; - const char *fmt; tnow_yday = localtime(now)-tm_yday; tp = localtime(started); diff = *now - *started; - /* If more than a week, use day-month-year. */ - if (diff SECSPERDAY * DAYSPERWEEK) - fmt = %d%b%y; - - /* If not today, use day-hour-am/pm. */ - else if (tp-tm_yday != tnow_yday) - fmt = %a% I%p; - - /* Default is hh:mm{am,pm}. */ - else - fmt = %l:% M%p; + if (diff SECSPERDAY * DAYSPERWEEK) { + /* If more than a week, use day-month-year. */ + (void)strftime(buf, sizeof(buf), %d%b%y, tp); + } else if (tp-tm_yday != tnow_yday) { + /* If not today, use day-hour-am/pm. Damn SCCS */ + (void)strftime(buf, sizeof(buf), %a% I%p, tp); + } else { + /* Default is hh:mm{am,pm}. Damn SCCS */ + (void)strftime(buf, sizeof(buf), %l:% M%p, tp); + } - (void)strftime(buf, sizeof(buf), fmt, tp); buf[sizeof(buf) - 1] = '\0'; (void)fputs(buf, stdout); }
CVS commit: src/usr.bin/vmstat
Module Name:src Committed By: christos Date: Wed Aug 17 13:54:31 UTC 2011 Modified Files: src/usr.bin/vmstat: Makefile Log Message: document that we are using non-literal string formats. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/usr.bin/vmstat/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/vmstat/Makefile diff -u src/usr.bin/vmstat/Makefile:1.29 src/usr.bin/vmstat/Makefile:1.30 --- src/usr.bin/vmstat/Makefile:1.29 Thu May 26 08:56:33 2011 +++ src/usr.bin/vmstat/Makefile Wed Aug 17 09:54:31 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.29 2011/05/26 12:56:33 joerg Exp $ +# $NetBSD: Makefile,v 1.30 2011/08/17 13:54:31 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 .include bsd.own.mk @@ -14,5 +14,6 @@ BINMODE=2555 CWARNFLAGS.clang+= -Wno-format-extra-args +COPTS.vmstat.c += -Wno-format-nonliteral .include bsd.prog.mk
CVS commit: src/usr.bin/whois
Module Name:src Committed By: christos Date: Wed Aug 17 13:57:12 UTC 2011 Modified Files: src/usr.bin/whois: whois.c Log Message: fix non-literal string format To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/usr.bin/whois/whois.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/whois/whois.c diff -u src/usr.bin/whois/whois.c:1.34 src/usr.bin/whois/whois.c:1.35 --- src/usr.bin/whois/whois.c:1.34 Tue Apr 14 04:00:48 2009 +++ src/usr.bin/whois/whois.c Wed Aug 17 09:57:12 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: whois.c,v 1.34 2009/04/14 08:00:48 lukem Exp $ */ +/* $NetBSD: whois.c,v 1.35 2011/08/17 13:57:12 christos Exp $ */ /* $OpenBSD: whois.c,v 1.28 2003/09/18 22:16:15 fgsch Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static const char sccsid[] = @(#)whois.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: whois.c,v 1.34 2009/04/14 08:00:48 lukem Exp $); +__RCSID($NetBSD: whois.c,v 1.35 2011/08/17 13:57:12 christos Exp $); #endif #endif /* not lint */ @@ -216,15 +216,15 @@ if (strcmp(server, whois.denic.de) == 0 || strcmp(server, de.whois-servers.net) == 0) - fmt = -T dn,ace -C ISO-8859-1 %s\r\n; + fmt = -T dn,ace -C ISO-8859-1; else - fmt = %s\r\n; + fmt = ; sfi = fdopen(s, r); sfo = fdopen(s, w); if (sfi == NULL || sfo == NULL) err(1, fdopen); - (void)fprintf(sfo, fmt, query); + (void)fprintf(sfo, %s%s\r\n, fmt, query); (void)fflush(sfo); nhost = NULL; while ((buf = fgetln(sfi, len)) != NULL) {
CVS commit: src/usr.bin/xinstall
Module Name:src Committed By: christos Date: Wed Aug 17 14:00:31 UTC 2011 Modified Files: src/usr.bin/xinstall: Makefile Log Message: document non-literal format strings To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/usr.bin/xinstall/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xinstall/Makefile diff -u src/usr.bin/xinstall/Makefile:1.21 src/usr.bin/xinstall/Makefile:1.22 --- src/usr.bin/xinstall/Makefile:1.21 Sat Dec 16 07:59:17 2006 +++ src/usr.bin/xinstall/Makefile Wed Aug 17 10:00:30 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.21 2006/12/16 12:59:17 bouyer Exp $ +# $NetBSD: Makefile,v 1.22 2011/08/17 14:00:30 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 .include bsd.own.mk @@ -15,6 +15,8 @@ LDADD+= -lutil .endif +COPTS.xinstall.c += -Wno-format-nonliteral + PROGNAME=install
CVS commit: src/usr.bin/gzip
Module Name:src Committed By: christos Date: Wed Aug 17 14:07:31 UTC 2011 Modified Files: src/usr.bin/gzip: gzip.c Log Message: add noreturn atttribute. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/usr.bin/gzip/gzip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/gzip/gzip.c diff -u src/usr.bin/gzip/gzip.c:1.103 src/usr.bin/gzip/gzip.c:1.104 --- src/usr.bin/gzip/gzip.c:1.103 Tue Jun 21 09:25:45 2011 +++ src/usr.bin/gzip/gzip.c Wed Aug 17 10:07:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gzip.c,v 1.103 2011/06/21 13:25:45 joerg Exp $ */ +/* $NetBSD: gzip.c,v 1.104 2011/08/17 14:07:31 christos Exp $ */ /* * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green @@ -30,7 +30,7 @@ #ifndef lint __COPYRIGHT(@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006\ Matthew R. Green. All rights reserved.); -__RCSID($NetBSD: gzip.c,v 1.103 2011/06/21 13:25:45 joerg Exp $); +__RCSID($NetBSD: gzip.c,v 1.104 2011/08/17 14:07:31 christos Exp $); #endif /* not lint */ /* @@ -186,11 +186,11 @@ static char *infile; /* name of file coming in */ static void maybe_err(const char *fmt, ...) -__attribute__((__format__(__printf__, 1, 2))); +__attribute__((__noreturn__,__format__(__printf__, 1, 2))); #if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) || \ !defined(NO_XZ_SUPPORT) static void maybe_errx(const char *fmt, ...) -__attribute__((__format__(__printf__, 1, 2))); +__attribute__((__noreturn__,__format__(__printf__, 1, 2))); #endif static void maybe_warn(const char *fmt, ...) __attribute__((__format__(__printf__, 1, 2)));
CVS commit: src/usr.bin/gzip
Module Name:src Committed By: christos Date: Wed Aug 17 14:07:45 UTC 2011 Modified Files: src/usr.bin/gzip: unxz.c Log Message: fix non-literal format strings To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/gzip/unxz.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/gzip/unxz.c diff -u src/usr.bin/gzip/unxz.c:1.3 src/usr.bin/gzip/unxz.c:1.4 --- src/usr.bin/gzip/unxz.c:1.3 Sat Jun 18 22:19:45 2011 +++ src/usr.bin/gzip/unxz.c Wed Aug 17 10:07:45 2011 @@ -111,11 +111,11 @@ break; default: -msg = Unknown error (%d); +maybe_errx(Unknown error (%d), ret); break; } + maybe_errx(%s, msg); - maybe_errx(msg, ret); } } }
CVS commit: src/sys/arch/mips
Module Name:src Committed By: matt Date: Wed Aug 17 14:39:59 UTC 2011 Modified Files: src/sys/arch/mips/include: locore.h src/sys/arch/mips/mips: mips_fixup.c Log Message: Redo mips_fixup so that it can handle indirect loads and deal with loongson2 extra instructions. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/sys/arch/mips/include/locore.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/mips/mips_fixup.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/locore.h diff -u src/sys/arch/mips/include/locore.h:1.91 src/sys/arch/mips/include/locore.h:1.92 --- src/sys/arch/mips/include/locore.h:1.91 Fri Jul 1 22:08:22 2011 +++ src/sys/arch/mips/include/locore.h Wed Aug 17 14:39:59 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.h,v 1.91 2011/07/01 22:08:22 dyoung Exp $ */ +/* $NetBSD: locore.h,v 1.92 2011/08/17 14:39:59 matt Exp $ */ /* * This file should not be included by MI code!!! @@ -111,6 +111,8 @@ void fixup_splcalls(void);/* splstubs.c */ bool mips_fixup_exceptions(mips_fixup_callback_t); bool mips_fixup_zero_relative(int32_t, uint32_t [2]); +intptr_t + mips_fixup_addr(const uint32_t *); void mips_fixup_stubs(uint32_t *, uint32_t *); /* Index: src/sys/arch/mips/mips/mips_fixup.c diff -u src/sys/arch/mips/mips/mips_fixup.c:1.6 src/sys/arch/mips/mips/mips_fixup.c:1.7 --- src/sys/arch/mips/mips/mips_fixup.c:1.6 Fri Apr 29 22:17:17 2011 +++ src/sys/arch/mips/mips/mips_fixup.c Wed Aug 17 14:39:59 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_fixup.c,v 1.6 2011/04/29 22:17:17 matt Exp $ */ +/* $NetBSD: mips_fixup.c,v 1.7 2011/08/17 14:39:59 matt Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mips_fixup.c,v 1.6 2011/04/29 22:17:17 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: mips_fixup.c,v 1.7 2011/08/17 14:39:59 matt Exp $); #include opt_mips3_wired.h #include opt_multiprocessor.h @@ -42,12 +42,13 @@ #include mips/cache.h #include mips/mips3_pte.h #include mips/regnum.h +#include mips/mips_opcode.h -#define INSN_LUI_P(insn) (((insn) 26) == 017) -#define INSN_LW_P(insn) (((insn) 26) == 043) -#define INSN_SW_P(insn) (((insn) 26) == 053) -#define INSN_LD_P(insn) (((insn) 26) == 067) -#define INSN_SD_P(insn) (((insn) 26) == 077) +#define INSN_LUI_P(insn) (((insn) 26) == OP_LUI) +#define INSN_LW_P(insn) (((insn) 26) == OP_LW) +#define INSN_SW_P(insn) (((insn) 26) == OP_SW) +#define INSN_LD_P(insn) (((insn) 26) == OP_LD) +#define INSN_SD_P(insn) (((insn) 26) == OP_SD) #define INSN_LOAD_P(insn) (INSN_LD_P(insn) || INSN_LW_P(insn)) #define INSN_STORE_P(insn) (INSN_SD_P(insn) || INSN_SW_P(insn)) @@ -227,6 +228,118 @@ *insnp = insn; } +intptr_t +mips_fixup_addr(const uint32_t *stubp) +{ + /* + * Stubs typically look like: + * lui v0, %hi(sym) + * lX t9, %lo(sym)(v0) + * [nop] + * jr t9 + * nop + * + * Or for loongson2: + * lui v0, %hi(sym) + * lX t9, %lo(sym)(v0) + * lui at,0xcfff + * ori at,at,0x + * and t9,t9,at + * jr t9 + * move at,at + */ + mips_reg_t regs[32]; + uint32_t used = 0; + size_t n; + const char *errstr = mips; + /* + * This is basically a small MIPS emulator for those instructions + * that might in a stub routine. + */ + for (n = 0; n 16; n++) { + const InstFmt insn = { .word = stubp[n] }; + switch (insn.IType.op) { + case OP_LUI: + regs[insn.IType.rt] = (int16_t)insn.IType.imm 16; + used |= (1 insn.IType.rt); + break; +#ifdef _LP64 + case OP_LD: + if ((used (1 insn.IType.rs)) == 0) { +errstr = LD; +goto out; + } + regs[insn.IType.rt] = *(const int64_t *) + (regs[insn.IType.rs] + (int16_t)insn.IType.imm); + used |= (1 insn.IType.rt); + break; +#else + case OP_LW: + if ((used (1 insn.IType.rs)) == 0) { +errstr = LW; +goto out; + } + regs[insn.IType.rt] = *(const int32_t *) + (regs[insn.IType.rs] + (int16_t)insn.IType.imm); + used |= (1 insn.IType.rt); + break; +#endif + case OP_ORI: + if ((used (1 insn.IType.rs)) == 0) { +errstr = ORI; +goto out; + } + regs[insn.IType.rt] |= insn.IType.imm; + used |= (1 insn.IType.rt); + break; + case OP_SPECIAL: + switch (insn.RType.func) { + case OP_JR: +if ((used (1 insn.RType.rs)) == 0) { + errstr = JR; + goto out; +} +if (stubp[n+1] != 0 + stubp[n+1] != 0x00200825) { + n++; + errstr = delay slot; + goto out; +} +return regs[insn.RType.rs]; + case OP_AND: +if ((used (1 insn.RType.rs)) == 0 +|| (used (1 insn.RType.rt)) == 0) { + errstr = AND; + goto out; +} +regs[insn.RType.rd] = +regs[insn.RType.rs] regs[insn.RType.rt]; +used |= (1 insn.RType.rd); +break; + case OP_SLL: /* nop */ +if (insn.RType.rd != _R_ZERO) { + errstr = NOP; + goto out; +
CVS commit: othersrc/external/bsd/iscsi/sbin/iscsictl
Module Name:othersrc Committed By: agc Date: Wed Aug 17 14:41:53 UTC 2011 Modified Files: othersrc/external/bsd/iscsi/sbin/iscsictl: iscsic_main.c Log Message: don't use a -v command line argument to print the version - we have the version command to do that To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ othersrc/external/bsd/iscsi/sbin/iscsictl/iscsic_main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/iscsi/sbin/iscsictl/iscsic_main.c diff -u othersrc/external/bsd/iscsi/sbin/iscsictl/iscsic_main.c:1.2 othersrc/external/bsd/iscsi/sbin/iscsictl/iscsic_main.c:1.3 --- othersrc/external/bsd/iscsi/sbin/iscsictl/iscsic_main.c:1.2 Mon Aug 8 02:24:33 2011 +++ othersrc/external/bsd/iscsi/sbin/iscsictl/iscsic_main.c Wed Aug 17 14:41:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: iscsic_main.c,v 1.2 2011/08/08 02:24:33 agc Exp $ */ +/* $NetBSD: iscsic_main.c,v 1.3 2011/08/17 14:41:53 agc Exp $ */ /*- * Copyright (c) 2005,2006,2011 The NetBSD Foundation, Inc. @@ -542,14 +542,11 @@ int i; (void) snprintf(sockdir, sizeof(sockdir), /tmp/iscsictl.XX); - while ((i = getopt(argc, argv, d:v)) != -1) { + while ((i = getopt(argc, argv, d:)) != -1) { switch(i) { case 'd': (void) snprintf(sockdir, sizeof(sockdir), %s, optarg); break; - case 'v': - printf(%s version %s\n, *argv, ISCSICTL_VERSION); - break; default: break; } @@ -571,7 +568,8 @@ } if ((driver = open(DEVICE, O_RDONLY)) 0) { warn(Opening DEVICE); -#ifndef ISCSI_DEBUG/* DEBUG ONLY: Allow CLI to operate w/o driver */ +#ifndef ISCSI_DEBUG + /* DEBUG ONLY: Allow CLI to operate w/o driver */ return EXIT_FAILURE; #endif }
CVS commit: othersrc/external/bsd/iscsi/sbin/iscsictl
Module Name:othersrc Committed By: agc Date: Wed Aug 17 14:43:16 UTC 2011 Modified Files: othersrc/external/bsd/iscsi/sbin/iscsictl: iscsictl.8 Log Message: we refer to an iSCSI session later in this man page as a distinguished value, so define it properly at first use. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8 diff -u othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8:1.3 othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8:1.4 --- othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8:1.3 Mon Aug 8 19:54:51 2011 +++ othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8 Wed Aug 17 14:43:16 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: iscsictl.8,v 1.3 2011/08/08 19:54:51 wiz Exp $ +.\ $NetBSD: iscsictl.8,v 1.4 2011/08/17 14:43:16 agc Exp $ .\ .\ Copyright (c) 2011 Alistair Crooks a...@netbsd.org .\ All rights reserved. @@ -23,7 +23,7 @@ .\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\ -.Dd August 5, 2011 +.Dd August 8, 2011 .Dt ISCSICTL 8 .Os .Sh NAME @@ -52,7 +52,9 @@ responses take place over a network. iSCSI communication is done in sessions. The iSCSI initiator logs in to a target across the network, -possibly authenticating itself; this creates an iSCSI session between initiator +possibly authenticating itself; this creates an iSCSI +.Dv session +between initiator and target. The initiator can then issue commands to and read responses from the target.
CVS commit: othersrc/external/bsd/iscsi/sbin/iscsid
Module Name:othersrc Committed By: agc Date: Wed Aug 17 14:44:06 UTC 2011 Added Files: othersrc/external/bsd/iscsi/sbin/iscsid: iscsid.8 Log Message: add a first stab at a manual page for this daemon To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/iscsi/sbin/iscsid/iscsid.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: othersrc/external/bsd/iscsi/sbin/iscsid/iscsid.8 diff -u /dev/null othersrc/external/bsd/iscsi/sbin/iscsid/iscsid.8:1.1 --- /dev/null Wed Aug 17 14:44:06 2011 +++ othersrc/external/bsd/iscsi/sbin/iscsid/iscsid.8 Wed Aug 17 14:44:06 2011 @@ -0,0 +1,84 @@ +.\ $NetBSD: iscsid.8,v 1.1 2011/08/17 14:44:06 agc Exp $ +.\ +.\ Copyright (c) 2011 Alistair Crooks a...@netbsd.org +.\ All rights reserved. +.\ +.\ Redistribution and use in source and binary forms, with or without +.\ modification, are permitted provided that the following conditions +.\ are met: +.\ 1. Redistributions of source code must retain the above copyright +.\notice, this list of conditions and the following disclaimer. +.\ 2. Redistributions in binary form must reproduce the above copyright +.\notice, this list of conditions and the following disclaimer in the +.\documentation and/or other materials provided with the distribution. +.\ +.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\ +.Dd August 8, 2011 +.Dt ISCSICTL 8 +.Os +.Sh NAME +.Nm iscsid +.Nd interface to kernel iSCSI driver +.Sh SYNOPSIS +.Nm +.Sh DESCRIPTION +The iSCSI initiator runs as a kernel driver, and provides access +to iSCSI targets running across a network using the iSCSI protocol, +RFC 3270. +The +.Nm +utility itself interfaces to the kernel iSCSI driver, and also +communicates, using +.Xr libisns 3 +with the iSCSI name service running on other hosts +to locate services and iSCSI instances. +In normal operation, +.Nm +is a standard daemon, and will detach from the controlling +terminal using +.Xr daemon 3 +and then loops, reading requests, processing them, +and sending responses. +Communication takes place over a +Unix domain socket. +.Nm +exits on receiving a terminate message, +(no response to one that is sent to the kernel), +or when an error occurs reading from or writing to the socket. +.Pp +There are no command line arguments to +.Nm +.Pp +It is envisaged that user-level communication take place with +.Nm +using the +.Xr iscsictl 8 +utility, rather than directly over its communication socket. +An example of setting up the in-kernel iSCSI initiator +is shown in +.Xr iscsictl 8 . +.Sh SEE ALSO +.Xr daemon 3 , +.Xr libisns 3 , +.Xr iscsictl 8 +.Sh HISTORY +The +.Nm +utility appeared in +.Nx 6.0 . +.Sh AUTHORS +.An Alistair Crooks Aq a...@netbsd.org +wrote this manual page. +The +.Nm +utility was contributed by Wasabi Systems, Inc.
CVS commit: othersrc/external/bsd/iscsi/sbin/iscsid
Module Name:othersrc Committed By: wiz Date: Wed Aug 17 14:49:00 UTC 2011 Modified Files: othersrc/external/bsd/iscsi/sbin/iscsid: iscsid.8 Log Message: Add some punctuation. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/iscsi/sbin/iscsid/iscsid.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/iscsi/sbin/iscsid/iscsid.8 diff -u othersrc/external/bsd/iscsi/sbin/iscsid/iscsid.8:1.1 othersrc/external/bsd/iscsi/sbin/iscsid/iscsid.8:1.2 --- othersrc/external/bsd/iscsi/sbin/iscsid/iscsid.8:1.1 Wed Aug 17 14:44:06 2011 +++ othersrc/external/bsd/iscsi/sbin/iscsid/iscsid.8 Wed Aug 17 14:49:00 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: iscsid.8,v 1.1 2011/08/17 14:44:06 agc Exp $ +.\ $NetBSD: iscsid.8,v 1.2 2011/08/17 14:49:00 wiz Exp $ .\ .\ Copyright (c) 2011 Alistair Crooks a...@netbsd.org .\ All rights reserved. @@ -39,7 +39,7 @@ .Nm utility itself interfaces to the kernel iSCSI driver, and also communicates, using -.Xr libisns 3 +.Xr libisns 3 , with the iSCSI name service running on other hosts to locate services and iSCSI instances. In normal operation, @@ -57,7 +57,7 @@ or when an error occurs reading from or writing to the socket. .Pp There are no command line arguments to -.Nm +.Nm . .Pp It is envisaged that user-level communication take place with .Nm
CVS commit: src/sys/sys
Module Name:src Committed By: dyoung Date: Wed Aug 17 14:52:09 UTC 2011 Modified Files: src/sys/sys: bus.h Log Message: Remove bus_space_handle_is_equal() and bus_space_is_equal() since they're declared in bus_proto.h. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/sys/bus.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/bus.h diff -u src/sys/sys/bus.h:1.6 src/sys/sys/bus.h:1.7 --- src/sys/sys/bus.h:1.6 Fri Jul 8 03:24:42 2011 +++ src/sys/sys/bus.h Wed Aug 17 14:52:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.6 2011/07/08 03:24:42 dyoung Exp $ */ +/* $NetBSD: bus.h,v 1.7 2011/08/17 14:52:09 dyoung Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -119,8 +119,6 @@ #endif }; -bool bus_space_handle_is_equal(bus_space_tag_t, bus_space_handle_t, -bus_space_handle_t); int bus_space_tag_create(bus_space_tag_t, uint64_t, uint64_t, const struct bus_space_overrides *, void *, bus_space_tag_t *); @@ -165,6 +163,4 @@ #include machine/bus.h #endif -bool bus_space_is_equal(bus_space_tag_t, bus_space_tag_t); - #endif /* _SYS_BUS_H_ */
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: dyoung Date: Wed Aug 17 14:55:11 UTC 2011 Modified Files: src/sys/arch/x86/include: i82093reg.h Log Message: Add definitions from [1] for the I/O APIC's MSI Message Address Data registers. [1] Intel Corporation, Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3A: System Programming Guide, Part 1, http://www.intel.com/Assets/PDF/manual/253668.pdf, Chapter 10, January, 2011. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x86/include/i82093reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/include/i82093reg.h diff -u src/sys/arch/x86/include/i82093reg.h:1.2 src/sys/arch/x86/include/i82093reg.h:1.3 --- src/sys/arch/x86/include/i82093reg.h:1.2 Mon Apr 28 20:23:40 2008 +++ src/sys/arch/x86/include/i82093reg.h Wed Aug 17 14:55:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: i82093reg.h,v 1.2 2008/04/28 20:23:40 martin Exp $ */ +/* $NetBSD: i82093reg.h,v 1.3 2011/08/17 14:55:11 dyoung Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -36,6 +36,34 @@ */ #define IOAPIC_BASE_DEFAULT 0xfec0 +#define IOAPIC_MSIADDR_BASE 0xfee0 +#define IOAPIC_MSIADDR_DSTID_MASK __BITS(19, 12) +#define IOAPIC_MSIADDR_RSVD0_MASK __BITS(11, 4) +#define IOAPIC_MSIADDR_RH __BIT(3) +#define IOAPIC_MSIADDR_DM __BIT(2) +#define IOAPIC_MSIADDR_RSVD1_MASK __BITS(1, 0) + +#define IOAPIC_MSIDATA_VECTOR_MASK __BITS(7, 0) +#define IOAPIC_MSIDATA_DM_MASK __BITS(10, 8) +#define IOAPIC_MSIDATA_DM_FIXED __SHIFTIN(0, IOAPIC_MSIDATA_DM_MASK) +#define IOAPIC_MSIDATA_DM_LOPRI __SHIFTIN(1, IOAPIC_MSIDATA_DM_MASK) +#define IOAPIC_MSIDATA_DM_SMI __SHIFTIN(2, IOAPIC_MSIDATA_DM_MASK) +#define IOAPIC_MSIDATA_DM_RSVD0 __SHIFTIN(3, IOAPIC_MSIDATA_DM_MASK) +#define IOAPIC_MSIDATA_DM_NMI __SHIFTIN(4, IOAPIC_MSIDATA_DM_MASK) +#define IOAPIC_MSIDATA_DM_INIT __SHIFTIN(5, IOAPIC_MSIDATA_DM_MASK) +#define IOAPIC_MSIDATA_DM_RSVD1 __SHIFTIN(6, IOAPIC_MSIDATA_DM_MASK) +#define IOAPIC_MSIDATA_DM_EXTINT __SHIFTIN(7, IOAPIC_MSIDATA_DM_MASK) +#define IOAPIC_MSIDATA_RSVD0_MASK __BITS(13, 11) +#define IOAPIC_MSIDATA_LEVEL_MASK __BIT(14) +#define IOAPIC_MSIDATA_LEVEL_DEASSERT __SHIFTIN(0, IOAPIC_MSIDATA_LEVEL_MASK) +#define IOAPIC_MSIDATA_LEVEL_ASSERT __SHIFTIN(1, IOAPIC_MSIDATA_LEVEL_MASK) +#define IOAPIC_MSIDATA_TRGMODE_MASK __BIT(15) +#define IOAPIC_MSIDATA_TRGMODE_EDGE \ +__SHIFTIN(0, IOAPIC_MSIDATA_TRGMODE_MASK) +#define IOAPIC_MSIDATA_TRGMODE_LEVEL \ +__SHIFTIN(1, IOAPIC_MSIDATA_TRGMODE_MASK) +#define IOAPIC_MSIDATA_RSVD1_MASK __BITS(31, 16) + /* * Memory-space registers. */
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: dyoung Date: Wed Aug 17 14:56:55 UTC 2011 Modified Files: src/sys/arch/x86/pci: pci_intr_machdep.c Log Message: In pci_msi_establish(), replace several anonymous constants with IOAPIC_ symbols. No change in the generated assembly. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x86/pci/pci_intr_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/pci_intr_machdep.c diff -u src/sys/arch/x86/pci/pci_intr_machdep.c:1.21 src/sys/arch/x86/pci/pci_intr_machdep.c:1.22 --- src/sys/arch/x86/pci/pci_intr_machdep.c:1.21 Wed Aug 17 00:59:47 2011 +++ src/sys/arch/x86/pci/pci_intr_machdep.c Wed Aug 17 14:56:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_intr_machdep.c,v 1.21 2011/08/17 00:59:47 dyoung Exp $ */ +/* $NetBSD: pci_intr_machdep.c,v 1.22 2011/08/17 14:56:55 dyoung Exp $ */ /*- * Copyright (c) 1997, 1998, 2009 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pci_intr_machdep.c,v 1.21 2011/08/17 00:59:47 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: pci_intr_machdep.c,v 1.22 2011/08/17 14:56:55 dyoung Exp $); #include sys/types.h #include sys/param.h @@ -93,6 +93,7 @@ #include opt_acpi.h #if NIOAPIC 0 || NACPICA 0 +#include machine/i82093reg.h #include machine/i82093var.h #include machine/mpconfig.h #include machine/mpbiosvar.h @@ -393,17 +394,28 @@ ci = ih-ih_cpu; is = ci-ci_isources[ih-ih_slot]; reg = pci_conf_read(pa-pa_pc, pa-pa_tag, co + PCI_MSI_CTL); - /* 0xfee0 == IOAPIC_??? */ pci_conf_write(pa-pa_pc, pa-pa_tag, co + PCI_MSI_MADDR64_LO, - 0xfee0 | ci-ci_cpuid 12); + IOAPIC_MSIADDR_BASE | + __SHIFTIN(ci-ci_cpuid, IOAPIC_MSIADDR_DSTID_MASK)); if (reg PCI_MSI_CTL_64BIT_ADDR) { pci_conf_write(pa-pa_pc, pa-pa_tag, co + PCI_MSI_MADDR64_HI, 0); + /* XXX according to the manual, ASSERT is unnecessary if + * EDGE + */ pci_conf_write(pa-pa_pc, pa-pa_tag, co + PCI_MSI_MDATA64, - is-is_idtvec | 0x4000); - } else + __SHIFTIN(is-is_idtvec, IOAPIC_MSIDATA_VECTOR_MASK) | + IOAPIC_MSIDATA_TRGMODE_EDGE | IOAPIC_MSIDATA_LEVEL_ASSERT | + IOAPIC_MSIDATA_DM_FIXED); + } else { + /* XXX according to the manual, ASSERT is unnecessary if + * EDGE + */ pci_conf_write(pa-pa_pc, pa-pa_tag, co + PCI_MSI_MDATA, - is-is_idtvec | 0x4000); + __SHIFTIN(is-is_idtvec, IOAPIC_MSIDATA_VECTOR_MASK) | + IOAPIC_MSIDATA_TRGMODE_EDGE | IOAPIC_MSIDATA_LEVEL_ASSERT | + IOAPIC_MSIDATA_DM_FIXED); + } pci_conf_write(pa-pa_pc, pa-pa_tag, co + PCI_MSI_CTL, PCI_MSI_CTL_MSI_ENABLE); return msih;
CVS commit: src/usr.bin/grep
Module Name:src Committed By: christos Date: Wed Aug 17 15:32:20 UTC 2011 Modified Files: src/usr.bin/grep: Makefile Log Message: document non-literal format strings To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.bin/grep/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/grep/Makefile diff -u src/usr.bin/grep/Makefile:1.4 src/usr.bin/grep/Makefile:1.5 --- src/usr.bin/grep/Makefile:1.4 Tue Feb 15 20:31:33 2011 +++ src/usr.bin/grep/Makefile Wed Aug 17 11:32:20 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2011/02/16 01:31:33 joerg Exp $ +# $NetBSD: Makefile,v 1.5 2011/08/17 15:32:20 christos Exp $ # $FreeBSD: head/usr.bin/grep/Makefile 210389 2010-07-22 19:11:57Z gabor $ # $OpenBSD: Makefile,v 1.6 2003/06/25 15:00:04 millert Exp $ @@ -34,4 +34,7 @@ uk_UA.UTF-8.msg \ zh_CN.UTF-8.msg +COPTS.grep.c += -Wno-format-nonliteral +COPTS.util.c += -Wno-format-nonliteral + .include bsd.prog.mk
CVS commit: src/etc/rc.d
Module Name:src Committed By: gdt Date: Wed Aug 17 16:39:30 UTC 2011 Modified Files: src/etc/rc.d: route6d Log Message: Make route6d REQUIRE: mountcritremote. route6d is in /usr/sbin, and thus on systems with separate / and /usr, /etc/rc.d/route6d can be run before /usr is mounted, resulting in route6d mysteriously failing to start. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/etc/rc.d/route6d Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.d/route6d diff -u src/etc/rc.d/route6d:1.7 src/etc/rc.d/route6d:1.8 --- src/etc/rc.d/route6d:1.7 Sat Apr 21 15:20:07 2007 +++ src/etc/rc.d/route6d Wed Aug 17 16:39:29 2011 @@ -1,10 +1,10 @@ #!/bin/sh # -# $NetBSD: route6d,v 1.7 2007/04/21 15:20:07 tron Exp $ +# $NetBSD: route6d,v 1.8 2011/08/17 16:39:29 gdt Exp $ # # PROVIDE: route6d -# REQUIRE: network mountcritlocal +# REQUIRE: network mountcritlocal mountcritremote # BEFORE: NETWORKING $_rc_subr_loaded . /etc/rc.subr
CVS commit: src/tests/lib/libcurses/slave
Module Name:src Committed By: christos Date: Wed Aug 17 16:57:14 UTC 2011 Modified Files: src/tests/lib/libcurses/slave: Makefile Log Message: document non-literal format strings To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libcurses/slave/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libcurses/slave/Makefile diff -u src/tests/lib/libcurses/slave/Makefile:1.4 src/tests/lib/libcurses/slave/Makefile:1.5 --- src/tests/lib/libcurses/slave/Makefile:1.4 Sat Jun 11 14:03:18 2011 +++ src/tests/lib/libcurses/slave/Makefile Wed Aug 17 12:57:13 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2011/06/11 18:03:18 christos Exp $ +# $NetBSD: Makefile,v 1.5 2011/08/17 16:57:13 christos Exp $ # .include bsd.own.mk @@ -14,6 +14,7 @@ CPPFLAGS+= -g -I${.CURDIR} -I. -I${.CURDIR}/../director LDADD+= -lcurses -lterminfo -Wl,--no-fatal-warnings +COPTS.curses_commands.c += -Wno-format-nonliteral CWARNFLAGS.clang+= -Wno-format .include bsd.test.mk
CVS commit: src/tests/util
Module Name:src Committed By: christos Date: Wed Aug 17 17:08:59 UTC 2011 Modified Files: src/tests/util/df: Makefile src/tests/util/id: Makefile Log Message: document non-literal format strings To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/util/df/Makefile cvs rdiff -u -r1.4 -r1.5 src/tests/util/id/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/util/df/Makefile diff -u src/tests/util/df/Makefile:1.2 src/tests/util/df/Makefile:1.3 --- src/tests/util/df/Makefile:1.2 Wed Nov 21 10:39:34 2007 +++ src/tests/util/df/Makefile Wed Aug 17 13:08:59 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2007/11/21 15:39:34 jmmv Exp $ +# $NetBSD: Makefile,v 1.3 2011/08/17 17:08:59 christos Exp $ NOMAN= # defined @@ -22,4 +22,6 @@ SRCS+= humanize_number.c .endif +COPTS.strpct.c += -Wno-format-nonliteral + .include bsd.test.mk Index: src/tests/util/id/Makefile diff -u src/tests/util/id/Makefile:1.4 src/tests/util/id/Makefile:1.5 --- src/tests/util/id/Makefile:1.4 Tue Jul 13 17:13:32 2010 +++ src/tests/util/id/Makefile Wed Aug 17 13:08:59 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2010/07/13 21:13:32 jmmv Exp $ +# $NetBSD: Makefile,v 1.5 2011/08/17 17:08:59 christos Exp $ NOMAN= # defined @@ -15,4 +15,6 @@ .PATH: ${NETBSDSRCDIR}/usr.bin/id SRCS= id.c pwgr.c +COPTS.id.c += -Wno-format-nonliteral + .include bsd.test.mk
CVS commit: src/games/fortune/strfile
Module Name:src Committed By: dholland Date: Wed Aug 17 18:16:51 UTC 2011 Modified Files: src/games/fortune/strfile: strfile.c Log Message: Move some things around so declarations appear in a reasonable order. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/games/fortune/strfile/strfile.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/fortune/strfile/strfile.c diff -u src/games/fortune/strfile/strfile.c:1.31 src/games/fortune/strfile/strfile.c:1.32 --- src/games/fortune/strfile/strfile.c:1.31 Tue Aug 16 19:53:03 2011 +++ src/games/fortune/strfile/strfile.c Wed Aug 17 18:16:51 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: strfile.c,v 1.31 2011/08/16 19:53:03 dholland Exp $ */ +/* $NetBSD: strfile.c,v 1.32 2011/08/17 18:16:51 dholland Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = @(#)strfile.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: strfile.c,v 1.31 2011/08/16 19:53:03 dholland Exp $); +__RCSID($NetBSD: strfile.c,v 1.32 2011/08/17 18:16:51 dholland Exp $); #endif #endif /* not lint */ #endif /* __NetBSD__ */ @@ -67,29 +67,13 @@ #define MAXPATHLEN 1024 #endif /* MAXPATHLEN */ -static uint32_t h2nl(uint32_t h); -static void getargs(int argc, char **argv); -static void usage(void) __dead; -static void add_offset(FILE *fp, off_t off); -static void do_order(void); -static int cmp_str(const void *vp1, const void *vp2); -static void randomize(void); -static void fwrite_be_offt(off_t off, FILE *f); - -static uint32_t -h2nl(uint32_t h) -{ -unsigned char c[4]; -uint32_t rv; - -c[0] = (h 24) 0xff; -c[1] = (h 16) 0xff; -c[2] = (h 8) 0xff; -c[3] = (h 0) 0xff; -memcpy(rv, c, sizeof rv); - -return (rv); -} +#if defined(__NetBSD__) || defined(__dead) +#define NORETURN __dead +#elif defined __GNUC__ +#define NORETURN __attribute__((__noreturn__)) +#else +#define NORETURN +#endif /* * This program takes a file composed of strings separated by @@ -153,15 +137,15 @@ static STR *Firstch; /* first chars of each string */ -#ifdef __GNUC__ -#define NORETURN __dead -#else -#define NORETURN -#endif -#ifndef __dead /* not NetBSD, presumably */ -#define __dead ; -#endif +static uint32_t h2nl(uint32_t h); +static void getargs(int argc, char **argv); +static void usage(void) NORETURN; +static void add_offset(FILE *fp, off_t off); +static void do_order(void); +static int cmp_str(const void *vp1, const void *vp2); +static void randomize(void); +static void fwrite_be_offt(off_t off, FILE *f); void add_offset(FILE *, off_t); int cmp_str(const void *, const void *); @@ -492,3 +476,18 @@ } fwrite(c, sizeof(c), 1, f); } + +static uint32_t +h2nl(uint32_t h) +{ +unsigned char c[4]; +uint32_t rv; + +c[0] = (h 24) 0xff; +c[1] = (h 16) 0xff; +c[2] = (h 8) 0xff; +c[3] = (h 0) 0xff; +memcpy(rv, c, sizeof rv); + +return (rv); +}
CVS commit: src/games/fortune/strfile
Module Name:src Committed By: dholland Date: Wed Aug 17 18:17:40 UTC 2011 Modified Files: src/games/fortune/strfile: strfile.c Log Message: Remove redundant set of prototypes for local functions, exposed by previous. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/games/fortune/strfile/strfile.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/fortune/strfile/strfile.c diff -u src/games/fortune/strfile/strfile.c:1.32 src/games/fortune/strfile/strfile.c:1.33 --- src/games/fortune/strfile/strfile.c:1.32 Wed Aug 17 18:16:51 2011 +++ src/games/fortune/strfile/strfile.c Wed Aug 17 18:17:40 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: strfile.c,v 1.32 2011/08/17 18:16:51 dholland Exp $ */ +/* $NetBSD: strfile.c,v 1.33 2011/08/17 18:17:40 dholland Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = @(#)strfile.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: strfile.c,v 1.32 2011/08/17 18:16:51 dholland Exp $); +__RCSID($NetBSD: strfile.c,v 1.33 2011/08/17 18:17:40 dholland Exp $); #endif #endif /* not lint */ #endif /* __NetBSD__ */ @@ -147,15 +147,6 @@ static void randomize(void); static void fwrite_be_offt(off_t off, FILE *f); -void add_offset(FILE *, off_t); -int cmp_str(const void *, const void *); -void do_order(void); -void fwrite_be_offt(off_t, FILE *); -void getargs(int, char *[]); -int main(int, char *[]); -void randomize(void); -void usage(void) NORETURN; - /* * main:
CVS commit: src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc
Module Name:src Committed By: matt Date: Wed Aug 17 18:33:03 UTC 2011 Modified Files: src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc: configargs.h Log Message: Regen (since mknative blew away _SOFT_FLOAT changes). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc/configargs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc/configargs.h diff -u src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc/configargs.h:1.3 src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc/configargs.h:1.4 --- src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc/configargs.h:1.3 Wed Jul 20 00:53:55 2011 +++ src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc/configargs.h Wed Aug 17 18:33:03 2011 @@ -3,9 +3,18 @@ /* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ /* Generated automatically. */ +#ifdef _SOFT_FLOAT_ +static const char configuration_arguments[] = /usr/src2/tools/gcc/../../external/gpl3/gcc/dist/configure --target=powerpc--netbsd --enable-long-long --enable-threads --with-bugurl=http://www.NetBSD.org/Misc/send-pr.html --with-pkgversion='NetBSD nb1 20110620' --enable-__cxa_atexit --with-mpc=/var/obj/ofppc/usr/src2/destdir.ofppc/usr --with-mpfr=/var/obj/ofppc/usr/src2/destdir.ofppc/usr --with-gmp=/var/obj/ofppc/usr/src2/destdir.ofppc/usr --disable-multilib --disable-symvers --disable-libstdcxx-pch --build=x86_64-unknown-netbsd5.99.54 --host=powerpc--netbsd -with-float=soft; +#else static const char configuration_arguments[] = /usr/src2/tools/gcc/../../external/gpl3/gcc/dist/configure --target=powerpc--netbsd --enable-long-long --enable-threads --with-bugurl=http://www.NetBSD.org/Misc/send-pr.html --with-pkgversion='NetBSD nb1 20110620' --enable-__cxa_atexit --with-mpc=/var/obj/ofppc/usr/src2/destdir.ofppc/usr --with-mpfr=/var/obj/ofppc/usr/src2/destdir.ofppc/usr --with-gmp=/var/obj/ofppc/usr/src2/destdir.ofppc/usr --disable-multilib --disable-symvers --disable-libstdcxx-pch --build=x86_64-unknown-netbsd5.99.54 --host=powerpc--netbsd; +#endif static const char thread_model[] = posix; static const struct { const char *name, *value; -} configure_default_options[] = { { NULL, NULL} }; +} configure_default_options[] = { +#ifdef _SOFT_FLOAT_ + { float, soft }, +#endif + { NULL, NULL } +};
CVS commit: src/tools/gcc
Module Name:src Committed By: matt Date: Wed Aug 17 18:34:13 UTC 2011 Modified Files: src/tools/gcc: mknative-gcc Log Message: Add an inline ex script to modify configargs.h for powerpc to auto-enable -msoft-float. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/tools/gcc/mknative-gcc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gcc/mknative-gcc diff -u src/tools/gcc/mknative-gcc:1.61 src/tools/gcc/mknative-gcc:1.62 --- src/tools/gcc/mknative-gcc:1.61 Sun Jul 3 12:26:02 2011 +++ src/tools/gcc/mknative-gcc Wed Aug 17 18:34:13 2011 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mknative-gcc,v 1.61 2011/07/03 12:26:02 mrg Exp $ +# $NetBSD: mknative-gcc,v 1.62 2011/08/17 18:34:13 matt Exp $ # # Shell script for generating all the constants needed for a native # platform build of src/gnu/dist/gcc. @@ -617,6 +617,32 @@ esac for f in $hfiles; do write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h $_TMPDIR/gcc/$f.h + if [ ${MACHINE_ARCH} = powerpc -a ${f} = configargs ] + then + ex __EOF__ $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h +/configuration_arguments/ s/$// +ya +i +#ifdef _SOFT_FLOAT_ +. +pu +s/;$/ -with-float=soft;/ +a +#else +#endif +. +. m +1 +/configure_default_options/ s/{ NULL.*$// +a +#ifdef _SOFT_FLOAT_ + { float, soft }, +#endif + { NULL, NULL } +}; +. +wq +__EOF__ + fi done # keep identical
CVS commit: src/external/bsd/tmux
Module Name:src Committed By: jmmv Date: Wed Aug 17 18:37:59 UTC 2011 Modified Files: src/external/bsd/tmux: README prepare-import.sh Log Message: Adjust instructions and import script in preparation for tmux 1.5. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/tmux/README \ src/external/bsd/tmux/prepare-import.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/README diff -u src/external/bsd/tmux/README:1.1 src/external/bsd/tmux/README:1.2 --- src/external/bsd/tmux/README:1.1 Thu Mar 10 09:10:41 2011 +++ src/external/bsd/tmux/README Wed Aug 17 18:37:59 2011 @@ -1,13 +1,15 @@ To update tmux to a new version: +- Build the package from pkgsrc and write down all -D flags passed to the + compiler. Autoconf is not generating a config.h file, so this is the + best we can do to get the build-time settings in place. - Use prepare-import.sh to regenerate the dist directory. -- Use configure from the distfile to generate new config.{h,mk} files. -- Copy the generated config.h to usr.bin/tmux. -- Update usr.bin/tmux/Makefile according to config.mk (in particular, the - list of files used from compat/ and the required libraries). +- Update usr.bin/tmux/Makefile to sync the CPPFLAGS to the list of -D flags + gathered earlier on. - Update the list of source files in usr.bin/tmux/Makefile with the new dist/*.c listing. - cvs import the contents of the new dist directory. +- Fix merge conflicts, if any. - Commit the changes to the reachover Makefiles. - Update doc/3RDPARTY with the new tmux version. - Add a note to doc/CHANGES about the new version. Index: src/external/bsd/tmux/prepare-import.sh diff -u src/external/bsd/tmux/prepare-import.sh:1.1 src/external/bsd/tmux/prepare-import.sh:1.2 --- src/external/bsd/tmux/prepare-import.sh:1.1 Thu Mar 10 09:10:41 2011 +++ src/external/bsd/tmux/prepare-import.sh Wed Aug 17 18:37:59 2011 @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: prepare-import.sh,v 1.1 2011/03/10 09:10:41 jmmv Exp $ +# $NetBSD: prepare-import.sh,v 1.2 2011/08/17 18:37:59 jmmv Exp $ # # Use this script to recreate the 'dist' subdirectory from a newly released # distfile. The script takes care of unpacking the distfile, removing any @@ -15,6 +15,8 @@ CLEAN_PATTERNS= CLEAN_PATTERNS=${CLEAN_PATTERNS} [A-Z]* +CLEAN_PATTERNS=${CLEAN_PATTERNS} aclocal.m4 +CLEAN_PATTERNS=${CLEAN_PATTERNS} etc CLEAN_PATTERNS=${CLEAN_PATTERNS} configure* err() { @@ -57,13 +59,6 @@ ( cd dist rm -rf ${CLEAN_PATTERNS} ) } -extract_version() { - local version=$(grep '^VERSION[ \t]*=' dist/Makefile | \ - cut -d '=' -f 2 | sed -e 's,[ \t]*,,g') - log Version is ${version} - echo ${version} usr.bin/tmux/version.txt -} - diff_dirs() { local old_dir=${1}; shift local new_dir=${1}; shift @@ -101,11 +96,10 @@ backup_dist extract_distfile ${distfile} ${distname} - extract_version cleanup_dist diff_dirs dist.old dist - log Don't forget to validate usr.bin/tmux/version.txt and to update \ - the version in doc/3RDPARTY + log Don't forget to update the -D flags in usr.bin/tmux/Makefile \ + and to update the version in doc/3RDPARTY } main ${@}
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: jmmv Date: Wed Aug 17 18:40:16 UTC 2011 Update of /cvsroot/src/external/bsd/tmux/dist In directory ivanova.netbsd.org:/tmp/cvs-serv28275 Log Message: Import tmux 1.5: CHANGES FROM 1.4 TO 1.5, 09 July 2011 * Support xterm mouse modes 1002 and 1003. * Change from a per-session stack of buffers to one global stack. This renders copy-buffer useless and makes buffer-limit now a server option. * Fix most-recently-used choice by avoiding reset the activity timer for unattached sessions every second. * Add a -P option to new-window and split-window to print the new window or pane index in target form (useful to pass it into other commands). * Handle a # at the end of a replacement string (such as status-left) correctly. * Support for UTF-8 mouse input (\033[1005h) which was added in xterm 262. If the new mouse-utf8 option is on, UTF-8 mouse input is enabled for all UTF-8 terminals. The option defaults to on if LANG etc are set in the same manner as the utf8 option. * Support for HP-UX. * Accept colours of the hex form #ff and translate to the nearest from the xterm(1) 256-colour set. * Clear the non-blocking IO flag (O_NONBLOCK) on the stdio file descriptors before closing them (fixes things like tmux ls cat). * Use TMPDIR if set. * Fix next and previous session functions to actually work. * Support -x and -y for new-session to specify the initial size of the window if created detached with -d. * Make bind-key accept characters with the top-bit-set and print them as octal. * Set $TMUX without the session when background jobs are run. * Simplify the way jobs work and drop the persist type, so all jobs are fire-and-forget. * Accept tcgetattr/tcsetattr(3) failure, fixes problems with fatal() if the terminal disappears while locked. * Add a -P option to detach to HUP the client's parent process (usually causing it to exit as well). * Support passing through escape sequences to the underlying terminal by using DCS with a tmux; prefix. * Prevent tiled producing a corrupt layout when only one column is needed. * Give each pane created in a tmux server a unique id (starting from 0), put it in the TMUX_PANE environment variable and accept it as a target. * Allow a start and end line to be specified for capture-pane which may be negative to capture part of the history. * Add -a and -s options to lsp to list all panes in the server or session respectively. Likewise add -s to lsw. * Change -t on display-message to be target-pane for the #[A-Z] replacements and add -c as target-client. * The attach-session command now prefers the most recently used unattached session. * Add -s option to detach-client to detach all clients attached to a session. * Add -t to list-clients. * Change window with mouse wheel over status line if mouse-select-window is on. * When mode-mouse is on, automatically enter copy mode when the mouse is dragged or the mouse wheel is used. Also exit copy mode when the mouse wheel is scrolled off the bottom. * Provide #h character pair for short hostname (no domain). * Don't use strnvis(3) for the title as it breaks UTF-8. * Use the tsl and fsl terminfo(5) capabilities to update terminal title and automatically fill them in on terminals with the XT capability (which means their title setting is xterm-compatible). * Add a new option, mouse-resize-pane. When on, panes may be resized by dragging their borders. * Fix crash by resetting last pane on {break,swap}-pane across windows. * Add three new copy-mode commands - select-line, copy-line, copy-end-of-line. * Support setting the xterm clipboard when copying from copy mode using the xterm escape sequence for the purpose (if xterm is configured to allow it). * Support xterm(1) cursor colour change sequences through terminfo(5) Cc (set) and Cr (reset) extensions. * Support DECSCUSR sequence to set the cursor style with two new terminfo(5) extensions, Cs and Csr. * Make the command-prompt custom prompts recognize the status-left option character pairs. * Add a respawn-pane command. * Add a couple of extra xterm-style keys that gnome terminal provides. * Allow the initial context on prompts to be set with the new -I option to command-prompt. Include the current window and session name in the prompt when renaming and add a new key binding ($) for rename session. * Option bell-on-alert added to trigger the terminal bell when there is an alert. * Change the list-keys format so that it shows the keys using actual tmux commands which should be able to be directly copied into the config file. * Show full targets for lsp/lsw -a. * Make confirm-before prompt customizable with -p option like command-prompt and add the character pairs #W and #P to the default kill-{pane,window} prompts. * Avoid sending data to suspended/locked clients. * Small memory leaks in error paths plugged. * Vi mode improvements. Status: Vendor Tag: TMUX Release Tags:
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: jmmv Date: Wed Aug 17 18:48:37 UTC 2011 Modified Files: src/external/bsd/tmux/dist: cmd-paste-buffer.c cmd-server-info.c cmd-string.c environ.c input.c job.c options.c screen-write.c screen.c server-fn.c session.c tty-acs.c tty-keys.c tty-term.c window.c src/external/bsd/tmux/dist/compat: imsg-buffer.c imsg.c Removed Files: src/external/bsd/tmux/dist: cmd-copy-buffer.c cmd-generic.c cmd-last-pane.c cmd-last-window.c cmd-lock-client.c cmd-lock-session.c cmd-next-layout.c cmd-next-window.c cmd-previous-layout.c cmd-previous-window.c cmd-set-window-option.c cmd-show-window-options.c layout-string.c Log Message: Fix merge conflicts after tmux 1.5 import. To generate a diff of this commit: cvs rdiff -u -r1.2 -r0 src/external/bsd/tmux/dist/cmd-copy-buffer.c cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/tmux/dist/cmd-generic.c \ src/external/bsd/tmux/dist/cmd-last-pane.c \ src/external/bsd/tmux/dist/cmd-last-window.c \ src/external/bsd/tmux/dist/cmd-lock-client.c \ src/external/bsd/tmux/dist/cmd-lock-session.c \ src/external/bsd/tmux/dist/cmd-next-layout.c \ src/external/bsd/tmux/dist/cmd-next-window.c \ src/external/bsd/tmux/dist/cmd-previous-layout.c \ src/external/bsd/tmux/dist/cmd-previous-window.c \ src/external/bsd/tmux/dist/cmd-set-window-option.c \ src/external/bsd/tmux/dist/cmd-show-window-options.c \ src/external/bsd/tmux/dist/layout-string.c cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tmux/dist/cmd-paste-buffer.c \ src/external/bsd/tmux/dist/cmd-server-info.c \ src/external/bsd/tmux/dist/cmd-string.c \ src/external/bsd/tmux/dist/environ.c src/external/bsd/tmux/dist/input.c \ src/external/bsd/tmux/dist/job.c src/external/bsd/tmux/dist/options.c \ src/external/bsd/tmux/dist/screen-write.c \ src/external/bsd/tmux/dist/screen.c \ src/external/bsd/tmux/dist/server-fn.c \ src/external/bsd/tmux/dist/session.c src/external/bsd/tmux/dist/tty-acs.c \ src/external/bsd/tmux/dist/tty-keys.c \ src/external/bsd/tmux/dist/tty-term.c src/external/bsd/tmux/dist/window.c cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tmux/dist/compat/imsg-buffer.c \ src/external/bsd/tmux/dist/compat/imsg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/cmd-paste-buffer.c diff -u src/external/bsd/tmux/dist/cmd-paste-buffer.c:1.2 src/external/bsd/tmux/dist/cmd-paste-buffer.c:1.3 --- src/external/bsd/tmux/dist/cmd-paste-buffer.c:1.2 Sat Mar 12 03:02:58 2011 +++ src/external/bsd/tmux/dist/cmd-paste-buffer.c Wed Aug 17 18:48:35 2011 @@ -1,4 +1,4 @@ -/* $Id: cmd-paste-buffer.c,v 1.2 2011/03/12 03:02:58 christos Exp $ */ +/* $Id: cmd-paste-buffer.c,v 1.3 2011/08/17 18:48:35 jmmv Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott n...@users.sourceforge.net @@ -27,131 +27,73 @@ * Paste paste buffer if present. */ -struct cmd_paste_buffer_data { - char *target; - int buffer; - - int flag_delete; - char *sepstr; -}; - -void cmd_paste_buffer_init(struct cmd *, int); -int cmd_paste_buffer_parse(struct cmd *, int, char **, char **); int cmd_paste_buffer_exec(struct cmd *, struct cmd_ctx *); + void cmd_paste_buffer_filter( - struct window_pane *, const char *, size_t, char *); -void cmd_paste_buffer_free(struct cmd *); -size_t cmd_paste_buffer_print(struct cmd *, char *, size_t); + struct window_pane *, const char *, size_t, const char *); const struct cmd_entry cmd_paste_buffer_entry = { paste-buffer, pasteb, + db:rs:t:, 0, 0, [-dr] [-s separator] [-b buffer-index] [-t target-pane], - 0, , - cmd_paste_buffer_init, - cmd_paste_buffer_parse, - cmd_paste_buffer_exec, - cmd_paste_buffer_free, - cmd_paste_buffer_print + 0, + NULL, + NULL, + cmd_paste_buffer_exec }; -/* ARGSUSED */ -void -cmd_paste_buffer_init(struct cmd *self, unused int arg) -{ - struct cmd_paste_buffer_data *data; - - self-data = data = xmalloc(sizeof *data); - data-target = NULL; - data-buffer = -1; - data-flag_delete = 0; - data-sepstr = xstrdup(\r); -} - -int -cmd_paste_buffer_parse(struct cmd *self, int argc, char **argv, char **cause) -{ - struct cmd_paste_buffer_data *data; - int opt, n; - const char *errstr; - - cmd_paste_buffer_init(self, 0); - data = self-data; - - while ((opt = getopt(argc, argv, b:ds:t:r)) != -1) { - switch (opt) { - case 'b': - if (data-buffer == -1) { -n = strtonum(optarg, 0, INT_MAX, errstr); -if (errstr != NULL) { - xasprintf(cause, buffer %s, errstr); - goto error; -} -data-buffer = n; - } - break; - case 'd': - data-flag_delete = 1; - break; - case 's': - if (data-sepstr != NULL) -xfree(data-sepstr); - data-sepstr = xstrdup(optarg); - break; - case 't': - if (data-target == NULL) -data-target = xstrdup(optarg); -
CVS commit: src/external/bsd/tmux/usr.bin/tmux
Module Name:src Committed By: jmmv Date: Wed Aug 17 18:51:10 UTC 2011 Modified Files: src/external/bsd/tmux/usr.bin/tmux: Makefile Removed Files: src/external/bsd/tmux/usr.bin/tmux: config.h version.txt Log Message: Adjust reachover Makefiles after tmux 1.5 import. The new code has quite a bit of warnings to be fixed. I did not realize until merge-resolving time that christos@ had fixed such warnings in our copy of tmux 1.4 and assumed these warnings were new and thus could just be disabled. Therefore, I'm disabling some global warning checks as a temporary measure to bring the tree back to a buildable state. I will take a look at these warnings afterwards. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tmux/usr.bin/tmux/Makefile cvs rdiff -u -r1.2 -r0 src/external/bsd/tmux/usr.bin/tmux/config.h cvs rdiff -u -r1.1 -r0 src/external/bsd/tmux/usr.bin/tmux/version.txt Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/usr.bin/tmux/Makefile diff -u src/external/bsd/tmux/usr.bin/tmux/Makefile:1.4 src/external/bsd/tmux/usr.bin/tmux/Makefile:1.5 --- src/external/bsd/tmux/usr.bin/tmux/Makefile:1.4 Tue Aug 16 07:57:21 2011 +++ src/external/bsd/tmux/usr.bin/tmux/Makefile Wed Aug 17 18:51:10 2011 @@ -1,7 +1,6 @@ -# $NetBSD: Makefile,v 1.4 2011/08/16 07:57:21 christos Exp $ +# $NetBSD: Makefile,v 1.5 2011/08/17 18:51:10 jmmv Exp $ .include bsd.own.mk -WARNS?= 4 SRCDIR= ${NETBSDSRCDIR}/external/bsd/tmux/dist .PATH: ${SRCDIR} @@ -11,7 +10,12 @@ PROG= tmux MAN= tmux.1 -SRCS= attributes.c +WARNS?= 4 +CWARNFLAGS+= -Wno-cast-qual +CWARNFLAGS+= -Wno-pointer-sign + +SRCS= arguments.c +SRCS+= attributes.c SRCS+= cfg.c SRCS+= client.c SRCS+= clock.c @@ -27,14 +31,12 @@ SRCS+= cmd-clock-mode.c SRCS+= cmd-command-prompt.c SRCS+= cmd-confirm-before.c -SRCS+= cmd-copy-buffer.c SRCS+= cmd-copy-mode.c SRCS+= cmd-delete-buffer.c SRCS+= cmd-detach-client.c SRCS+= cmd-display-message.c SRCS+= cmd-display-panes.c SRCS+= cmd-find-window.c -SRCS+= cmd-generic.c SRCS+= cmd-has-session.c SRCS+= cmd-if-shell.c SRCS+= cmd-join-pane.c @@ -42,8 +44,6 @@ SRCS+= cmd-kill-server.c SRCS+= cmd-kill-session.c SRCS+= cmd-kill-window.c -SRCS+= cmd-last-pane.c -SRCS+= cmd-last-window.c SRCS+= cmd-link-window.c SRCS+= cmd-list-buffers.c SRCS+= cmd-list-clients.c @@ -54,22 +54,17 @@ SRCS+= cmd-list-windows.c SRCS+= cmd-list.c SRCS+= cmd-load-buffer.c -SRCS+= cmd-lock-client.c SRCS+= cmd-lock-server.c -SRCS+= cmd-lock-session.c SRCS+= cmd-move-window.c SRCS+= cmd-new-session.c SRCS+= cmd-new-window.c -SRCS+= cmd-next-layout.c -SRCS+= cmd-next-window.c SRCS+= cmd-paste-buffer.c SRCS+= cmd-pipe-pane.c -SRCS+= cmd-previous-layout.c -SRCS+= cmd-previous-window.c SRCS+= cmd-refresh-client.c SRCS+= cmd-rename-session.c SRCS+= cmd-rename-window.c SRCS+= cmd-resize-pane.c +SRCS+= cmd-respawn-pane.c SRCS+= cmd-respawn-window.c SRCS+= cmd-rotate-window.c SRCS+= cmd-run-shell.c @@ -83,12 +78,10 @@ SRCS+= cmd-set-buffer.c SRCS+= cmd-set-environment.c SRCS+= cmd-set-option.c -SRCS+= cmd-set-window-option.c SRCS+= cmd-show-buffer.c SRCS+= cmd-show-environment.c SRCS+= cmd-show-messages.c SRCS+= cmd-show-options.c -SRCS+= cmd-show-window-options.c SRCS+= cmd-source-file.c SRCS+= cmd-split-window.c SRCS+= cmd-start-server.c @@ -112,12 +105,12 @@ SRCS+= key-string.c SRCS+= layout-custom.c SRCS+= layout-set.c -SRCS+= layout-string.c SRCS+= layout.c SRCS+= log.c SRCS+= mode-key.c SRCS+= names.c SRCS+= options.c +SRCS+= options-table.c SRCS+= osdep-netbsd.c SRCS+= paste.c SRCS+= resize.c @@ -145,24 +138,73 @@ SRCS+= xterm-keys.c # Files in compat/ +#SRCS+= forkpty-hpux.c SRCS+= imsg-buffer.c SRCS+= imsg.c SRCS+= strtonum.c #SRCS+= unvis.c #SRCS+= vis.c -VERSION!= cat $(.CURDIR)/version.txt -CPPFLAGS+= -DBUILD=\$(VERSION)\ CPPFLAGS+= -I${SRCDIR} -I${.CURDIR} -COPTS.cmd-paste-buffer.c+= -Wno-stack-protector -COPTS.cmd-server-info.c+= -Wno-stack-protector -COPTS.imsg-buffer.c+= -Wno-stack-protector -COPTS.imsg.c+= -Wno-stack-protector -COPTS.screen.c+= -Wno-stack-protector -COPTS.status.c+= -Wno-format-nonliteral +# The following flags have been extracted from the compiler command-line +# generated by Automake and Autoconf when building tmux under NetBSD. +# Would be nicer to stick this in a config.h file, but the upstream code +# does not use one at this moment. +CPPFLAGS+= -DPACKAGE_TARNAME=\tmux\ +CPPFLAGS+= -DPACKAGE_VERSION=\1.5\ +CPPFLAGS+= -DPACKAGE_STRING=\tmux\ 1.5\ +CPPFLAGS+= -DPACKAGE_BUGREPORT=\\ +CPPFLAGS+= -DPACKAGE_URL=\\ +CPPFLAGS+= -DPACKAGE=\tmux\ +CPPFLAGS+= -DVERSION=\1.5\ +CPPFLAGS+= -DSTDC_HEADERS=1 +CPPFLAGS+= -DHAVE_SYS_TYPES_H=1 +CPPFLAGS+= -DHAVE_SYS_STAT_H=1 +CPPFLAGS+= -DHAVE_STDLIB_H=1 +CPPFLAGS+=
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: matt Date: Wed Aug 17 18:52:01 UTC 2011 Modified Files: src/sys/arch/powerpc/booke/pci: pq3pci.c src/sys/arch/powerpc/ibm4xx/dev: ibm405gp.c src/sys/arch/powerpc/include: pci_machdep.h src/sys/arch/powerpc/marvell: pci_machdep.c src/sys/arch/powerpc/pci: pci_machdep_common.c Log Message: First pass of the new PCI MSI/MSI ABI definitions. (return EOPNOTSUPP for now). To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/booke/pci/pq3pci.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/ibm4xx/dev/ibm405gp.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/include/pci_machdep.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/marvell/pci_machdep.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/pci/pci_machdep_common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/booke/pci/pq3pci.c diff -u src/sys/arch/powerpc/booke/pci/pq3pci.c:1.9 src/sys/arch/powerpc/booke/pci/pq3pci.c:1.10 --- src/sys/arch/powerpc/booke/pci/pq3pci.c:1.9 Wed Aug 17 00:59:47 2011 +++ src/sys/arch/powerpc/booke/pci/pq3pci.c Wed Aug 17 18:52:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pq3pci.c,v 1.9 2011/08/17 00:59:47 dyoung Exp $ */ +/* $NetBSD: pq3pci.c,v 1.10 2011/08/17 18:52:00 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -44,7 +44,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pq3pci.c,v 1.9 2011/08/17 00:59:47 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: pq3pci.c,v 1.10 2011/08/17 18:52:00 matt Exp $); #include sys/param.h #include sys/device.h @@ -1468,6 +1468,22 @@ pc-pc_intr_establish = pq3pci_intr_establish; pc-pc_intr_disestablish = pq3pci_intr_disestablish; pc-pc_conf_interrupt = pq3pci_conf_interrupt; + + pc-pc_msi_v = sc; + genppc_pci_chipset_msi_init(pc); +#if 0 + pc-pc_msi_request = pq3pci_msi_request; + pc-pc_msi_available = pq3pci_msi_available; + pc-pc_msi_type = pq3pci_msi_type; + pc-pc_msi_string = pq3pci_msi_string; + pc-pc_msi_evcnt = genppc_pci_msi_evcnt; + pc-pc_msi_establish = pq3pci_msi_establish; + pc-pc_msix_establish = pq3pci_msix_establish; + pc-pc_msi_disestablish = pq3pci_msi_disestablish; + pc-pc_msi_release = pq3pci_msi_release; + pc-pc_msi_free = pq3pci_msi_free; +#endif + pc-pc_decompose_tag = pq3pci_decompose_tag; pc-pc_conf_hook = pq3pci_conf_hook; Index: src/sys/arch/powerpc/ibm4xx/dev/ibm405gp.c diff -u src/sys/arch/powerpc/ibm4xx/dev/ibm405gp.c:1.6 src/sys/arch/powerpc/ibm4xx/dev/ibm405gp.c:1.7 --- src/sys/arch/powerpc/ibm4xx/dev/ibm405gp.c:1.6 Wed Jun 22 18:06:34 2011 +++ src/sys/arch/powerpc/ibm4xx/dev/ibm405gp.c Wed Aug 17 18:52:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ibm405gp.c,v 1.6 2011/06/22 18:06:34 matt Exp $ */ +/* $NetBSD: ibm405gp.c,v 1.7 2011/08/17 18:52:01 matt Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ibm405gp.c,v 1.6 2011/06/22 18:06:34 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: ibm405gp.c,v 1.7 2011/08/17 18:52:01 matt Exp $); #include sys/param.h #include sys/device.h @@ -77,6 +77,9 @@ .pc_intr_disestablish = genppc_pci_intr_disestablish, .pc_intr_setattr = ibm4xx_pci_intr_setattr, + .pc_msi_v = genppc_ibm4xx_chipset, + GENPPC_PCI_MSI_INITIALIZER, + .pc_conf_interrupt = ibm4xx_pci_conf_interrupt, .pc_decompose_tag = ibm4xx_pci_decompose_tag, .pc_conf_hook = ibm4xx_pci_conf_hook, Index: src/sys/arch/powerpc/include/pci_machdep.h diff -u src/sys/arch/powerpc/include/pci_machdep.h:1.11 src/sys/arch/powerpc/include/pci_machdep.h:1.12 --- src/sys/arch/powerpc/include/pci_machdep.h:1.11 Wed Jun 22 18:06:34 2011 +++ src/sys/arch/powerpc/include/pci_machdep.h Wed Aug 17 18:52:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.h,v 1.11 2011/06/22 18:06:34 matt Exp $ */ +/* $NetBSD: pci_machdep.h,v 1.12 2011/08/17 18:52:00 matt Exp $ */ /*- * Copyright (c) 2002,2007 The NetBSD Foundation, Inc. @@ -44,6 +44,7 @@ * Types provided to machine-independent PCI code */ typedef struct genppc_pci_chipset *pci_chipset_tag_t; +typedef void *pci_msi_handle_t; typedef int pcitag_t; typedef int pci_intr_handle_t; @@ -87,6 +88,21 @@ int pci_intr_setattr(pci_chipset_tag_t, pci_intr_handle_t *, int, uint64_t); +int pci_msi_request(const struct pci_attach_args *, + pci_msi_handle_t *, size_t, int, int); +int pci_msi_type(pci_chipset_tag_t, pci_msi_handle_t); +size_t pci_msi_available(pci_chipset_tag_t, pci_msi_handle_t); +const char * pci_msi_string(pci_chipset_tag_t, pci_msi_handle_t, size_t); +const struct evcnt * + pci_msi_evcnt(pci_chipset_tag_t, pci_msi_handle_t, size_t); +void * pci_msi_establish(pci_chipset_tag_t, pci_msi_handle_t, size_t, + int, int (*)(void *), void *); +void * pci_msix_establish(pci_chipset_tag_t,
CVS commit: src/doc
Module Name:src Committed By: jmmv Date: Wed Aug 17 18:54:08 UTC 2011 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of tmux 1.5. To generate a diff of this commit: cvs rdiff -u -r1.859 -r1.860 src/doc/3RDPARTY cvs rdiff -u -r1.1596 -r1.1597 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.859 src/doc/3RDPARTY:1.860 --- src/doc/3RDPARTY:1.859 Wed Aug 17 12:03:47 2011 +++ src/doc/3RDPARTY Wed Aug 17 18:54:08 2011 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.859 2011/08/17 12:03:47 wiz Exp $ +# $NetBSD: 3RDPARTY,v 1.860 2011/08/17 18:54:08 jmmv Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1050,7 +1050,7 @@ for the import. Package: tmux -Version: 1.4 +Version: 1.5 Current Vers: 1.5 Maintainer: Nicholas Marriott n...@users.sourceforge.net Archive site: http://downloads.sourceforge.net/tmux/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1596 src/doc/CHANGES:1.1597 --- src/doc/CHANGES:1.1596 Wed Aug 17 09:18:37 2011 +++ src/doc/CHANGES Wed Aug 17 18:54:08 2011 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1596 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1597 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -1106,4 +1106,4 @@ gpio(4), gpiosim(4): Build as modules. [mbalmer 20110812] mips: add support for MIPS DSP v2 ASE. [matt 20110815] sparc: Switch to GCC 4.5.3 [mrg 20110817] - + tmux(1): Import of tmux 1.5. [jmmv 20110817]
CVS commit: src/external/bsd/tmux
Module Name:src Committed By: jmmv Date: Wed Aug 17 19:28:37 UTC 2011 Modified Files: src/external/bsd/tmux/dist: input-keys.c input.c tty-keys.c tty-term.c window-copy.c src/external/bsd/tmux/usr.bin/tmux: Makefile Log Message: Reenable all warning checks and fix fallover. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/tmux/dist/input-keys.c \ src/external/bsd/tmux/dist/window-copy.c cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tmux/dist/input.c \ src/external/bsd/tmux/dist/tty-keys.c \ src/external/bsd/tmux/dist/tty-term.c cvs rdiff -u -r1.5 -r1.6 src/external/bsd/tmux/usr.bin/tmux/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/input-keys.c diff -u src/external/bsd/tmux/dist/input-keys.c:1.1.1.2 src/external/bsd/tmux/dist/input-keys.c:1.2 --- src/external/bsd/tmux/dist/input-keys.c:1.1.1.2 Wed Aug 17 18:40:04 2011 +++ src/external/bsd/tmux/dist/input-keys.c Wed Aug 17 19:28:36 2011 @@ -1,4 +1,4 @@ -/* $Id: input-keys.c,v 1.1.1.2 2011/08/17 18:40:04 jmmv Exp $ */ +/* $Id: input-keys.c,v 1.2 2011/08/17 19:28:36 jmmv Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott n...@users.sourceforge.net @@ -207,9 +207,12 @@ if (wp-screen-mode ALL_MOUSE_MODES) { if (wp-screen-mode MODE_MOUSE_UTF8) { len = xsnprintf(buf, sizeof buf, \033[M); - len += utf8_split2(m-b + 32, buf[len]); - len += utf8_split2(m-x + 33, buf[len]); - len += utf8_split2(m-y + 33, buf[len]); + len += utf8_split2(m-b + 32, + (unsigned char *)buf[len]); + len += utf8_split2(m-x + 33, + (unsigned char *)buf[len]); + len += utf8_split2(m-y + 33, + (unsigned char *)buf[len]); } else { if (m-b 223 || m-x = 222 || m-y 222) return; Index: src/external/bsd/tmux/dist/window-copy.c diff -u src/external/bsd/tmux/dist/window-copy.c:1.1.1.2 src/external/bsd/tmux/dist/window-copy.c:1.2 --- src/external/bsd/tmux/dist/window-copy.c:1.1.1.2 Wed Aug 17 18:40:05 2011 +++ src/external/bsd/tmux/dist/window-copy.c Wed Aug 17 19:28:36 2011 @@ -1,4 +1,4 @@ -/* $Id: window-copy.c,v 1.1.1.2 2011/08/17 18:40:05 jmmv Exp $ */ +/* $Id: window-copy.c,v 1.2 2011/08/17 19:28:36 jmmv Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott n...@users.sourceforge.net @@ -1344,7 +1344,7 @@ off--; /* remove final \n */ if (options_get_number(global_options, set-clipboard)) - screen_write_setselection(wp-ictx.ctx, buf, off); + screen_write_setselection(wp-ictx.ctx, (u_char *)buf, off); /* Add the buffer to the stack. */ limit = options_get_number(global_options, buffer-limit); Index: src/external/bsd/tmux/dist/input.c diff -u src/external/bsd/tmux/dist/input.c:1.3 src/external/bsd/tmux/dist/input.c:1.4 --- src/external/bsd/tmux/dist/input.c:1.3 Wed Aug 17 18:48:36 2011 +++ src/external/bsd/tmux/dist/input.c Wed Aug 17 19:28:36 2011 @@ -1,4 +1,4 @@ -/* $Id: input.c,v 1.3 2011/08/17 18:48:36 jmmv Exp $ */ +/* $Id: input.c,v 1.4 2011/08/17 19:28:36 jmmv Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott n...@users.sourceforge.net @@ -1430,7 +1430,7 @@ /* Check for tmux prefix. */ if (ictx-input_len = prefix_len - strncmp(ictx-input_buf, prefix, prefix_len) == 0) { + strncmp((const char *)ictx-input_buf, prefix, prefix_len) == 0) { screen_write_rawstring(ictx-ctx, ictx-input_buf + prefix_len, ictx-input_len - prefix_len); } @@ -1470,11 +1470,11 @@ switch (option) { case 0: case 2: - screen_set_title(ictx-ctx.s, p); + screen_set_title(ictx-ctx.s, (const char *)p); server_status_window(ictx-wp-window); break; case 12: - screen_set_cursor_colour(ictx-ctx.s, p); + screen_set_cursor_colour(ictx-ctx.s, (const char *)p); break; case 112: if (*p == '\0') /* No arguments allowed. */ Index: src/external/bsd/tmux/dist/tty-keys.c diff -u src/external/bsd/tmux/dist/tty-keys.c:1.3 src/external/bsd/tmux/dist/tty-keys.c:1.4 --- src/external/bsd/tmux/dist/tty-keys.c:1.3 Wed Aug 17 18:48:36 2011 +++ src/external/bsd/tmux/dist/tty-keys.c Wed Aug 17 19:28:36 2011 @@ -1,4 +1,4 @@ -/* $Id: tty-keys.c,v 1.3 2011/08/17 18:48:36 jmmv Exp $ */ +/* $Id: tty-keys.c,v 1.4 2011/08/17 19:28:36 jmmv Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott n...@users.sourceforge.net @@ -462,7 +462,7 @@ } /* Is this a mouse key press? */ - switch (tty_keys_mouse(tty, buf, len, size, mouse)) { + switch (tty_keys_mouse(tty, (const char *)buf, len, size, mouse)) { case 0: /* yes */ evbuffer_drain(tty-event-input, size); key = KEYC_MOUSE; Index: src/external/bsd/tmux/dist/tty-term.c diff -u src/external/bsd/tmux/dist/tty-term.c:1.3 src/external/bsd/tmux/dist/tty-term.c:1.4 --- src/external/bsd/tmux/dist/tty-term.c:1.3 Wed Aug 17 18:48:36 2011 +++ src/external/bsd/tmux/dist/tty-term.c Wed Aug 17 19:28:36 2011 @@ -1,4 +1,4 @@ -/* $Id: tty-term.c,v 1.3 2011/08/17
CVS commit: src/sys/uvm
Module Name:src Committed By: rmind Date: Wed Aug 17 20:46:27 UTC 2011 Modified Files: src/sys/uvm: uvm_amap.c Log Message: amap_cow_now: just free the fresh anon on error, no need to dispose it. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/uvm/uvm_amap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_amap.c diff -u src/sys/uvm/uvm_amap.c:1.102 src/sys/uvm/uvm_amap.c:1.103 --- src/sys/uvm/uvm_amap.c:1.102 Sat Aug 6 17:25:03 2011 +++ src/sys/uvm/uvm_amap.c Wed Aug 17 20:46:27 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_amap.c,v 1.102 2011/08/06 17:25:03 rmind Exp $ */ +/* $NetBSD: uvm_amap.c,v 1.103 2011/08/17 20:46:27 rmind Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_amap.c,v 1.102 2011/08/06 17:25:03 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_amap.c,v 1.103 2011/08/17 20:46:27 rmind Exp $); #include opt_uvmhist.h @@ -1039,17 +1039,11 @@ npg = NULL; } if (nanon == NULL || npg == NULL) { - - /* - * XXXCDC: we should cause fork to fail, but we can't. - */ - + amap_unlock(amap); if (nanon) { nanon-an_ref--; KASSERT(nanon-an_ref == 0); -uvm_anon_freelst(amap, nanon); - } else { -amap_unlock(amap); +uvm_anon_free(nanon); } uvm_wait(cownowpage); goto ReStart;
CVS commit: src/sys/arch/xen/conf
Module Name:src Committed By: joerg Date: Wed Aug 17 21:42:16 UTC 2011 Modified Files: src/sys/arch/xen/conf: Makefile.xen Log Message: Works with clang's integrated assembler now. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/xen/conf/Makefile.xen Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/xen/conf/Makefile.xen diff -u src/sys/arch/xen/conf/Makefile.xen:1.33 src/sys/arch/xen/conf/Makefile.xen:1.34 --- src/sys/arch/xen/conf/Makefile.xen:1.33 Mon May 30 15:06:32 2011 +++ src/sys/arch/xen/conf/Makefile.xen Wed Aug 17 21:42:16 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.xen,v 1.33 2011/05/30 15:06:32 joerg Exp $ +# $NetBSD: Makefile.xen,v 1.34 2011/08/17 21:42:16 joerg Exp $ # NetBSD: Makefile.i386,v 1.132 2003/07/05 16:56:10 simonb Exp # Makefile for NetBSD @@ -55,8 +55,6 @@ ## KERN_AS= obj -AFLAGS.linux32_sigcode.S+= ${${ACTIVE_CC} == clang:?-no-integrated-as:} -AFLAGS.netbsd32_sigcode.S+= ${${ACTIVE_CC} == clang:?-no-integrated-as:} CWARNFLAGS.ah_regdomain.c= ${${ACTIVE_CC} == clang:?-Wno-error:} ##
CVS commit: src/usr.bin/midiplay
Module Name:src Committed By: joerg Date: Wed Aug 17 22:16:42 UTC 2011 Modified Files: src/usr.bin/midiplay: Makefile Log Message: Fix disable stricter format string messages with clang again. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/midiplay/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/midiplay/Makefile diff -u src/usr.bin/midiplay/Makefile:1.5 src/usr.bin/midiplay/Makefile:1.6 --- src/usr.bin/midiplay/Makefile:1.5 Sun Aug 14 13:26:23 2011 +++ src/usr.bin/midiplay/Makefile Wed Aug 17 22:16:42 2011 @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.5 2011/08/14 13:26:23 christos Exp $ +# $NetBSD: Makefile,v 1.6 2011/08/17 22:16:42 joerg Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= midiplay +CWARNFLAGS.clang+= -Wno-format-extra-args .include bsd.prog.mk
CVS commit: src/sys/arch/i386/stand/mbr/gptmbr
Module Name:src Committed By: joerg Date: Wed Aug 17 22:26:40 UTC 2011 Modified Files: src/sys/arch/i386/stand/mbr/gptmbr: Makefile Log Message: .code16 user, so disable integrated assembler with clang for now. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/i386/stand/mbr/gptmbr/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/mbr/gptmbr/Makefile diff -u src/sys/arch/i386/stand/mbr/gptmbr/Makefile:1.1 src/sys/arch/i386/stand/mbr/gptmbr/Makefile:1.2 --- src/sys/arch/i386/stand/mbr/gptmbr/Makefile:1.1 Wed Aug 17 00:25:05 2011 +++ src/sys/arch/i386/stand/mbr/gptmbr/Makefile Wed Aug 17 22:26:40 2011 @@ -1,8 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2011/08/17 00:25:05 jakllsch Exp $ +# $NetBSD: Makefile,v 1.2 2011/08/17 22:26:40 joerg Exp $ PROG= gptmbr.bin SRCS= gptmbr.S +AFLAGS.gptmbr.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:} + .include ../Makefile.mbr LOADADDR= 0
CVS commit: src/usr.bin/make
Module Name:src Committed By: sjg Date: Thu Aug 18 00:00:21 UTC 2011 Modified Files: src/usr.bin/make: meta.c Log Message: If a target is explicitly flagged .META, a missing .meta file means it is out-of-date. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/make/meta.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/meta.c diff -u src/usr.bin/make/meta.c:1.20 src/usr.bin/make/meta.c:1.21 --- src/usr.bin/make/meta.c:1.20 Wed Jun 22 21:13:12 2011 +++ src/usr.bin/make/meta.c Thu Aug 18 00:00:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.20 2011/06/22 21:13:12 sjg Exp $ */ +/* $NetBSD: meta.c,v 1.21 2011/08/18 00:00:21 sjg Exp $ */ /* * Implement 'meta' mode. @@ -1254,6 +1254,12 @@ oodate = TRUE; Lst_Destroy(missingFiles, (FreeProc *)free); } +} else { + if ((gn-type OP_META)) { + if (DEBUG(META)) + fprintf(debug_file, %s: required but missing\n, fname); + oodate = TRUE; + } } if (oodate ignoreOODATE) { /*
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: christos Date: Thu Aug 18 02:08:07 UTC 2011 Modified Files: src/sys/dev/i2c: dbcool.c Log Message: fix gcc-4.5 warnings To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/dev/i2c/dbcool.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/i2c/dbcool.c diff -u src/sys/dev/i2c/dbcool.c:1.33 src/sys/dev/i2c/dbcool.c:1.34 --- src/sys/dev/i2c/dbcool.c:1.33 Tue Aug 2 10:06:15 2011 +++ src/sys/dev/i2c/dbcool.c Wed Aug 17 22:08:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dbcool.c,v 1.33 2011/08/02 14:06:15 pgoyette Exp $ */ +/* $NetBSD: dbcool.c,v 1.34 2011/08/18 02:08:06 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dbcool.c,v 1.33 2011/08/02 14:06:15 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: dbcool.c,v 1.34 2011/08/18 02:08:06 christos Exp $); #include sys/param.h #include sys/systm.h @@ -1542,7 +1542,7 @@ #ifdef DBCOOL_DEBUG ret = sysctl_createv(sc-sc_sysctl_log, 0, NULL, - (const struct sysctlnode **)node, + (void *)node, CTLFLAG_READWRITE, CTLTYPE_INT, reg_select, NULL, sysctl_dbcool_reg_select, 0, sc, sizeof(int), @@ -1551,7 +1551,7 @@ node-sysctl_data = sc; ret = sysctl_createv(sc-sc_sysctl_log, 0, NULL, - (const struct sysctlnode **)node, + (void *)node, CTLFLAG_READWRITE, CTLTYPE_INT, reg_access, NULL, sysctl_dbcool_reg_access, 0, sc, sizeof(int),
CVS commit: src/sys/dev/pci
Module Name:src Committed By: christos Date: Thu Aug 18 02:09:45 UTC 2011 Modified Files: src/sys/dev/pci: radeonfb.c Log Message: fix gcc-4.5 warnings To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/radeonfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/radeonfb.c diff -u src/sys/dev/pci/radeonfb.c:1.45 src/sys/dev/pci/radeonfb.c:1.46 --- src/sys/dev/pci/radeonfb.c:1.45 Thu Jul 21 11:25:14 2011 +++ src/sys/dev/pci/radeonfb.c Wed Aug 17 22:09:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: radeonfb.c,v 1.45 2011/07/21 15:25:14 njoly Exp $ */ +/* $NetBSD: radeonfb.c,v 1.46 2011/08/18 02:09:44 christos Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -70,7 +70,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: radeonfb.c,v 1.45 2011/07/21 15:25:14 njoly Exp $); +__KERNEL_RCSID(0, $NetBSD: radeonfb.c,v 1.46 2011/08/18 02:09:44 christos Exp $); #define RADEONFB_DEFAULT_DEPTH 8 @@ -828,8 +828,7 @@ /* and make up the list */ dp-rd_wsscreenlist.nscreens = 1; - dp-rd_wsscreenlist.screens = - (const struct wsscreen_descr **)dp-rd_wsscreens; + dp-rd_wsscreenlist.screens = (void *)dp-rd_wsscreens; vcons_init(dp-rd_vd, dp, dp-rd_wsscreens, radeonfb_accessops);
CVS commit: src/sys/dev/adb
Module Name:src Committed By: christos Date: Thu Aug 18 02:18:41 UTC 2011 Modified Files: src/sys/dev/adb: adb_kbd.c adb_ms.c Log Message: Fix gcc-4.5 warnings. If you still see them, e-mail them to me. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/dev/adb/adb_kbd.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/adb/adb_ms.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/adb/adb_kbd.c diff -u src/sys/dev/adb/adb_kbd.c:1.14 src/sys/dev/adb/adb_kbd.c:1.15 --- src/sys/dev/adb/adb_kbd.c:1.14 Thu Jul 28 12:28:12 2011 +++ src/sys/dev/adb/adb_kbd.c Wed Aug 17 22:18:40 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: adb_kbd.c,v 1.14 2011/07/28 16:28:12 macallan Exp $ */ +/* $NetBSD: adb_kbd.c,v 1.15 2011/08/18 02:18:40 christos Exp $ */ /* * Copyright (C) 1998 Colin Wood @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: adb_kbd.c,v 1.14 2011/07/28 16:28:12 macallan Exp $); +__KERNEL_RCSID(0, $NetBSD: adb_kbd.c,v 1.15 2011/08/18 02:18:40 christos Exp $); #include sys/param.h #include sys/device.h @@ -667,14 +667,14 @@ CTL_MACHDEP, CTL_CREATE, CTL_EOL); ret = sysctl_createv(NULL, 0, NULL, - (const struct sysctlnode **)node, + (void *)node, CTLFLAG_READWRITE | CTLFLAG_OWNDESC, CTLTYPE_INT, middle, middle mouse button, adbkbd_sysctl_mid, 1, sc, 0, CTL_MACHDEP, me-sysctl_num, CTL_CREATE, CTL_EOL); ret = sysctl_createv(NULL, 0, NULL, - (const struct sysctlnode **)node, + (void *)node, CTLFLAG_READWRITE | CTLFLAG_OWNDESC, CTLTYPE_INT, right, right mouse button, adbkbd_sysctl_right, 2, sc, 0, CTL_MACHDEP, me-sysctl_num, CTL_CREATE, Index: src/sys/dev/adb/adb_ms.c diff -u src/sys/dev/adb/adb_ms.c:1.11 src/sys/dev/adb/adb_ms.c:1.12 --- src/sys/dev/adb/adb_ms.c:1.11 Mon Aug 1 08:28:53 2011 +++ src/sys/dev/adb/adb_ms.c Wed Aug 17 22:18:40 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: adb_ms.c,v 1.11 2011/08/01 12:28:53 mbalmer Exp $ */ +/* $NetBSD: adb_ms.c,v 1.12 2011/08/18 02:18:40 christos Exp $ */ /* * Copyright (C) 1998 Colin Wood @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: adb_ms.c,v 1.11 2011/08/01 12:28:53 mbalmer Exp $); +__KERNEL_RCSID(0, $NetBSD: adb_ms.c,v 1.12 2011/08/18 02:18:40 christos Exp $); #include sys/param.h #include sys/device.h @@ -179,17 +179,17 @@ /* print out the type of mouse we have */ switch (sc-sc_adbdev-handler_id) { case ADBMS_100DPI: - printf(%d-button, %d dpi mouse\n, sc-sc_buttons, - (int)(sc-sc_res)); + printf(%d-button, %u dpi mouse\n, sc-sc_buttons, + sc-sc_res); break; case ADBMS_200DPI: sc-sc_res = 200; - printf(%d-button, %d dpi mouse\n, sc-sc_buttons, - (int)(sc-sc_res)); + printf(%d-button, %u dpi mouse\n, sc-sc_buttons, + sc-sc_res); break; case ADBMS_MSA3: - printf(Mouse Systems A3 mouse, %d-button, %d dpi\n, - sc-sc_buttons, (int)(sc-sc_res)); + printf(Mouse Systems A3 mouse, %d-button, %u dpi\n, + sc-sc_buttons, sc-sc_res); break; case ADBMS_USPEED: printf(MicroSpeed mouse, default parameters\n); @@ -235,8 +235,8 @@ printf(unknown device); break; } - printf( %s %d-button, %d dpi\n, sc-sc_devid, - sc-sc_buttons, (int)(sc-sc_res)); + printf( %s %d-button, %u dpi\n, sc-sc_devid, + sc-sc_buttons, sc-sc_res); } break; default: @@ -390,6 +390,7 @@ memcpy(buffer, sc-sc_buffer, len); if (sc-sc_msg_len == 8) { + uint16_t res; /* we have a true EMP device */ #ifdef ADB_PRINT_EMP @@ -397,10 +398,11 @@ buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], buffer[5], buffer[6], buffer[7]); #endif + memcpy(sc-sc_devid, buffer[0], 4); + memcpy(res, buffer[4], sizeof(res)); + sc-sc_res = res; sc-sc_class = buffer[6]; sc-sc_buttons = buffer[7]; - sc-sc_res = (int)*(short *)buffer[4]; -memcpy(sc-sc_devid, (buffer[0]), 4); } else if (buffer[0] == 0x9a ((buffer[1] == 0x20) || (buffer[1] == 0x21))) { /*
CVS commit: src/sys/conf
Module Name:src Committed By: christos Date: Thu Aug 18 02:19:20 UTC 2011 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Remove gcc-4.5 hacks To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/conf/Makefile.kern.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/Makefile.kern.inc diff -u src/sys/conf/Makefile.kern.inc:1.145 src/sys/conf/Makefile.kern.inc:1.146 --- src/sys/conf/Makefile.kern.inc:1.145 Thu Aug 11 18:37:57 2011 +++ src/sys/conf/Makefile.kern.inc Wed Aug 17 22:19:20 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.145 2011/08/11 22:37:57 jmcneill Exp $ +# $NetBSD: Makefile.kern.inc,v 1.146 2011/08/18 02:19:20 christos Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -516,15 +516,6 @@ .endfor .endif -# XXX ugly ugly to fix -.if defined(HAVE_GCC) ${HAVE_GCC} == 45 -CWARNFLAGS.tulip.c+= ${${ACTIVE_CC} == gcc:?-Wno-array-bounds:} -CWARNFLAGS.radeonfb.c+= -Wno-cast-qual -CWARNFLAGS.dbcool.c+= -Wno-cast-qual -CWARNFLAGS.adb_kbd.c+= -Wno-cast-qual -CWARNFLAGS.adb_ms.c+= -Wno-cast-qual -.endif - AFLAGS+= ${AOPTS.${.IMPSRC:T}} CFLAGS+= ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}}
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: christos Date: Thu Aug 18 02:21:02 UTC 2011 Modified Files: src/sys/compat/linux/common: linux_exec.c Log Message: sizeof type - sizeof *var To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/compat/linux/common/linux_exec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/common/linux_exec.c diff -u src/sys/compat/linux/common/linux_exec.c:1.114 src/sys/compat/linux/common/linux_exec.c:1.115 --- src/sys/compat/linux/common/linux_exec.c:1.114 Tue Jul 6 21:30:35 2010 +++ src/sys/compat/linux/common/linux_exec.c Wed Aug 17 22:21:02 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec.c,v 1.114 2010/07/07 01:30:35 chs Exp $ */ +/* $NetBSD: linux_exec.c,v 1.115 2011/08/18 02:21:02 christos Exp $ */ /*- * Copyright (c) 1994, 1995, 1998, 2000, 2007, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: linux_exec.c,v 1.114 2010/07/07 01:30:35 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: linux_exec.c,v 1.115 2011/08/18 02:21:02 christos Exp $); #include sys/param.h #include sys/systm.h @@ -165,7 +165,7 @@ { struct linux_emuldata *led2; - led2 = kmem_zalloc(sizeof(struct linux_emuldata), KM_SLEEP); + led2 = kmem_zalloc(sizeof(*led2), KM_SLEEP); l2-l_emuldata = led2; } @@ -202,5 +202,5 @@ led = l-l_emuldata; l-l_emuldata = NULL; - kmem_free(led, sizeof (struct linux_emuldata)); + kmem_free(led, sizeof(*led)); }
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: christos Date: Thu Aug 18 02:26:39 UTC 2011 Modified Files: src/sys/compat/linux/common: linux_sched.c Log Message: Better debugging. To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/compat/linux/common/linux_sched.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/common/linux_sched.c diff -u src/sys/compat/linux/common/linux_sched.c:1.64 src/sys/compat/linux/common/linux_sched.c:1.65 --- src/sys/compat/linux/common/linux_sched.c:1.64 Sun Jun 5 04:42:59 2011 +++ src/sys/compat/linux/common/linux_sched.c Wed Aug 17 22:26:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_sched.c,v 1.64 2011/06/05 08:42:59 dsl Exp $ */ +/* $NetBSD: linux_sched.c,v 1.65 2011/08/18 02:26:38 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: linux_sched.c,v 1.64 2011/06/05 08:42:59 dsl Exp $); +__KERNEL_RCSID(0, $NetBSD: linux_sched.c,v 1.65 2011/08/18 02:26:38 christos Exp $); #include sys/param.h #include sys/mount.h @@ -63,7 +63,14 @@ #include compat/linux/common/linux_sched.h -static int linux_clone_nptl(struct lwp *, const struct linux_sys_clone_args *, register_t *); +static int linux_clone_nptl(struct lwp *, const struct linux_sys_clone_args *, +register_t *); + +#if DEBUG_LINUX +#define DPRINTF(x) uprintf x +#else +#define DPRINTF(x) +#endif static void linux_child_return(void *arg) @@ -72,18 +79,20 @@ struct proc *p = l-l_proc; struct linux_emuldata *led = l-l_emuldata; void *ctp = led-led_child_tidptr; + int error; if (ctp) { - if (copyout(p-p_pid, ctp, sizeof(p-p_pid)) != 0) + if ((error = copyout(p-p_pid, ctp, sizeof(p-p_pid))) != 0) printf(%s: LINUX_CLONE_CHILD_SETTID - failed (child_tidptr = %p, tid = %d)\n, - __func__, ctp, p-p_pid); + failed (child_tidptr = %p, tid = %d error =%d)\n, + __func__, ctp, p-p_pid, error); } child_return(arg); } int -linux_sys_clone(struct lwp *l, const struct linux_sys_clone_args *uap, register_t *retval) +linux_sys_clone(struct lwp *l, const struct linux_sys_clone_args *uap, +register_t *retval) { /* { syscallarg(int) flags; @@ -100,7 +109,7 @@ * We don't support the Linux CLONE_PID or CLONE_PTRACE flags. */ if (SCARG(uap, flags) (LINUX_CLONE_PID|LINUX_CLONE_PTRACE)) - return (EINVAL); + return EINVAL; /* * Thread group implies shared signals. Shared signals @@ -108,17 +117,16 @@ */ if (SCARG(uap, flags) LINUX_CLONE_THREAD (SCARG(uap, flags) LINUX_CLONE_SIGHAND) == 0) - return (EINVAL); + return EINVAL; if (SCARG(uap, flags) LINUX_CLONE_SIGHAND (SCARG(uap, flags) LINUX_CLONE_VM) == 0) - return (EINVAL); + return EINVAL; /* * The thread group flavor is implemented totally differently. */ - if (SCARG(uap, flags) LINUX_CLONE_THREAD) { + if (SCARG(uap, flags) LINUX_CLONE_THREAD) return linux_clone_nptl(l, uap, retval); - } flags = 0; if (SCARG(uap, flags) LINUX_CLONE_VM) @@ -134,7 +142,7 @@ sig = SCARG(uap, flags) LINUX_CLONE_CSIGNAL; if (sig 0 || sig = LINUX__NSIG) - return (EINVAL); + return EINVAL; sig = linux_to_native_signo[sig]; if (SCARG(uap, flags) LINUX_CLONE_CHILD_SETTID) { @@ -149,8 +157,10 @@ * that makes this adjustment is a noop. */ if ((error = fork1(l, flags, sig, SCARG(uap, stack), 0, - linux_child_return, NULL, retval, p)) != 0) + linux_child_return, NULL, retval, p)) != 0) { + DPRINTF((%s: fork1: error %d\n, __func__, error)); return error; + } return 0; } @@ -183,7 +193,7 @@ tnprocs = atomic_inc_uint_nv(nprocs); if (__predict_false(tnprocs = maxproc) || kauth_authorize_process(l-l_cred, KAUTH_PROCESS_FORK, p, -KAUTH_ARG(tnprocs), NULL, NULL) != 0) { + KAUTH_ARG(tnprocs), NULL, NULL) != 0) { atomic_dec_uint(nprocs); return EAGAIN; } @@ -195,9 +205,9 @@ } error = lwp_create(l, p, uaddr, LWP_DETACHED | LWP_PIDLID, - SCARG(uap, stack), 0, child_return, NULL, l2, - l-l_class); + SCARG(uap, stack), 0, child_return, NULL, l2, l-l_class); if (__predict_false(error)) { + DPRINTF((%s: lwp_create error=%d\n, __func__, error)); atomic_dec_uint(nprocs); uvm_uarea_free(uaddr); return error; @@ -212,23 +222,25 @@ /* LINUX_CLONE_PARENT_SETTID: store child's TID in parent's memory */ if (flags LINUX_CLONE_PARENT_SETTID) { - if (copyout(lid, parent_tidptr, sizeof(lid)) != 0) + if ((error = copyout(lid, parent_tidptr, sizeof(lid))) != 0) printf(%s: LINUX_CLONE_PARENT_SETTID - failed (parent_tidptr = %p tid = %d)\n, - __func__, parent_tidptr, lid); + failed (parent_tidptr = %p tid = %d error=%d)\n, + __func__, parent_tidptr, lid, error); } /* LINUX_CLONE_CHILD_SETTID: store child's TID in child's memory */ if (flags
CVS commit: src/regress/sys/kern/getcwd
Module Name:src Committed By: christos Date: Thu Aug 18 02:32:32 UTC 2011 Modified Files: src/regress/sys/kern/getcwd: Makefile getcwd.c Log Message: provide the out of address space test in a gcc-4.5 friendly way. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/regress/sys/kern/getcwd/Makefile cvs rdiff -u -r1.9 -r1.10 src/regress/sys/kern/getcwd/getcwd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/regress/sys/kern/getcwd/Makefile diff -u src/regress/sys/kern/getcwd/Makefile:1.6 src/regress/sys/kern/getcwd/Makefile:1.7 --- src/regress/sys/kern/getcwd/Makefile:1.6 Tue Jun 21 22:49:43 2011 +++ src/regress/sys/kern/getcwd/Makefile Wed Aug 17 22:32:32 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2011/06/22 02:49:43 mrg Exp $ +# $NetBSD: Makefile,v 1.7 2011/08/18 02:32:32 christos Exp $ NOMAN= # defined LDSTATIC= -static @@ -15,8 +15,3 @@ @find /usr -type d -print | ./getcwd -s .include bsd.prog.mk - -# getcwd.c has an on-purpuse array bounds violation -.if ${HAVE_GCC} == 45 -COPTS.getcwd.c+= -Wno-error -.endif Index: src/regress/sys/kern/getcwd/getcwd.c diff -u src/regress/sys/kern/getcwd/getcwd.c:1.9 src/regress/sys/kern/getcwd/getcwd.c:1.10 --- src/regress/sys/kern/getcwd/getcwd.c:1.9 Mon Apr 28 16:23:06 2008 +++ src/regress/sys/kern/getcwd/getcwd.c Wed Aug 17 22:32:32 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: getcwd.c,v 1.9 2008/04/28 20:23:06 martin Exp $ */ +/* $NetBSD: getcwd.c,v 1.10 2011/08/18 02:32:32 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -343,7 +343,7 @@ CHECK(/, __getcwd(kbuf, 0xdeadbeef), -1, ERANGE); /* large negative */ CHECK(/, __getcwd(kbuf, 0x7000beef), 2, 0); /* large positive, rounds down */ CHECK(/, __getcwd(kbuf, 0x1), 2, 0); /* slightly less large positive, rounds down */ - CHECK(/, __getcwd(kbuf+0x10, sizeof(kbuf)), -1, EFAULT); /* outside address space */ + CHECK(/, __getcwd((void *)0x1, sizeof(kbuf)), -1, EFAULT); /* outside address space */ CHECK(/, __getcwd(0, 30), -1, EFAULT); CHECK(/, __getcwd((void*)0xdeadbeef, 30), -1, EFAULT); CHECK(/, __getcwd(kbuf, 2), 2, 0);
CVS commit: src/tests/lib/libcurses/director
Module Name:src Committed By: christos Date: Thu Aug 18 02:44:46 UTC 2011 Modified Files: src/tests/lib/libcurses/director: Makefile testlang_parse.y Log Message: Fix enums confusion. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libcurses/director/Makefile cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libcurses/director/testlang_parse.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libcurses/director/Makefile diff -u src/tests/lib/libcurses/director/Makefile:1.3 src/tests/lib/libcurses/director/Makefile:1.4 --- src/tests/lib/libcurses/director/Makefile:1.3 Tue Jun 28 22:36:26 2011 +++ src/tests/lib/libcurses/director/Makefile Wed Aug 17 22:44:45 2011 @@ -19,8 +19,4 @@ CWARNFLAGS.clang+= -Wno-format -Wno-conversion -.if ${HAVE_GCC} == 45 -COPTS.testlang_parse.c+= -Wno-enum-compare -.endif - .include bsd.test.mk Index: src/tests/lib/libcurses/director/testlang_parse.y diff -u src/tests/lib/libcurses/director/testlang_parse.y:1.7 src/tests/lib/libcurses/director/testlang_parse.y:1.8 --- src/tests/lib/libcurses/director/testlang_parse.y:1.7 Sat Jun 18 16:05:56 2011 +++ src/tests/lib/libcurses/director/testlang_parse.y Wed Aug 17 22:44:45 2011 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: testlang_parse.y,v 1.7 2011/06/18 20:05:56 joerg Exp $ */ +/* $NetBSD: testlang_parse.y,v 1.8 2011/08/18 02:44:45 christos Exp $ */ /*- * Copyright 2009 Brett Lymn bl...@netbsd.org @@ -231,10 +231,9 @@ vars[command.returns[0].return_index].name, returns_enum_names[command.returns[1].return_type]); - if (((command.returns[1].return_type == arg_byte) + if (((command.returns[1].return_type == ret_byte) (vars[command.returns[0].return_index].type != ret_byte)) || - ((command.returns[1].return_type == arg_static) - (vars[command.returns[0].return_index].type != ret_string))) + vars[command.returns[0].return_index].type != ret_string) err(1, Var type %s (%d) does not match return type %s (%d), returns_enum_names[vars[command.returns[0].return_index].type], vars[command.returns[0].return_index].type, @@ -1329,7 +1328,7 @@ var_data = data; len = var_data-len; cmd = var_data-value; - if (var_data-type == arg_byte) + if (type == arg_byte) send_type = ret_byte; else send_type = ret_string;
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Thu Aug 18 02:56:21 UTC 2011 Modified Files: src/sys/arch/sgimips/dev: crime.c crimevar.h Log Message: device_t-ify To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/sgimips/dev/crime.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sgimips/dev/crimevar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crime.c diff -u src/sys/arch/sgimips/dev/crime.c:1.35 src/sys/arch/sgimips/dev/crime.c:1.36 --- src/sys/arch/sgimips/dev/crime.c:1.35 Fri Jul 1 18:53:45 2011 +++ src/sys/arch/sgimips/dev/crime.c Thu Aug 18 02:56:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crime.c,v 1.35 2011/07/01 18:53:45 dyoung Exp $ */ +/* $NetBSD: crime.c,v 1.36 2011/08/18 02:56:21 macallan Exp $ */ /* * Copyright (c) 2004 Christopher SEKIYA @@ -38,7 +38,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: crime.c,v 1.35 2011/07/01 18:53:45 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: crime.c,v 1.36 2011/08/18 02:56:21 macallan Exp $); #include sys/param.h #include sys/device.h @@ -61,8 +61,8 @@ #define DISABLE_CRIME_WATCHDOG -static int crime_match(struct device *, struct cfdata *, void *); -static void crime_attach(struct device *, struct device *, void *); +static int crime_match(device_t, struct cfdata *, void *); +static void crime_attach(device_t, device_t, void *); void crime_bus_reset(void); void crime_watchdog_reset(void); void crime_watchdog_disable(void); @@ -72,7 +72,7 @@ static bus_space_tag_t crm_iot; static bus_space_handle_t crm_ioh; -CFATTACH_DECL(crime, sizeof(struct crime_softc), +CFATTACH_DECL_NEW(crime, sizeof(struct crime_softc), crime_match, crime_attach, NULL, NULL); #define CRIME_NINTR 32 /* XXX */ @@ -83,7 +83,7 @@ } crime[CRIME_NINTR]; static int -crime_match(struct device *parent, struct cfdata *match, void *aux) +crime_match(device_t parent, struct cfdata *match, void *aux) { /* @@ -96,14 +96,16 @@ } static void -crime_attach(struct device *parent, struct device *self, void *aux) +crime_attach(device_t parent, device_t self, void *aux) { struct mainbus_attach_args *ma = aux; struct cpu_info * const ci = curcpu(); + struct crime_softc *sc = device_private(self); uint64_t crm_id; uint64_t baseline, endline; uint32_t startctr, endctr, cps; + sc-sc_dev = self; crm_iot = SGIMIPS_BUS_SPACE_CRIME; if (bus_space_map(crm_iot, ma-ma_addr, 0 /* XXX */, Index: src/sys/arch/sgimips/dev/crimevar.h diff -u src/sys/arch/sgimips/dev/crimevar.h:1.8 src/sys/arch/sgimips/dev/crimevar.h:1.9 --- src/sys/arch/sgimips/dev/crimevar.h:1.8 Fri Jul 1 18:53:45 2011 +++ src/sys/arch/sgimips/dev/crimevar.h Thu Aug 18 02:56:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crimevar.h,v 1.8 2011/07/01 18:53:45 dyoung Exp $ */ +/* $NetBSD: crimevar.h,v 1.9 2011/08/18 02:56:21 macallan Exp $ */ /* * Copyright (c) 2003 Christopher SEKIYA @@ -35,7 +35,7 @@ #include sys/bus.h struct crime_softc { - struct device sc_dev; + device_t sc_dev; }; void crime_intr_mask(unsigned int);
CVS commit: src/sys/arch/sgimips/mace
Module Name:src Committed By: macallan Date: Thu Aug 18 03:25:34 UTC 2011 Modified Files: src/sys/arch/sgimips/mace: mace.c Log Message: device_t-ify To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sgimips/mace/mace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/mace/mace.c diff -u src/sys/arch/sgimips/mace/mace.c:1.17 src/sys/arch/sgimips/mace/mace.c:1.18 --- src/sys/arch/sgimips/mace/mace.c:1.17 Fri Jul 1 18:53:47 2011 +++ src/sys/arch/sgimips/mace/mace.c Thu Aug 18 03:25:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mace.c,v 1.17 2011/07/01 18:53:47 dyoung Exp $ */ +/* $NetBSD: mace.c,v 1.18 2011/08/18 03:25:34 macallan Exp $ */ /* * Copyright (c) 2003 Christopher Sekiya @@ -45,7 +45,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mace.c,v 1.17 2011/07/01 18:53:47 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: mace.c,v 1.18 2011/08/18 03:25:34 macallan Exp $); #include sys/param.h #include sys/systm.h @@ -87,7 +87,7 @@ } maceintrtab[MACE_NINTR]; struct mace_softc { - struct device sc_dev; + device_t sc_dev; bus_space_tag_t iot; bus_space_handle_t ioh; @@ -105,7 +105,7 @@ static int mace_search(struct device *, struct cfdata *, const int *, void *); -CFATTACH_DECL(mace, sizeof(struct mace_softc), +CFATTACH_DECL_NEW(mace, sizeof(struct mace_softc), mace_match, mace_attach, NULL, NULL); #if defined(BLINK) @@ -114,7 +114,7 @@ #endif static int -mace_match(struct device *parent, struct cfdata *match, void *aux) +mace_match(device_t parent, struct cfdata *match, void *aux) { /* @@ -127,12 +127,13 @@ } static void -mace_attach(struct device *parent, struct device *self, void *aux) +mace_attach(device_t parent, device_t self, void *aux) { - struct mace_softc *sc = (struct mace_softc *)self; + struct mace_softc *sc = device_private(self); struct mainbus_attach_args *ma = aux; uint32_t scratch; + sc-sc_dev = self; #ifdef BLINK callout_init(mace_blink_ch, 0); #endif @@ -202,10 +203,10 @@ } static int -mace_search(struct device *parent, struct cfdata *cf, +mace_search(device_t parent, struct cfdata *cf, const int *ldesc, void *aux) { - struct mace_softc *sc = (struct mace_softc *)parent; + struct mace_softc *sc = device_private(parent); struct mace_attach_args maa; int tryagain;
CVS commit: othersrc/crypto/external/bsd/ssss/dist/src/libssss
Module Name:othersrc Committed By: agc Date: Thu Aug 18 04:19:47 UTC 2011 Modified Files: othersrc/crypto/external/bsd//dist/src/lib: secsplit.c Log Message: With thanks to yamt for the heads-up, and to tls for the suggestion, needs a csprng - use arc4random(3) rather than random(3) for an unpredictable source of randomness. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ othersrc/crypto/external/bsd//dist/src/lib/secsplit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/crypto/external/bsd//dist/src/lib/secsplit.c diff -u othersrc/crypto/external/bsd//dist/src/lib/secsplit.c:1.1.1.1 othersrc/crypto/external/bsd//dist/src/lib/secsplit.c:1.2 --- othersrc/crypto/external/bsd//dist/src/lib/secsplit.c:1.1.1.1 Mon Mar 21 05:43:35 2011 +++ othersrc/crypto/external/bsd//dist/src/lib/secsplit.c Thu Aug 18 04:19:47 2011 @@ -170,7 +170,7 @@ /*** Code related to splitting */ /* Return a random number from 0 to n-1. */ -#define CRANDOM(x) (uint32_t)(random() % (x)) +#define CRANDOM(x) (uint32_t)(arc4random() % (x)) /* * Evaluate the given polynomial, n coefficients, at point x=i.