Re: CVS commit: src
On Mar 29, 8:23pm, pe...@piermont.com (Perry E. Metzger) wrote: -- Subject: Re: CVS commit: src | | Martin Husemann mar...@duskware.de writes: | On Sun, Mar 29, 2009 at 02:59:59PM +, Christos Zoulas wrote: | Or add some syntax to the file for optional assignments, like: | | ddb.onpanic?=1 | or | ddb.onpanic?ddb.onpanic=1 | | I like those two variants (not sure which one better). | | The second reminds me too much of the C ternary operator. The first | seems better for that reason. or defined(ddb.onpanic) ddb.onpanic=1 christos
re: CVS commit: src/external/bsd/bind/dist/bin/named
On Apr 25, 1:31am, m...@eterna.com.au (matthew green) wrote: -- Subject: re: CVS commit: src/external/bsd/bind/dist/bin/named |Perhaps you are confusing this directory with /var/chroot/named/etc/namedb? | | i'm saying that named should be configured to have this dir as | the cwd and then the permissions check you removed will pass. I take it that this dir means /var/chroot/named/etc/namedb, then perhaps yes. I agree although not 100%, since my current tree looks like: $ ls -al /var/chroot/named/etc/namedb drwxr-xr-x 6 root wheel 512 Jul 19 2008 ./ drwxr-xr-x 4 root wheel 512 Jul 19 2008 ../ -rw-r--r-- 1 root wheel 259 Dec 3 2004 127 -r--r--r-- 1 root wheel 1525 May 30 2008 Makefile drwxr-xr-x 2 root wheel 512 Feb 15 2006 RCS/ drwxr-xr-x 2 named named 512 Nov 4 2004 cache/ drwxr-xr-x 3 named named 512 Apr 23 2007 pri/ -r--r--r-- 1 root wheel 2517 Nov 1 2007 root.cache drwxr-xr-x 2 named named 3584 Apr 24 11:40 sec/ [my primary zones are in pri and my secondary zones in sec] And I don't really see the need to make the whole namedb directory owned by named. Even the pri directory does not need to be writable by named. | the bug here is that your named is running chrooted an unprived | in /var/chroot/named with cwd, not the etc/namedb subdir. Well, it needs to chroot there, but then it could chdir() to etc/namedb. I will look if this is feasible when I get some cycles. For now commenting out the test is the same behavior that we had in the previous versions of named. christos
Re: CVS commit: src/etc/rc.d
In article 87k55c4jkd@snark.cb.piermont.com, Perry E. Metzger pe...@piermont.com wrote: Christos Zoulas chris...@netbsd.org writes: Module Name: src Committed By:christos Date:Wed Apr 22 18:27:03 UTC 2009 Modified Files: src/etc/rc.d: named Log Message: Adjust for new default location of the pid file. Seems kind of weird to have stuff in /var/run/named/named.pid -- what's the point? 2486. [func] The default locations for named.pid and lwresd.pid are now /var/run/named/named.pid and /var/run/lwresd/lwresd.pid respectively. This allows the owner of the containing directory to be set, for named -u support, and allows there to be a permanent symbolic link in the path, for named -t support. [RT #18306] christos
Re: CVS commit: src/sys/dev/scsipi
On May 13, 7:56am, christoph_eg...@gmx.de (Christoph Egger) wrote: -- Subject: Re: CVS commit: src/sys/dev/scsipi | Christos Zoulas wrote: | Module Name:src | Committed By: christos | Date: Wed May 13 02:35:25 UTC 2009 | | Modified Files: | src/sys/dev/scsipi: scsipiconf.h | | Log Message: | sprinkle #ifdef _KERNEL to make scsictl compile. | | | Ah, the device_t change exposed something that shouldn't | be visible in userspace, it seems. | | Thanks for fixing it and sorry for build breakage. | I should have also compile-tested userland of one arch at least, | not just many kernels. Not a problem. I think that the parts of this file that are needed from scsictl don't really belong there, since none of the structures seem to be useable from userland. christos
Re: CVS commit: src/crypto/external/bsd/netpgp/dist
In article 20090525160949.gr14...@nef.pbox.org, Alistair Crooks a...@pkgsrc.org wrote: Hi Arnaud, everyone, On Thu, May 21, 2009 at 10:59:04PM -0400, Arnaud Lacombe wrote: I've been seeing a lot of commit and activity in netpgp. Do you mind sending me a small paragraph [for the next CVS activity report] about what you're doing in it and what is already possible and what direction does it take ? Yeah, there's no secret about what I'm doing with it, but just to clarify: netpgp is a high-level layer which sits on top of a heavily-modified openpgpsdk, and provides a library interface defined in /usr/include/netpgp.h - the main functions are: int netpgp_encrypt_file(netpgp_t *, char *, char *, char *, int); int netpgp_decrypt_file(netpgp_t *, char *, char *, int); int netpgp_sign_file(netpgp_t *, char *, char *, char *, int, int, int); int netpgp_verify_file(netpgp_t *, char *, const char *, int); Shouldn't most of those char *'s be const char *, and in the code the result of the __ops_functions should be checked, and appropriate errnos set? christos
Re: CVS commit: src/external/ibm-public
In article 20090623150257.9023e17...@cvs.netbsd.org, Matthias Scheler source-changes-d@NetBSD.org wrote: Module Name: src Committed By: tron Date: Tue Jun 23 15:02:56 UTC 2009 Added Files: src/external/ibm-public: Makefile src/external/ibm-public/postfix: Makefile Makefile.inc postfix2netbsd src/external/ibm-public/postfix/README_FILES: Makefile src/external/ibm-public/postfix/anvil: Makefile src/external/ibm-public/postfix/bounce: Makefile src/external/ibm-public/postfix/cleanup: Makefile src/external/ibm-public/postfix/conf: Makefile src/external/ibm-public/postfix/discard: Makefile src/external/ibm-public/postfix/dns: Makefile src/external/ibm-public/postfix/error: Makefile src/external/ibm-public/postfix/flush: Makefile src/external/ibm-public/postfix/global: Makefile src/external/ibm-public/postfix/html: Makefile src/external/ibm-public/postfix/local: Makefile src/external/ibm-public/postfix/man: Makefile src/external/ibm-public/postfix/man/man1: Makefile src/external/ibm-public/postfix/man/man5: Makefile src/external/ibm-public/postfix/man/man8: Makefile src/external/ibm-public/postfix/master: Makefile src/external/ibm-public/postfix/masterlib: Makefile src/external/ibm-public/postfix/milter: Makefile src/external/ibm-public/postfix/oqmgr: Makefile src/external/ibm-public/postfix/pickup: Makefile src/external/ibm-public/postfix/pipe: Makefile src/external/ibm-public/postfix/postalias: Makefile src/external/ibm-public/postfix/postcat: Makefile src/external/ibm-public/postfix/postconf: Makefile src/external/ibm-public/postfix/postdrop: Makefile src/external/ibm-public/postfix/postfix: Makefile src/external/ibm-public/postfix/postfix-etc: Makefile README src/external/ibm-public/postfix/postfix-script: Makefile src/external/ibm-public/postfix/postkick: Makefile src/external/ibm-public/postfix/postlock: Makefile src/external/ibm-public/postfix/postlog: Makefile src/external/ibm-public/postfix/postmap: Makefile src/external/ibm-public/postfix/postmulti: Makefile src/external/ibm-public/postfix/postqueue: Makefile src/external/ibm-public/postfix/postsuper: Makefile src/external/ibm-public/postfix/proxymap: Makefile src/external/ibm-public/postfix/qmgr: Makefile src/external/ibm-public/postfix/scache: Makefile src/external/ibm-public/postfix/sendmail: Makefile src/external/ibm-public/postfix/showq: Makefile src/external/ibm-public/postfix/smtp: Makefile src/external/ibm-public/postfix/smtpd: Makefile src/external/ibm-public/postfix/spawn: Makefile src/external/ibm-public/postfix/tls: Makefile src/external/ibm-public/postfix/tlsmgr: Makefile src/external/ibm-public/postfix/trivial-rewrite: Makefile src/external/ibm-public/postfix/util: Makefile src/external/ibm-public/postfix/verify: Makefile src/external/ibm-public/postfix/virtual: Makefile src/external/ibm-public/postfix/xsasl: Makefile Log Message: Add makefile framework to build Postfix 2.6.2. Don't turn it on yet as the Postfix 2.6.2 binary doesn't work yet because it cannot find /usr/libexec/postfix/postfix-script. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/ibm-public/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/Makefile \ src/external/ibm-public/postfix/Makefile.inc \ src/external/ibm-public/postfix/postfix2netbsd cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/README_FILES/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/anvil/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/bounce/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/cleanup/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/conf/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/discard/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/dns/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/error/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/flush/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/global/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/html/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/local/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/man/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/man/man1/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/man/man5/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/man/man8/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/master/Makefile cvs rdiff -u -r0 -r1.1 src/external/ibm-public/postfix/masterlib/Makefile cvs rdiff -u -r0 -r1.1
Re: CVS commit: src/sys/dev/pci
In article 090708000205.m0124267__27136.7730493241$1246978986$gmane$...@mirage.ceres.dti.ne.jp, Izumi Tsutsui tsut...@ceres.dti.ne.jp wrote: Log Message: pciioctl(), pci_devioctl(): simplify implementations of PCI_IOC_BDF_CFGREAD, PCI_IOC_BDF_CFGWRITE, PCI_IOC_CFGREAD, PCI_IOC_CFGWRITE No functional changes. : I will try memset(tag, 0, sizeof(tag)); in the default case and buildtest several kernel configs for different archs. When this succeeds, I will commit. I don't think it's a good idea to add a bogus statement for gcc to simplify implementation. It looks still better to move the PCI_IOC_BDF_CFGWRITE case and return ENOTTY for the default case into the first switch statement. Indeed. christos
Re: CVS commit: src/sys/dev/pci
On Jul 7, 11:13pm, christoph_eg...@gmx.de (Christoph Egger) wrote: -- Subject: Re: CVS commit: src/sys/dev/pci | Thanks for fixing it. | | (The crossbuild test with my proposed fix actually worked though. | It just finished.) No problem, I just thought that simplifying the code further and not initializing tag was the best way. christos
Re: CVS commit: src/sys/dev/gpio
In article 87ws5vmk70@snark.cb.piermont.com, Perry E. Metzger pe...@piermont.com wrote: Tonnerre LOMBARD tonne...@netbsd.ch writes: On Sun, Jul 26, 2009 at 12:48:06PM -0400, Perry E. Metzger wrote: That's another thing: quit being so rude to a new developer. Even if it was bad for him to do this commit, it would be unreasonable to tell him off so impolitely. I'd prefer of you left this judgment to him and me. I'm afraid that is not a reasonable request. I do not care who is right or wrong here, this is becoming a pissing competition. Things like these are better handled with personal e-mail and escallating through the proper channels rather than public floggings. We would like to foster a friendly environment here, not one where people are afraid to commit code because they will be yelled at. christos
Re: CVS commit: src/sys/sys
On Aug 10, 5:27pm, t...@netbsd.org (Matthias Scheler) wrote: -- Subject: Re: CVS commit: src/sys/sys | On Sun, Aug 09, 2009 at 09:20:02PM +, Christos Zoulas wrote: | In article 20090809210918.gc22...@drowsy.duskware.de, | Martin Husemann mar...@duskware.de wrote: | On Sun, Aug 09, 2009 at 09:29:50PM +0200, Tonnerre LOMBARD wrote: | Unfortunately, these are widely used headers. We don't want to break | -Wold-style-casts in general. | | Why not? | | It is IMHO a very useless and stupid warning. | | The new style casts are very useful because they show programming intent. | | Can't we instead do what Solaris does? | | #ifdef __cplusplus | extern C { | #endif | | [...] | #define __byte_swap_u64_constant(x) \ | ((uint64_t) \ | [...] | | #ifdef __cplusplus | } | #endif | | That should allows us to keep the old-casts and avoid warnings. This cannot possibly work because the syntax parsing happens after the macro is expanded and the macro is expanded in c++ code. christos
Re: CVS commit: src/sys/sys
On Aug 10, 7:03pm, t...@netbsd.org (Matthias Scheler) wrote: -- Subject: Re: CVS commit: src/sys/sys | On Mon, Aug 10, 2009 at 12:59:57PM -0400, Christos Zoulas wrote: | | That should allows us to keep the old-casts and avoid warnings. | | This cannot possibly work because the syntax parsing happens after the macro | is expanded and the macro is expanded in c++ code. | | Why would that matter? G++ should not complain about old style casts | in 'extern C' sections. | extern C { #define bar(a) (int)(a) }; void foo(void) { double d = 2; int a = bar(a); } The c function implemented as a macro should be able to be used in c++ code. christos
Re: CVS commit: src/usr.bin/error
On Aug 13, 10:19pm, dholland-sourcechan...@netbsd.org (David Holland) wrote: -- Subject: Re: CVS commit: src/usr.bin/error | On Thu, Aug 13, 2009 at 03:46:39PM +, Christos Zoulas wrote: | XXX: does this program actually do anything useful these days? | | Yes, it works just fine :-) I use it all the time. | | Better you than me :-) | | Maybe it should lose support for compilers that disappeared twenty | years ago, though. The error reporting syntax has not changed much! christos
Re: CVS commit: src/sys
In article 20090818060417.gf3...@snowdrop.l8s.co.uk, David Laight da...@l8s.co.uk wrote: On Mon, Aug 17, 2009 at 10:17:09PM -0400, Christos Zoulas wrote: Log Message: 1. some of the video24linux structs are not as machine independent as their authors want them to be. For the buffer ioctls, define new ioctls with the 32 bit buffer sizes. For the format struct, define it as packed so it is the same on 32 and 64 bit. (I might need to version this) You probably just want to use the '64bit integer with 32bit alignment' rather than marking the structure as packed. I looked for the 64 bit integer, and could not find it... Do you know why it is not packing well? christos
Re: CVS commit: src/sys/rump
On Sep 8, 10:02am, i...@bsdimp.com (M. Warner Losh) wrote: -- Subject: Re: CVS commit: src/sys/rump | In message: 20090908131801.gb17...@cs.hut.fi | Antti Kantee po...@cs.hut.fi writes: | : On Tue Sep 08 2009 at 13:02:55 +, Christos Zoulas wrote: | : In article 20090907174634.ga16...@cs.hut.fi, | : Antti Kantee po...@netbsd.org wrote: | : On Tue Sep 08 2009 at 03:28:35 +1000, matthew green wrote: | : | : Module Name:src | : Committed By: pooka | : Date: Mon Sep 7 13:02:37 UTC 2009 | : | : Modified Files: | : src/sys/rump: Makefile.rump | : | : Log Message: | : Always define __NetBSD__ (for builds on non-NetBSD) | : | : | : when does this happen? even builds on non-NetBSD should | : end up here with a compiler that defines __NetBSD__. | : | : When you are building the binaries to be used as libraries on non-NetBSD, | : i.e. not building NetBSD itself. | : | : Then perhaps we should be using a different CPP symbol? | : | : No, __NetBSD__ is right. For all purposes, code in the rump kernel *is* | : NetBSD. E.g. if you have #ifdef __NetBSD__ in a kernel driver which | : was imported from $OtherOS, you must have the rump version think it is | : running on NetBSD, since it technically speaking is. The difference to | : most cpp symbols is merely that __NetBSD__ comes from the compiler instead | : of from the kernel headers. Of course param.h could define something like | : __I_am_the_NetBSD__ and we could test against that in all of our NetBSD | : kernel code, but I don't see any benefit, especially since __NetBSD__ | : is a well established practise even outside NetBSD developers. | | __NetBSD__ is the *COMPILER* environment. Depending on it is *BAD*. | You need to use a different symbol. This is a bug in the NetBSD code | now. __NetBSD__ isn't, and never has bene, the KERNEL. That was my complaint exactly. I meant to say this in my next message :-) | Maybe __NetBSD_Version__ should be used instead? Its clearly NetBSD | kernel build environment specific (since it comes from sys/parma.h) | and doesn't muddy the waters with the differences between the | different BUILD systems. That is what I was thinking also. christos
Re: CVS commit: src/sys/rump
In article 20090908162339.ga11...@cs.hut.fi, ntti Kantee po...@cs.hut.fi wrote: Whoever finds this churn worth their effort, as dh pointed out, remember to replace all instances of __FreeBSD__, __OpenBSD__, __Linux__, __Slowaris__, __sMackOS__, __etc__ as well. The issue here is that we really don't want to override the symbols set by the compiler because a lot of code assumes that they are going to be set by the compiler, and not by other external means. Everytime I remember someone did this, it had to be reverted for one reason or the other. christos
Re: CVS commit: src/distrib
On Sep 21, 10:01pm, da...@l8s.co.uk (David Laight) wrote: -- Subject: Re: CVS commit: src/distrib | On Sun, Sep 20, 2009 at 05:32:17PM -0400, Christos Zoulas wrote: | | | Although posix defines strict rules for expressions with small | | numbers of arguments, netbsd'd parser doesn't obey them! | | Really? Can you give me an example. | | See PR/34646 | | $ test ! = foo This should prolly fix it... From FreeBSD. christos Index: test.c === RCS file: /cvsroot/src/bin/test/test.c,v retrieving revision 1.37 diff -u -u -r1.37 test.c --- test.c 10 Sep 2008 19:00:51 - 1.37 +++ test.c 21 Sep 2009 22:37:06 - @@ -153,8 +153,10 @@ {z, STREZ, UNOP}, }; +static int nargc; static char **t_wp; static struct t_op const *t_wp_op; +static int parenlevel; static void syntax(const char *, const char *); static int oexpr(enum token); @@ -165,8 +167,10 @@ static int test_access(struct stat *, mode_t); static int filstat(char *, enum token); static enum token t_lex(char *); -static int isoperand(void); static long long getn(const char *); +static int isunopoperand(void); +static int islparenoperand(void); +static int isrparenoperand(void); static int newerf(const char *, const char *); static int olderf(const char *, const char *); static int equalf(const char *, const char *); @@ -200,6 +204,8 @@ } #endif +#define GETARG (nargc 0 ? (--nargc, *++t_wp) : NULL) + #ifdef SHELL int testcmd(int, char **); @@ -228,13 +234,21 @@ argv[argc] = NULL; } - if (argc 2) + if (--argc = 0) return 1; + nargc = argc - 1; t_wp = argv[1]; - res = !oexpr(t_lex(*t_wp)); + parenlevel = 0; + if (nargc == 4 strcmp(*t_wp, !) == 0) { + /* Things like ! -o x do not fit in the normal grammar. */ + --nargc; + ++t_wp; + res = oexpr(t_lex(*t_wp)); + } else + res = !oexpr(t_lex(*t_wp)); - if (*t_wp != NULL *++t_wp != NULL) + if (--nargc 0) syntax(*t_wp, unexpected operator); return res; @@ -258,9 +272,10 @@ res = aexpr(n); if (*t_wp == NULL) return res; - if (t_lex(*++t_wp) == BOR) - return oexpr(t_lex(*++t_wp)) || res; + if (t_lex(GETARG) == BOR) + return oexpr(t_lex(GETARG)) || res; t_wp--; + nargc++; return res; } @@ -272,9 +287,10 @@ res = nexpr(n); if (*t_wp == NULL) return res; - if (t_lex(*++t_wp) == BAND) - return aexpr(t_lex(*++t_wp)) res; + if (t_lex(GETARG) == BAND) + return aexpr(t_lex(GETARG)) res; t_wp--; + nargc++; return res; } @@ -283,7 +299,7 @@ { if (n == UNOT) - return !nexpr(t_lex(*++t_wp)); + return !nexpr(t_lex(GETARG)); return primary(n); } @@ -296,30 +312,35 @@ if (n == EOI) return 0; /* missing expression */ if (n == LPAREN) { - if ((nn = t_lex(*++t_wp)) == RPAREN) + parenlevel++; + if ((nn = t_lex(GETARG)) == RPAREN) { + parenlevel--; return 0; /* missing expression */ + } res = oexpr(nn); - if (t_lex(*++t_wp) != RPAREN) + if (t_lex(GETARG) != RPAREN) syntax(NULL, closing paren expected); + parenlevel--; return res; } if (t_wp_op t_wp_op-op_type == UNOP) { /* unary expression */ - if (*++t_wp == NULL) + if (--nargc == 0) syntax(t_wp_op-op_text, argument expected); switch (n) { case STREZ: - return strlen(*t_wp) == 0; + return strlen(*++t_wp) == 0; case STRNZ: - return strlen(*t_wp) != 0; + return strlen(*++t_wp) != 0; case FILTT: - return isatty((int)getn(*t_wp)); + return isatty((int)getn(*++t_wp)); default: - return filstat(*t_wp, n); + return filstat(*++t_wp, n); } } - if (t_lex(t_wp[1]), t_wp_op t_wp_op-op_type == BINOP) { + if (t_lex(nargc 0 ? t_wp[1] : NULL), t_wp_op t_wp_op-op_type == + BINOP) { return binop(); } @@ -333,10 +354,10 @@ struct t_op const *op; opnd1 = *t_wp; - (void) t_lex(*++t_wp); + (void) t_lex(GETARG); op = t_wp_op; - if ((opnd2 = *++t_wp) == NULL) + if ((opnd2 = GETARG) == NULL) syntax(op-op_text
Re: CVS commit: src/distrib/sets/lists/base
In article 20091012094941.gf2...@sirion.coris.org.uk, Julian Coleman j...@coris.org.uk wrote: Hi, Uh. Why is it in there anyway? Because NetBSD/amd64 and NetBSD/sparc64 provide 32 bit libraries for COMPAT_NETBSD32. Does it make sense to add an extra reminder line to all the libraries that are in the md.amd64 and md.sparc64 set lists? Something like: --- shlib_version.dist 2009-10-12 10:42:03.0 +0100 +++ shlib_version 2009-10-12 10:48:45.0 +0100 @@ -1,4 +1,5 @@ # $NetBSD: shlib_version,v 1.10 2009/10/10 18:06:54 bad Exp $ # Remember to update distrib/sets/lists/base/shl.* when changing +# Remember to update distrib/sets/lists/base/md.* when changing major=1 minor=1 I was thinking more in line of auto-generated md lists from a config file and the mi list. christos
Re: CVS commit: src/usr.sbin/sup/source
On Oct 17, 12:44am, kar...@netbsd.org (Frank Kardel) wrote: -- Subject: Re: CVS commit: src/usr.sbin/sup/source | Hi Christos ! | | This seems to break build.sh release: | | cc1: warnings being treated as errors | /usr/src/usr.sbin/sup/sup/../source/supcmain.c: In function 'init': | /usr/src/usr.sbin/sup/sup/../source/supcmain.c:676: warning: assignment | from incompatible pointer type | /usr/src/usr.sbin/sup/sup/../source/supcmain.c:684: warning: passing | argument 2 of 'Tsearch' from incompatible pointer type | /usr/src/usr.sbin/sup/sup/../source/supcmain.c:698: warning: passing | argument 2 of 'parsecoll' from incompatible pointer type | | Frank Fixed, sorry. christos
Re: CVS commit: src/lib/libc/resolv
In article 20091024131259.ga17...@cs.hut.fi, Antti Kantee po...@cs.hut.fi wrote: On Sat Oct 24 2009 at 01:35:37 -0400, Christos Zoulas wrote: Module Name: src Committed By:christos Date:Sat Oct 24 05:35:37 UTC 2009 Modified Files: src/lib/libc/resolv: res_data.c res_init.c res_private.h res_send.c Log Message: Add a knote to keep track when resolv.conf gets changed and re-initialize. While here fix a memory leak when calling res_vinit with an already inited res_state. Does this mean firefox will continue working if I switch from wired to wireless and my IP changes? Yes, that is the point... If resolv.conf changes, programs keep working. If so, can we have this in NetBSD 5.1? (and thanks!) The change is small, but we should test it a few days before pulling it up. christos
Re: CVS commit: src/lib/libc/stdio
In article 20091025170934.bd83c17...@cvs.netbsd.org, David Laight source-changes-d@NetBSD.org wrote: -=-=-=-=-=- Module Name: src Committed By: dsl Date: Sun Oct 25 17:09:34 UTC 2009 Modified Files: src/lib/libc/stdio: asprintf.c fgets.c fgetwc.c fread.c fvwrite.c getdelim.c Log Message: Lint is differentially far too picky... Remove some warnings that only appear on i386 (not on amd64) and that for some reason best known to others are deemed fatal for i386. Making this code 'pass lint' does absolutely nothing for its readability (etc). Can we just revert the past 2 commits? Changing: (size_t)x - x + 0u does not look like an improvement to me. At least the first shows the intent, the second is just confusing, specially when size_t is unsigned long. christos
Re: CVS commit: src/sys/dev/pci
In article 20091028042513.d155d17...@cvs.netbsd.org, Michael Lorenz source-changes-d@NetBSD.org wrote: -=-=-=-=-=- Module Name: src Committed By: macallan Date: Wed Oct 28 04:25:13 UTC 2009 Modified Files: src/sys/dev/pci: pm2fb.c pm2reg.h Log Message: fix occasionally wrong colours in rectangle fills It is spelled Gouraud. christos
Re: CVS commit: src/external/bsd/am-utils/dist/include
On Oct 28, 2:17pm, jo...@britannica.bec.de (Joerg Sonnenberger) wrote: -- Subject: Re: CVS commit: src/external/bsd/am-utils/dist/include | On Wed, Oct 28, 2009 at 09:08:45AM -0400, Christos Zoulas wrote: | Module Name:src | Committed By: christos | Date: Wed Oct 28 13:08:45 UTC 2009 | | Modified Files: | src/external/bsd/am-utils/dist/include: am_defs.h | | Log Message: | Deal with errno correctly. Fixed better upstream. | | Please just kill that chunk. It is broken and non-portable. | Seriously, if a platform doesn't have errno.h, you have bigger issues. Well, am-utils compiles on platforms that don't... Anyway I fixed it more correctly. christos
Re: CVS commit: src/sys/ufs/lfs
In article 20091030002209.gh1...@irregular-apocalypse.k.bsd.de, Christoph Badura b...@bsd.de wrote: On Thu, Oct 29, 2009 at 01:10:32PM -0400, Christos Zoulas wrote: Modified Files: src/sys/ufs/lfs: lfs.h lfs_vnops.c Log Message: PR/42246: NAKAJIMA Yoshihiro: provide COMPAT_50 for LFS Is this pull-up fodder? No, 5.0 does not need COMPAT_50. christos
Re: CVS commit: src/external/bsd/flex/dist
In article 27871.1256953...@splode.eterna.com.au, matthew green m...@eterna.com.au wrote: Module Name:src Committed By: christos Date: Mon Oct 26 00:29:59 UTC 2009 Update of /cvsroot/src/external/bsd/flex/dist In directory ivanova.netbsd.org:/tmp/cvs-serv16604 Log Message: from sourceforge. what's new in this flex? :-) Localization, recursive parsers, better c++ support, ability to exclude functions, bison pure parser support. christos
Re: CVS commit: src/sys/arch/x86/x86
In article 091104193344.m0225...@mirage.ceres.dti.ne.jp, Izumi Tsutsui tsut...@ceres.dti.ne.jp wrote: Modified Files: src/sys/arch/x86/x86: patch.c Log Message: Gracelessly bracket #include opt_spldebug.h with #ifdef i386. Should fix the amd64 kernel-build failure that Andreas Wrede reported. perhaps __i386__ I think __i386__ or __x86_64__ for ${MACHINE_ARCH}, and i386 or amd64 for ${MACHINE}. (I'm not sure if __amd64__ is defined or not) In this case __i386__ is proper, but I wonder if we should also replace a bunch of #ifdef amd64 (or __amd64__) and directries named amd64 like sys/compat/linux/arch/amd64. $ cat foo.c #include stdio.h int main(void) { #ifdef i386 printf(i386\n); #endif #ifdef __i386__ printf(__i386__\n); #endif return 0; } $ cc foo.c $ ./a.out i386 __i386__ $ cc -ansi foo.c __i386__ christos
Re: CVS commit: src/external/bsd/mdocml/dist
In article 20091107.004816.-432821225@bsdimp.com, M. Warner Losh i...@bsdimp.com wrote: In message: hd2nci$40...@ger.gmane.org chris...@astron.com (Christos Zoulas) writes: : In article 20091106183619.ga2...@britannica.bec.de, : Joerg Sonnenberger jo...@britannica.bec.de wrote: : On Fri, Nov 06, 2009 at 04:53:58PM +, Christos Zoulas wrote: : - portability: warnx - fprintf/perror : : This change is backwards; : we should not be using perror/fprintf but warn/warnx. : : I disagree. They are not portable. Many platforms don't have them. : Some other platforms have functions of the same name, but with different : behavior (OS X). : : It should autoconf them. which ones have the same name, but different behavior on OS X? A quick read of the man pages suggests they are identical... These functions are all implemented in one file that's been trivial to port to Linux and Windows for me in the past... I agree with Christos here: their use is pervasive and it will be confusing to know when to use err and when to use perror + exit... My point here is that we should be pushing ahead with useful features that make the code cleaner and easier to read and maintain, not encourage the laggard OS's not to upgrade/fix their API's by using ancient and awkward API's such as perror(). christos
Re: CVS commit: src/sys/dev
On Nov 10, 8:22pm, t...@netbsd.org (Matthias Scheler) wrote: -- Subject: Re: CVS commit: src/sys/dev | On Tue, Nov 10, 2009 at 03:05:51PM -0500, Christos Zoulas wrote: | Module Name:src | Committed By: christos | Date: Tue Nov 10 20:05:51 UTC 2009 | | Modified Files: | src/sys/dev: cgd.c cgdvar.h | | Log Message: | avoid variable array stack allocation by enforcing and allocating always the | maximum. | | The change isn't completely correct. The code will later use | sizeof(sink) and sizeof(blkno_buf) which is no the maximum and | not the actual buffer size. | | You probably need to replace all those occurrences of sizeof | by blocksize. Thanks, I fixed it. It was only doing more work, not bad work :-) christos
Re: CVS commit: src/sys/arch/i386/i386
In article 20091121223029.1e0d263b...@mail.netbsd.org, Mindaugas Rasiukevicius rm...@netbsd.org wrote: Hello, David Laight wrote: Module Name: src Committed By:dsl Date:Sat Nov 21 19:59:51 UTC 2009 Modified Files: src/sys/arch/i386/i386: db_trace.c Log Message: Don't call lwp_getpcb() when not KERNEL. Thanks for working this around, however it is not a right fix. With this patch, build.sh release passes: http://www.netbsd.org/~rmind/crash_pcb.diff It should have been enough to amend the argument of routine exported to userland. Do not you agree? I do. christos
Re: CVS commit: src/lib/libc/arch/m68k/gen
In article 20091129042013.gm4...@x300.tombi.co.jp, Masao Uebayashi uebay...@tombi.co.jp wrote: Module Name: src Committed By:christos Date:Sat Nov 28 23:46:39 UTC 2009 Modified Files: src/lib/libc/arch/m68k/gen: Makefile.inc Added Files: src/lib/libc/arch/m68k/gen: fpfake.c Log Message: Add no/op routines for m68000 for the sticky, mask, and round settings. Could you consider to improve the quality of commit messages always explain the reason of the changes? :) Fixes the build? Does not link otherwise? christos
Re: CVS commit: src/share/mk
In article 26371.1260567...@splode.eterna.com.au, matthew green m...@eterna.com.au wrote: Module Name:src Committed By: uebayasi Date: Fri Dec 11 08:37:34 UTC 2009 Modified Files: src/share/mk: bsd.own.mk Log Message: ${GENCMD} is used to generate only one output from file generation commands which potentially have multiple output files, which confuses make(1). This wrapper copies all involved files into /tmp, execute the command, and copy the wanted file back to ${.OBJDIR}. If this is expensive, consider to rewrite the generation command to output files individually. this seems pretty gross. i'm not sure it's a good way to solve the problem at hand. it hides everything away with @. it also doesn't appear to avoid updating a file if it hasn't actually changed. it also hard codes /tmp, which it shouldn't need to use at all. it also uses cp instead of mv. did anyone review this? I think this should be backed out; there must be better ways of dealing with the problem. christos
Re: CVS commit: src/share/mk
On Dec 12, 11:48am, uebay...@tombi.co.jp (Masao Uebayashi) wrote: -- Subject: Re: CVS commit: src/share/mk | I had a discussion with dsl@ on source-change...@. | | http://mail-index.netbsd.org/source-changes-d/2009/12/08/msg001261.html | | His suggestion was: | arith.h: arith.y | yacc commands | | arith.o: arith.h | [ -f ${@:.o=c} ] || { rm ${@:.o=.h}; exit 1; } | commands to compile arith.c | | ie having no real dependency against arith.c | | I showd my idea to make commands to generate only one output. I got no | response. I took that as no one has interest about this. GENCMD is just | one way to achieve that. You can do it in $YOUR_OWN_WAY but the idea is | that. Actually I am interested. You just did not present your solution in tech-whatever so I did not have a chance to comment. Do you have an example where the existing rules fail, so that I can see what you are trying to fix? christos
Re: make rule of multiple file generation (was Re: CVS commit: src/share/mk)
On Dec 12, 3:14pm, uebay...@tombi.co.jp (Masao Uebayashi) wrote: -- Subject: make rule of multiple file generation (was Re: CVS commit: src/sh | (Moved from source-change...@netbsd.org.) | | Actually I am interested. You just did not present your solution in | tech-whatever so I did not have a chance to comment. Do you have an | example where the existing rules fail, so that I can see what you are | trying to fix? | | % cd bin/sh | % cvs up -D20091201 | % nbmake-XXX -n sh Ok, this is fixed now (in bsd.sys.mk). What else is broken? christos
Re: make rule of multiple file generation (was Re: CVS commit: src/share/mk)
On Dec 14, 9:13am, uebay...@tombi.co.jp (Masao Uebayashi) wrote: -- Subject: Re: make rule of multiple file generation (was Re: CVS commit: sr | | % cd bin/sh | | % cvs up -D20091201 | | % nbmake-XXX -n sh | | Ok, this is fixed now (in bsd.sys.mk). What else is broken? | | % cd bin/sh | % nbmake-XXX clean | % nbmake-XXX nodes.c nodes.h | % rm $( nbmake-XXX print-objdir )/nodes.h | % nbmake-XXX This has nothing to do with yacc; the rules in that Makefile are wrong. instead of: nodes.h: nodes.c nodes.c: mknodes.sh nodetypes nodes.c.pat it should be: nodes.h nodes.c: mknodes.sh nodetypes nodes.c.pat What else? christos
Re: make rule of multiple file generation (was Re: CVS commit: src/share/mk)
On Dec 14, 11:40am, uebay...@tombi.co.jp (Masao Uebayashi) wrote: -- Subject: Re: make rule of multiple file generation (was Re: CVS commit: sr | This has nothing to do with yacc; the rules in that Makefile are wrong. | | instead of: | | nodes.h: nodes.c | nodes.c: mknodes.sh nodetypes nodes.c.pat | | it should be: | | nodes.h nodes.c: mknodes.sh nodetypes nodes.c.pat | | % /src/netbsd/work.TNF/landisk/tools/bin/nbmake-landisk -j 2 nodes.h nodes.c |create sh/nodes.c |create sh/nodes.h | mv: rename /src/netbsd/work.TNF/landisk/obj/bin/sh/nodes.h.tmp to /src/netbsd/work.TNF/landisk/obj/bin/sh/nodes.h: No such file or directory | --- nodes.h --- | *** [nodes.h] Error code 1 | 1 error | | nbmake: stopped in /src/netbsd/src.TNF/bin/sh | | a b: c doesn't describe a 1-to-N generation, but just a syntax sugar of | a: c and b: c. make(1) tries to build a and b in two jobs and gets | confused. | | You'll realize what $GENCMD does is a solution, not a work-around. So this is fixed with an additional dependency to force serialization, or by fixing the script not to re-use the same temp filenames: nodes.h: nodes.c nodes.c nodes.h: mknodes.sh nodetypes nodes.c.pat ${_MKTARGET_CREATE} ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC:S/^nodes.c$//} ${.OBJDIR} [ -f nodes.h ] Still you have not shown me why GENCMD is necessary... For me it adds complexity and slows things down. Fixing parallelization in Makefiles is simple and adequately done with the existing make features, or by correcting the scripts that generate files to use unique filenames. christos
Re: make rule of multiple file generation (was Re: CVS commit: src/share/mk)
On Dec 14, 12:41pm, uebay...@tombi.co.jp (Masao Uebayashi) wrote: -- Subject: Re: make rule of multiple file generation (was Re: CVS commit: sr | So this is fixed with an additional dependency to force serialization, | or by fixing the script not to re-use the same temp filenames: | | nodes.h: nodes.c | nodes.c nodes.h: mknodes.sh nodetypes nodes.c.pat | ${_MKTARGET_CREATE} | ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC:S/^nodes.c$//} ${.OBJDIR} | [ -f nodes.h ] | | You should have written this version at first. :) Well, I did not undestand what the problem was at the time :-) | This seems work for me. I think I tried a similar one but clearly I figured | out the trick of removing nodes.c from ${.ALLSRC}. | | Next is usr.bin/ktruss. That worked ok for me with -j 4. | Still you have not shown me why GENCMD is necessary... For me it adds | complexity and slows things down. Fixing parallelization in Makefiles | is simple and adequately done with the existing make features, or by | | $GENCMD provides a way to extract only one output file. It looks like | complex because it's embedded in makefile. I don't think it's really complex. | It's just redundant. :) Yes, it adds more explicit rules... My vote is to remove it and fix the Makefiles/scripts that are broken. It is pretty straight-forward. | correcting the scripts that generate files to use unique filenames. | | Actually I like this more. We could do both, but forcing serialization is probably more efficient since it causes the script to be invoked only once and avoids races. christos
Re: make rule of multiple file generation (was Re: CVS commit: src/share/mk)
On Dec 14, 1:09pm, uebay...@tombi.co.jp (Masao Uebayashi) wrote: -- Subject: Re: make rule of multiple file generation (was Re: CVS commit: sr | Yes, it adds more explicit rules... My vote is to remove it and fix | the Makefiles/scripts that are broken. It is pretty straight-forward. | | Now I'm fine with nuking GENCMD and fix rules using .ORDER:. Please go | for it. It'd be also nice if all instances are rewritten to look an idiom, | like: | | # multiple outputs | .ORDER: nodes.h nodes.c | nodes.c nodes.h: mknodes.sh nodetypes nodes.c.pat | ${_MKTARGET_CREATE} | ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} ${.OBJDIR} | | So that the code fragment will propagate together. Do you have a list of the Makefiles contain GENCMD? christos
Re: CVS commit: src/external/bsd/ntp
On Dec 15, 6:16am, jo...@britannica.bec.de (Joerg Sonnenberger) wrote: -- Subject: Re: CVS commit: src/external/bsd/ntp | Could you please add some logical abstraction for this? I am planning to get rid of it completely and turn WARNS on... Soon after Frank finishes the build. I just don't want warnings to get through at this time. christos
Re: CVS commit: src/tools/gdb
On Dec 15, 5:03pm, uebay...@tombi.co.jp (Masao Uebayashi) wrote: -- Subject: Re: CVS commit: src/tools/gdb | I changed other instances too. OK to check in? | I think so. christos
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Wed Dec 30 23:54:52 UTC 2009 Modified Files: src/lib/libedit: Makefile chartype.h el.c el.h eln.c hist.c hist.h histedit.h history.c makelist readline.c search.c tokenizer.c Log Message: Fix wide build, test it, but don't turn it on yet. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/lib/libedit/Makefile cvs rdiff -u -r1.1 -r1.2 src/lib/libedit/chartype.h src/lib/libedit/eln.c cvs rdiff -u -r1.56 -r1.57 src/lib/libedit/el.c cvs rdiff -u -r1.19 -r1.20 src/lib/libedit/el.h cvs rdiff -u -r1.16 -r1.17 src/lib/libedit/hist.c src/lib/libedit/tokenizer.c cvs rdiff -u -r1.11 -r1.12 src/lib/libedit/hist.h cvs rdiff -u -r1.42 -r1.43 src/lib/libedit/histedit.h cvs rdiff -u -r1.35 -r1.36 src/lib/libedit/history.c cvs rdiff -u -r1.13 -r1.14 src/lib/libedit/makelist cvs rdiff -u -r1.86 -r1.87 src/lib/libedit/readline.c cvs rdiff -u -r1.22 -r1.23 src/lib/libedit/search.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Thu Dec 31 15:58:26 UTC 2009 Modified Files: src/lib/libedit: Makefile editline.3 el.c el.h eln.c histedit.h prompt.c read.c Log Message: - Document and enable wide character support. - Fix read function compatibility. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/lib/libedit/Makefile cvs rdiff -u -r1.70 -r1.71 src/lib/libedit/editline.3 cvs rdiff -u -r1.57 -r1.58 src/lib/libedit/el.c cvs rdiff -u -r1.20 -r1.21 src/lib/libedit/el.h cvs rdiff -u -r1.2 -r1.3 src/lib/libedit/eln.c cvs rdiff -u -r1.43 -r1.44 src/lib/libedit/histedit.h cvs rdiff -u -r1.17 -r1.18 src/lib/libedit/prompt.c cvs rdiff -u -r1.53 -r1.54 src/lib/libedit/read.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/i386/i386
Module Name:src Committed By: christos Date: Thu Dec 31 16:04:32 UTC 2009 Modified Files: src/sys/arch/i386/i386: apmbios.c Log Message: Fix compilation issue with time_t To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/i386/i386/apmbios.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/nfs
Module Name:src Committed By: christos Date: Thu Dec 31 19:30:45 UTC 2009 Modified Files: src/sys/nfs: files.nfs Log Message: nuidhash_max is needed by sys_nfssvc To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/nfs/files.nfs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/nfs
Module Name:src Committed By: christos Date: Thu Dec 31 19:31:31 UTC 2009 Modified Files: src/sys/nfs: nfs_socket.c Log Message: appease gcc. To generate a diff of this commit: cvs rdiff -u -r1.183 -r1.184 src/sys/nfs/nfs_socket.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/nfs
Module Name:src Committed By: christos Date: Thu Dec 31 19:38:16 UTC 2009 Modified Files: src/sys/nfs: files.nfs nfs_iod.c nfs_syscalls.c Log Message: handle the nuidhash_max lossage differently To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/nfs/files.nfs cvs rdiff -u -r1.3 -r1.4 src/sys/nfs/nfs_iod.c cvs rdiff -u -r1.151 -r1.152 src/sys/nfs/nfs_syscalls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/i386/stand/bootxx
Module Name:src Committed By: christos Date: Fri Jan 1 03:18:27 UTC 2010 Modified Files: src/sys/arch/i386/stand/bootxx: boot1.c Log Message: If the open fails, don't call fstat, because this changes the errno to EINVAL from eg. ENOENT. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/i386/stand/bootxx/boot1.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/games/canfield/cfscores
In article 20100101173538.ga17...@netbsd.org, David Holland dholland-sourcechan...@netbsd.org wrote: On Fri, Jan 01, 2010 at 03:33:26PM +0100, Marc Balmer wrote: if (argc 2) { - printf(Usage: cfscores -a | cfscores [user]\n); - exit(1); + errx(1, Usage: cfscores -a | cfscores [user]); imo, lower case usage would be more consistent with other commands. Some grep usage suggests that lowercase outnumbers capitalized by a good margin, but there's still a healthy minority of capitalized usage messages. (It's about 500 to 125.) Is this something we care enough about to make a point of fixing it as we go? I think consistency is good, but at the same time I like upper case :-) Also using errx() for usage is inconsistent because you end up printing prog: Usage: prog instead of Usage: prog. And everything should consistently use getprogname() instead of hard-coding it. christos
CVS commit: src/sys/dev/pcmcia
Module Name:src Committed By: christos Date: Sat Jan 2 01:43:12 UTC 2010 Modified Files: src/sys/dev/pcmcia: if_ne_pcmcia.c Log Message: convert to pmf To generate a diff of this commit: cvs rdiff -u -r1.157 -r1.158 src/sys/dev/pcmcia/if_ne_pcmcia.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/sbus
Module Name:src Committed By: christos Date: Sat Jan 2 01:43:42 UTC 2010 Modified Files: src/sys/dev/sbus: dbri.c Log Message: convert to pmf To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/sbus/dbri.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/isa
Module Name:src Committed By: christos Date: Sat Jan 2 02:37:09 UTC 2010 Modified Files: src/sys/dev/isa: ym.c Log Message: make rhis compile. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/dev/isa/ym.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Sun Jan 3 18:27:10 UTC 2010 Modified Files: src/lib/libedit: chartype.h editline.3 histedit.h history.c readline.c tokenizer.c src/lib/libedit/TEST: Makefile Added Files: src/lib/libedit/TEST: wtc1.c Log Message: rename historyw - history_w for consistency. add wide tst code and make it the default. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libedit/chartype.h cvs rdiff -u -r1.71 -r1.72 src/lib/libedit/editline.3 cvs rdiff -u -r1.44 -r1.45 src/lib/libedit/histedit.h cvs rdiff -u -r1.36 -r1.37 src/lib/libedit/history.c cvs rdiff -u -r1.87 -r1.88 src/lib/libedit/readline.c cvs rdiff -u -r1.17 -r1.18 src/lib/libedit/tokenizer.c cvs rdiff -u -r1.3 -r1.4 src/lib/libedit/TEST/Makefile cvs rdiff -u -r0 -r1.1 src/lib/libedit/TEST/wtc1.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin
Module Name:src Committed By: christos Date: Wed Jan 6 18:12:37 UTC 2010 Modified Files: src/sbin/fsck_ext2fs: main.c utilities.c src/sbin/fsck_ffs: main.c utilities.c src/sbin/fsck_lfs: main.c utilities.c Log Message: PR/42568: Pedro F. Giffuni: Better signal handling from OpenBSD, but simplified. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sbin/fsck_ext2fs/main.c cvs rdiff -u -r1.19 -r1.20 src/sbin/fsck_ext2fs/utilities.c cvs rdiff -u -r1.73 -r1.74 src/sbin/fsck_ffs/main.c cvs rdiff -u -r1.56 -r1.57 src/sbin/fsck_ffs/utilities.c cvs rdiff -u -r1.40 -r1.41 src/sbin/fsck_lfs/main.c cvs rdiff -u -r1.27 -r1.28 src/sbin/fsck_lfs/utilities.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin
Module Name:src Committed By: christos Date: Thu Jan 7 01:39:56 UTC 2010 Modified Files: src/sbin/fsck_ext2fs: main.c utilities.c src/sbin/fsck_ffs: main.c utilities.c src/sbin/fsck_lfs: main.c utilities.c Log Message: make this compile again. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sbin/fsck_ext2fs/main.c cvs rdiff -u -r1.20 -r1.21 src/sbin/fsck_ext2fs/utilities.c cvs rdiff -u -r1.74 -r1.75 src/sbin/fsck_ffs/main.c cvs rdiff -u -r1.57 -r1.58 src/sbin/fsck_ffs/utilities.c cvs rdiff -u -r1.41 -r1.42 src/sbin/fsck_lfs/main.c cvs rdiff -u -r1.28 -r1.29 src/sbin/fsck_lfs/utilities.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/usr.sbin/wake
In article 20100110194012.3693a17...@cvs.netbsd.org, Marc Balmer source-changes-d@NetBSD.org wrote: -=-=-=-=-=- Module Name: src Committed By: mbalmer Date: Sun Jan 10 19:40:12 UTC 2010 Modified Files: src/usr.sbin/wake: wake.c Log Message: remove stupid casts. if lint complains about return values that are ignored, lint should fe fixed, and not code being cluttered. Please explain to me how you propose we fix lint. Or to be more precise, how does the code convey intent about purposefully ignoring the return value of a function so that lint can ignore it. FYI this change is against the current style guide, so if you are going to be pushing for more changes like that, I suggest that you get consensus about changing the style guide first. Otherwise I suggest that you revert the change, because it only serves to produce lint warnings for someone that was linting cleanly before. christos
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: christos Date: Mon Jan 11 16:28:06 UTC 2010 Modified Files: src/usr.bin/xlint/lint1: scan.l Log Message: fix hex double parsing. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/usr.bin/xlint/lint1/scan.l Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: christos Date: Mon Jan 11 16:28:39 UTC 2010 Modified Files: src/include: math.h src/lib/libm: Makefile shlib_version src/lib/libm/man: exp.3 src/lib/libm/src: math_private.h Added Files: src/lib/libm/src: s_exp2.c s_exp2f.c Log Message: Add exp2 and exp2m To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/include/math.h cvs rdiff -u -r1.91 -r1.92 src/lib/libm/Makefile cvs rdiff -u -r1.10 -r1.11 src/lib/libm/shlib_version cvs rdiff -u -r1.23 -r1.24 src/lib/libm/man/exp.3 cvs rdiff -u -r1.13 -r1.14 src/lib/libm/src/math_private.h cvs rdiff -u -r0 -r1.1 src/lib/libm/src/s_exp2.c src/lib/libm/src/s_exp2f.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/base
Module Name:src Committed By: christos Date: Mon Jan 11 16:30:26 UTC 2010 Modified Files: src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64 md.sparc64 shl.mi Log Message: bump libm for exp2 and exp2f To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/base/ad.mips64eb \ src/distrib/sets/lists/base/ad.mips64el cvs rdiff -u -r1.81 -r1.82 src/distrib/sets/lists/base/md.amd64 cvs rdiff -u -r1.74 -r1.75 src/distrib/sets/lists/base/md.sparc64 cvs rdiff -u -r1.513 -r1.514 src/distrib/sets/lists/base/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/usr.sbin/wake
On Jan 11, 8:44pm, dholland-sourcechan...@netbsd.org (David Holland) wrote: -- Subject: Re: CVS commit: src/usr.sbin/wake | On Sun, Jan 10, 2010 at 11:23:19PM +, Christos Zoulas wrote: | Please explain to me how you propose we fix lint. | | Realistically, lint should be made to know a list of standard | functions with usually-uninteresting return values. That would solve | 95+% of the practical problem. | | In the long run (as I've said before) we should replace our lint with | something more modern... Once we get the llvm tools, I am fine with that. christos
CVS commit: src/lib/libm/src
Module Name:src Committed By: christos Date: Mon Jan 11 23:38:24 UTC 2010 Modified Files: src/lib/libm/src: s_exp2.c Log Message: remove weak reference for now. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libm/src/s_exp2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/mail
Module Name:src Committed By: christos Date: Tue Jan 12 14:44:24 UTC 2010 Modified Files: src/usr.bin/mail: complete.c Log Message: - 1 - EXIT_FAILURE - avoid assertion firing when hitting ^D in CC: line. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/usr.bin/mail/complete.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libm/man
Module Name:src Committed By: christos Date: Tue Jan 12 15:51:01 UTC 2010 Modified Files: src/lib/libm/man: exp.3 Log Message: merge conflicting error sections. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/lib/libm/man/exp.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Tue Jan 12 19:37:18 UTC 2010 Modified Files: src/lib/libedit: chartype.c Log Message: - in the argv conversion, handle NULL as NULL - when printing tab/nl print them, don't handle them specially. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libedit/chartype.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/usr.sbin/wake
On Jan 12, 4:26am, dholland-sourcechan...@netbsd.org (David Holland) wrote: -- Subject: Re: CVS commit: src/usr.sbin/wake | On Mon, Jan 11, 2010 at 06:31:29PM -0500, Christos Zoulas wrote: | | In the long run (as I've said before) we should replace our lint with | | something more modern... | | Once we get the llvm tools, I am fine with that. | | There's also splint, or sparse. Splint: License: - GPLv2: Cons:- does not understand gcc constructs - wierd flags and annotations - no c99 support - does not seem to be really supported: 3.1.2 release 2007-07-12 3.1.0 release 2003-04-21 Pros:- seems to be comprehensive and does many more tests than our lint Sparse: License: - Some weird and extra long transmeta license Cons:- Seems to do less than our lint, too simplistic - no c99 support - no annotations Pros:- Seems to understand gcc, is actively maintained. So splint looks like it has some value added, but it will need *a lot* of work to be integrated. Unless I am missing something, neither is appropriate in its current state to replace lint (without a few man-months of work), and I don't think that anybody will step up to do it. Comments? christos
Re: CVS commit: src/lib/libedit
On Jan 13, 8:21am, y...@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote: -- Subject: Re: CVS commit: src/lib/libedit | hi, | | can you please don't hardcode utf-8? | | YAMAMOTO Takashi Once we verify that it works on non utf-8, sure. christos
CVS commit: src/regress/usr.bin/rtld/dlerror-cleared
Module Name:src Committed By: christos Date: Wed Jan 13 20:18:24 UTC 2010 Modified Files: src/regress/usr.bin/rtld/dlerror-cleared: dlerror-cleared.c Log Message: use RTLD_NOW now that it works. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/regress/usr.bin/rtld/dlerror-cleared/dlerror-cleared.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint2
Module Name:src Committed By: christos Date: Thu Jan 14 16:58:27 UTC 2010 Modified Files: src/usr.bin/xlint/lint2: chk.c main2.c Log Message: Add a list of functions where we usually don't care about their return code. Can be bypassed by -hh To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/xlint/lint2/chk.c cvs rdiff -u -r1.7 -r1.8 src/usr.bin/xlint/lint2/main2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tools/compat
Module Name:src Committed By: christos Date: Thu Jan 14 21:26:56 UTC 2010 Modified Files: src/tools/compat: compat_defs.h Log Message: provide __arraycount for those that don't have it. To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/tools/compat/compat_defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tools/compat
Module Name:src Committed By: christos Date: Thu Jan 14 21:38:19 UTC 2010 Modified Files: src/tools/compat: compat_defs.h Log Message: undef and redefine instead of checking if it is define, from joerg To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/tools/compat/compat_defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/unifdef
Module Name:src Committed By: christos Date: Sat Jan 16 21:26:59 UTC 2010 Modified Files: src/usr.bin/unifdef: unifdef.c Removed Files: src/usr.bin/unifdef: stdbool.h Log Message: - we don't need stdbool.h anymore. - the previous fix for the negative index logic was wrong, fix it. To generate a diff of this commit: cvs rdiff -u -r1.1 -r0 src/usr.bin/unifdef/stdbool.h cvs rdiff -u -r1.15 -r1.16 src/usr.bin/unifdef/unifdef.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/rtsold
Module Name:src Committed By: christos Date: Mon Jan 18 04:53:10 UTC 2010 Modified Files: src/usr.sbin/rtsold: probe.c Log Message: check if i is in range before using it. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/rtsold/probe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Mon Jan 18 19:17:42 UTC 2010 Modified Files: src/lib/libedit: filecomplete.c Log Message: PR/42637: Joachim Kuebart: Shell tab completion crashes due to libedit stack smashing To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libedit/filecomplete.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Tue Jan 19 22:38:08 UTC 2010 Modified Files: src/lib/libedit: eln.c Log Message: Fix wrapper for EL_EDITOR, from Michael L. Hitch To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libedit/eln.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/dist/heimdal/lib/roken
Module Name:src Committed By: christos Date: Sun Jan 24 16:42:12 UTC 2010 Modified Files: src/crypto/dist/heimdal/lib/roken: get_window_size.c getarg.c roken.h.in Log Message: don't expose struct winsize needlessly. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/crypto/dist/heimdal/lib/roken/get_window_size.c \ src/crypto/dist/heimdal/lib/roken/getarg.c \ src/crypto/dist/heimdal/lib/roken/roken.h.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: christos Date: Sun Jan 24 16:45:58 UTC 2010 Modified Files: src/crypto/dist/heimdal/lib/roken: get_window_size.c src/include/heimdal: roken.h Log Message: make the window size function return the lines and columns variables separately instead of depending on the existance of struct winsize. Technically I should bump the library version or version the symbol, but nothing seems to use this outside the library! To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/crypto/dist/heimdal/lib/roken/get_window_size.c cvs rdiff -u -r1.12 -r1.13 src/include/heimdal/roken.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src
On Jan 25, 2:38am, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote: -- Subject: Re: CVS commit: src | Module Name:src | Committed By: christos | Date: Sun Jan 24 16:45:58 UTC 2010 | | Modified Files: | src/crypto/dist/heimdal/lib/roken: get_window_size.c | src/include/heimdal: roken.h | | Log Message: | make the window size function return the lines and columns variables separately | instead of depending on the existance of struct winsize. Technically I should | bump the library version or version the symbol, but nothing seems to use this | outside the library! | | Umm, could you take PR toolchain/41435? I did, was that the only problem though? christos
Re: CVS commit: src
On Jan 25, 3:39am, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote: -- Subject: Re: CVS commit: src | | Umm, could you take PR toolchain/41435? | | I did, was that the only problem though? | | As noted in the PR, the original problem is asnprintf() and | vasnprinf() decls in src/include/heimdal/roken.h because | Cygwin has the same functions with incompatible args | (derived from GNU?) by default. This is unrelated to what I changed though and was not planning to look into that. Grumble, I guess I will download cygwin 1.7.1 christos
Re: CVS commit: src
On Jan 25, 8:23am, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote: -- Subject: Re: CVS commit: src | | As noted in the PR, the original problem is asnprintf() and | | vasnprinf() decls in src/include/heimdal/roken.h because | | Cygwin has the same functions with incompatible args | | (derived from GNU?) by default. | | This is unrelated to what I changed though and was not planning to look | into that. Grumble, I guess I will download cygwin 1.7.1 | | What I need is a review of my new patch :-) | http://mail-index.NetBSD.org/netbsd-bugs/2010/01/21/msg015707.html Well, I'd prefer to avoid including a copy of roken.h for the tools. I think that vasnprintf and asnprintf are not used by anything in heimdal and can safely be removed. Combined with the winsize fix, this fixes the cygwin problems with minimal changes. I am trying a build now. christos
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Mon Jan 25 00:43:00 UTC 2010 Modified Files: src/share/mk: bsd.dep.mk bsd.kernobj.mk bsd.lib.mk bsd.obj.mk bsd.own.mk Log Message: PR/42658: Geoff Wing: Quote directory variables to deal with spaces in the source pathname. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/share/mk/bsd.dep.mk cvs rdiff -u -r1.12 -r1.13 src/share/mk/bsd.kernobj.mk cvs rdiff -u -r1.302 -r1.303 src/share/mk/bsd.lib.mk cvs rdiff -u -r1.48 -r1.49 src/share/mk/bsd.obj.mk cvs rdiff -u -r1.614 -r1.615 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.
Re: CVS commit: src
On Jan 25, 8:57pm, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote: -- Subject: Re: CVS commit: src | | | As noted in the PR, the original problem is asnprintf() and | | | vasnprinf() decls in src/include/heimdal/roken.h because | | | Cygwin has the same functions with incompatible args | | | (derived from GNU?) by default. | | | | This is unrelated to what I changed though and was not planning to look | | into that. Grumble, I guess I will download cygwin 1.7.1 | | | | What I need is a review of my new patch :-) | | http://mail-index.NetBSD.org/netbsd-bugs/2010/01/21/msg015707.html | | Well, I'd prefer to avoid including a copy of roken.h for the tools. | | The problem here is that src/include/heimdal/roken.h is | a generated file and it's configured for NetBSD target and NetBSD host. | | Including it for tools on generic build hosts might be problematic. | That's the reason why I added local roken.h for tools asn1_compile | and compile_et in my patch. Yes, on the other hand we are better off making it more posix-like than system specific instead of duplicating it. | I think that vasnprintf and asnprintf are not used by anything in | heimdal and can safely be removed. Combined with the winsize fix, | this fixes the cygwin problems with minimal changes. I am trying a | build now. | | Note roken.h includes resolv.h and arpa/nameser.h that don't | exist on Cygwin so we had to handle it in src/tools/compat/configure. | (toolchain/29032) Which is fine; I'd rather have one place to keep roken.h and deal with portability in compat, rather than 2. christos
Re: CVS commit: src/dist/dhcp/dst
In article 20100125203357.e71eb17...@cvs.netbsd.org, Matthias Drochner source-changes-d@NetBSD.org wrote: -=-=-=-=-=- Module Name: src Committed By: drochner Date: Mon Jan 25 20:33:57 UTC 2010 Modified Files: src/dist/dhcp/dst: dst_api.c prandom.c Log Message: fix some cases where the EREPORT macro defined to null (as in the NetBSD build) could change the behaviour of the code in unexpected ways I think that the EREPORT macro should be changed instead. Macros that look like statements, should behave like statements. christos
CVS commit: src/sbin/raidctl
Module Name:src Committed By: christos Date: Wed Jan 27 18:34:02 UTC 2010 Modified Files: src/sbin/raidctl: raidctl.c rf_configure.c Log Message: use warn/err appropriately. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sbin/raidctl/raidctl.c cvs rdiff -u -r1.24 -r1.25 src/sbin/raidctl/rf_configure.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src
On Jan 29, 8:04pm, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote: -- Subject: Re: CVS commit: src | Well the manually edited roken.h will need to have HAVE_FOO for each feature | in order to work across different platforms. What is currently broken in | the one we have? As far as resolv.h and arpa/nameser.h we need them elsewhere | too, so we have to fix them anyway. | | * src/crypto/dist/heimdal/lib/roken/roken.h.in has HAVE_FOO for each feature |in order to work across different platforms: I know all that, but you are not answering the question. What is broken right now and what are you trying to fix? There is no struct winsize anymore in roken.h... christos
Re: CVS commit: src
On Jan 30, 10:30am, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote: -- Subject: Re: CVS commit: src | 4. Could be. I don't like to code solutions for future/non existing | problems though. | | Well I had a patch with the solution and was waiting feedback, | but you beated me without any comments for my patch. | I was disgusted a bit since I spent a day to prepare the patch. Sorry. I am sorry bacause I did not notice. I just saw the mail about the struct winsize problem, I though it would be better to not expose the struct so I fixed it. Then you mentioned asnprinf, and I saw that it was not used so I removed it. I am of the opinion that if you can avoid conditional compilation by writing portable code you should. Also you should avoid extra copies of the code if you can. If you don't agree, please go ahead undo my changes and commit the patch in the PR. christos
Re: CVS commit: src/external/bsd/liblzf/dist
In article 20100203170030.ga7...@panix.com, Thor Lancelot Simon t...@panix.com wrote: On Wed, Feb 03, 2010 at 04:33:59PM +0100, Joerg Sonnenberger wrote: On Wed, Feb 03, 2010 at 12:44:39AM -0500, Thor Lancelot Simon wrote: It's a tiny, very very fast compression library. Christos wants it for bootblocks, among other things (or so he says -- ask him). For boot blocks or boot loaders? Ask Christos. I don't use it for that purpose myself (I use it for a number of other things a very fast compressor is useful for, like network data streams and backups). I am guessing what he was after was small size and fast decompression (for some resource-constrained platform?). I wanted to evaluate using it at work, for data streaming. The discussion with Thor went like: Thor: I have it already integrated in my own tree, should I import it. Christos: Sure I think so; it is small enough and we don't have something else with similar functionality in the tree, LZO is GPL, and the rest are too big/complicated. The bottom line is that I had the code in my local tree, someone whose technical opinion I respect sufficiently to simply check it in on his request made the request, and so I did. As I said earlier, if you want to remove 3-5000 bytes from the system, I can recommend some much better candidates. I still think it is useful and it should stay, just because the code is so simple. It is not the best compressor, but it is a fast and easy to understand one. If you don't think so, I'll remove it. christos
Re: CVS commit: src/lib/libterminfo
In article 20100205143907.e255d17...@cvs.netbsd.org, Havard Eidnes source-changes-d@NetBSD.org wrote: -=-=-=-=-=- Module Name: src Committed By: he Date: Fri Feb 5 14:39:07 UTC 2010 Modified Files: src/lib/libterminfo: term.h term_private.h Log Message: More adaptation for ports with unsigned char as char. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libterminfo/term.h cvs rdiff -u -r1.3 -r1.4 src/lib/libterminfo/term_private.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/libterminfo/term.h diff -u src/lib/libterminfo/term.h:1.2 src/lib/libterminfo/term.h:1.3 --- src/lib/libterminfo/term.h:1.2 Thu Feb 4 09:46:26 2010 +++ src/lib/libterminfo/term.h Fri Feb 5 14:39:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: term.h,v 1.2 2010/02/04 09:46:26 roy Exp $ */ +/* $NetBSD: term.h,v 1.3 2010/02/05 14:39:07 he Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -1454,7 +1454,7 @@ /* We need to expose these so that the macros work */ char *name; char *desc; - char *flags; + signed char *flags; short *nums; const char **strs; } TERMINAL; Index: src/lib/libterminfo/term_private.h diff -u src/lib/libterminfo/term_private.h:1.3 src/lib/libterminfo/term_private.h:1.4 --- src/lib/libterminfo/term_private.h:1.3 Fri Feb 5 12:31:56 2010 +++ src/lib/libterminfo/term_private.h Fri Feb 5 14:39:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: term_private.h,v 1.3 2010/02/05 12:31:56 roy Exp $ */ +/* $NetBSD: term_private.h,v 1.4 2010/02/05 14:39:07 he Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -84,7 +84,7 @@ /* We need to expose these so that the macros work */ char *name; char *desc; - char *flags; + signed char *flags; short *nums; const char **strs; /* Storage area for terminfo data */ Isn't int8_t more appropriate? christos
CVS commit: src/sbin/fsck
Module Name:src Committed By: christos Date: Wed Feb 17 23:30:21 UTC 2010 Modified Files: src/sbin/fsck: fsck.8 fsck.c Log Message: Add -x mountpoint ``exclude'' option. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sbin/fsck/fsck.8 cvs rdiff -u -r1.47 -r1.48 src/sbin/fsck/fsck.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/external/cddl/osnet/lib/libnvpair
On Feb 18, 10:11pm, h...@netbsd.org (haad) wrote: -- Subject: Re: CVS commit: src/external/cddl/osnet/lib/libnvpair | 2010/2/17 Christos Zoulas chris...@netbsd.org: | Module Name: =C2=A0 =C2=A0src | Committed By: =C2=A0 christos | Date: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Wed Feb 17 17:36:32 UTC 2010 | | Modified Files: | =C2=A0 =C2=A0 =C2=A0 =C2=A0src/external/cddl/osnet/lib/libnvpair: Makefil= | e | | Log Message: | Fix build issue with our make system building libnvpair.so from libnvpair= | .c | and libnvpair.so from *.so by renaming libnvpair.c to lib_nvpair.c | | | This change seems very strange to me, because I have built libnvpair | zillions times and it worked just fine. What is so special on your | setup that it doesn't build by default for you ? Do you make clean before you build it? Or try touching libnvpair.c after the first build. The point is moot now because Nick is fixing it properly and he or I will remove the hack. christos
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Fri Feb 19 23:50:55 UTC 2010 Modified Files: src/external/gpl2/xcvs/dist/src: logmsg.c Log Message: make the default action abort for the empty log message; it used to be continue. requested by joerg. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/logmsg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/bin/sh
Module Name:src Committed By: christos Date: Sat Feb 20 23:15:17 UTC 2010 Modified Files: src/bin/sh: main.c Log Message: default to the original behavior for $ENV unless POSIXLY_CORRECT is set. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/bin/sh/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/bin/sh
Module Name:src Committed By: christos Date: Sun Feb 21 09:54:57 UTC 2010 Modified Files: src/bin/sh: main.c Log Message: fix faulty logic in previous change. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/bin/sh/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/dump
Module Name:src Committed By: christos Date: Fri Feb 26 02:11:40 UTC 2010 Modified Files: src/sbin/dump: dump.8 dump.h itime.c main.c Log Message: PR/42883: Greywolf: Add -i flag which brings true incremental capability. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sbin/dump/dump.8 cvs rdiff -u -r1.45 -r1.46 src/sbin/dump/dump.h cvs rdiff -u -r1.16 -r1.17 src/sbin/dump/itime.c cvs rdiff -u -r1.64 -r1.65 src/sbin/dump/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/sbin/dump/dump.8 diff -u src/sbin/dump/dump.8:1.58 src/sbin/dump/dump.8:1.59 --- src/sbin/dump/dump.8:1.58 Fri Jan 30 06:55:04 2009 +++ src/sbin/dump/dump.8 Thu Feb 25 21:11:40 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: dump.8,v 1.58 2009/01/30 11:55:04 enami Exp $ +.\ $NetBSD: dump.8,v 1.59 2010/02/26 02:11:40 christos Exp $ .\ .\ Copyright (c) 1980, 1991, 1993 .\ Regents of the University of California. @@ -30,7 +30,7 @@ .\ .\ @(#)dump.8 8.3 (Berkeley) 5/1/95 .\ -.Dd August 12, 2008 +.Dd February 25, 2010 .Dt DUMP 8 .Os .Sh NAME @@ -39,7 +39,7 @@ .Nd file system backup .Sh SYNOPSIS .Nm -.Op Fl 0123456789aceFnStuX +.Op Fl 0123456789aceFinStuX .Bk -words .Op Fl B Ar records .Ek @@ -147,7 +147,9 @@ option below). A level number above 0, incremental backup, tells dump to copy all files new or modified since the -last dump of a lower level. +last dump of a lower level (but see also the +.Fl i +option below). The default level is 9. .It Fl a .Dq auto-size . @@ -221,6 +223,10 @@ The default honor level is 1, so that incremental backups omit such files but full backups retain them. +.It Fl i Ar incremental +The dump is treated as level 9 but takes into account a previous +level 9, if one exists. This makes it possible to perform a true +incremental dump. .It Fl k Ar read-blocksize The size in kilobyte of the read buffers, rounded up to a multiple of the file system block size. @@ -551,6 +557,12 @@ .Nm command appeared in .At v6 . +.Pp +The +.Fl i +flag was inspired by the +.Fl x +flag from Sun's Solstice Backup utility. .Sh BUGS Fewer than 32 read errors on the file system are ignored. .Pp Index: src/sbin/dump/dump.h diff -u src/sbin/dump/dump.h:1.45 src/sbin/dump/dump.h:1.46 --- src/sbin/dump/dump.h:1.45 Sat Feb 16 12:58:01 2008 +++ src/sbin/dump/dump.h Thu Feb 25 21:11:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dump.h,v 1.45 2008/02/16 17:58:01 matt Exp $ */ +/* $NetBSD: dump.h,v 1.46 2010/02/26 02:11:40 christos Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -110,6 +110,7 @@ int diskfd; /* disk file descriptor */ int tapefd; /* tape file descriptor */ int pipeout; /* true = output to standard output */ +int trueinc; /* true = true incremental, i.e use last 9 as ref */ ino_t curino; /* current inumber; used globally */ int newtape; /* new tape flag */ u_int64_t tapesize; /* estimated tape size, blocks */ Index: src/sbin/dump/itime.c diff -u src/sbin/dump/itime.c:1.16 src/sbin/dump/itime.c:1.17 --- src/sbin/dump/itime.c:1.16 Fri May 19 10:52:39 2006 +++ src/sbin/dump/itime.c Thu Feb 25 21:11:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: itime.c,v 1.16 2006/05/19 14:52:39 christos Exp $ */ +/* $NetBSD: itime.c,v 1.17 2010/02/26 02:11:40 christos Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)itime.c 8.1 (Berkeley) 6/5/93; #else -__RCSID($NetBSD: itime.c,v 1.16 2006/05/19 14:52:39 christos Exp $); +__RCSID($NetBSD: itime.c,v 1.17 2010/02/26 02:11:40 christos Exp $); #endif #endif /* not lint */ @@ -145,12 +145,14 @@ initdumptimes(); /* * Go find the entry with the same name for a lower increment - * and older date + * and older date. If we are doing a true incremental, then + * we can use level 9 as a ref point */ ITITERATE(i, ddp) { if (strncmp(fname, ddp-dd_name, sizeof (ddp-dd_name)) != 0) continue; - if (ddp-dd_level = level) + if ((!trueinc (ddp-dd_level = level)) || + (trueinc (ddp-dd_level level))) continue; if (ddp-dd_ddate = iswap32(spcl.c_ddate)) continue; Index: src/sbin/dump/main.c diff -u src/sbin/dump/main.c:1.64 src/sbin/dump/main.c:1.65 --- src/sbin/dump/main.c:1.64 Sat Jul 19 21:20:22 2008 +++ src/sbin/dump/main.c Thu Feb 25 21:11:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.64 2008/07/20 01:20:22 lukem Exp $ */ +/* $NetBSD: main.c,v 1.65 2010/02/26 02:11:40 christos Exp $ */ /*- * Copyright (c) 1980, 1991, 1993, 1994 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)main.c 8.6 (Berkeley) 5/1/95; #else -__RCSID($NetBSD: main.c,v 1.64 2008/07/20 01:20:22 lukem Exp $); +__RCSID($NetBSD: main.c,v 1.65 2010/02/26 02:11:40 christos Exp $); #endif #endif /* not lint */ @@ -134,7 +134,7 @@ obsolete(argc, argv); while ((ch = getopt(argc, argv, - 0123456789aB:b:cd:eFf:h:k:l:L:nr:s:StT:uWwx:X)) != -1) +
CVS commit: src/sbin/dump
Module Name:src Committed By: christos Date: Fri Feb 26 02:11:40 UTC 2010 Modified Files: src/sbin/dump: dump.8 dump.h itime.c main.c Log Message: PR/42883: Greywolf: Add -i flag which brings true incremental capability. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sbin/dump/dump.8 cvs rdiff -u -r1.45 -r1.46 src/sbin/dump/dump.h cvs rdiff -u -r1.16 -r1.17 src/sbin/dump/itime.c cvs rdiff -u -r1.64 -r1.65 src/sbin/dump/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/eject
Module Name:src Committed By: christos Date: Fri Feb 26 20:18:37 UTC 2010 Modified Files: src/usr.bin/eject: am_glue.c Log Message: PR/42207: YAMAMOTO Takashi: If the portmapper (rpcbind) is not running, eject takes 2 minutes to timeout. Add a ping the portmapper function that times out after 5 seconds. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/eject/am_glue.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/eject/am_glue.c diff -u src/usr.bin/eject/am_glue.c:1.1 src/usr.bin/eject/am_glue.c:1.2 --- src/usr.bin/eject/am_glue.c:1.1 Fri Jan 16 12:31:22 2009 +++ src/usr.bin/eject/am_glue.c Fri Feb 26 15:18:37 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: am_glue.c,v 1.1 2009/01/16 17:31:22 christos Exp $ */ +/* $NetBSD: am_glue.c,v 1.2 2010/02/26 20:18:37 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: am_glue.c,v 1.1 2009/01/16 17:31:22 christos Exp $); +__RCSID($NetBSD: am_glue.c,v 1.2 2010/02/26 20:18:37 christos Exp $); #endif /* not lint */ #ifdef HAVE_CONFIG_H @@ -36,11 +36,14 @@ #endif /* HAVE_CONFIG_H */ #include am_defs.h #include amu.h +#include rpc/pmap_prot.h +#include rpc/pmap_clnt.h #include am_glue.h static CLIENT *clnt; +static struct timeval tv = { 5, 0 }; /* * Appease lint: Properly typecast some numbers defined in * src/extern/bsd/am-utils/dist/include/amq_defs.h. @@ -49,12 +52,45 @@ #define xAMQ_VERSION (rpcvers_t)AMQ_VERSION #define xAMQPROC_SYNC_UMNT (rpcproc_t)AMQPROC_SYNC_UMNT +static int +ping_pmap(void) +{ + u_short port = 0; + CLIENT *cl; + struct pmap parms; + struct sockaddr_in si; + int s = -1, rv; + + (void)memset(si, 0, sizeof(si)); + si.sin_family = AF_INET; + si.sin_len = sizeof(si); + si.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + si.sin_port = htons(PMAPPORT); + + if ((cl = clntudp_bufcreate(si, PMAPPROG, PMAPVERS, tv, + s, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE)) == NULL) + return -1; + + parms.pm_prog = PMAPPROG; + parms.pm_vers = PMAPVERS; + parms.pm_prot = IPPROTO_UDP; + parms.pm_port = 0; /* not needed or used */ + + rv = CLNT_CALL(cl, (rpcproc_t)PMAPPROC_GETPORT, + (xdrproc_t)xdr_pmap, parms, + (xdrproc_t)xdr_u_short, port, tv) == RPC_SUCCESS ? 0 : -1; + + CLNT_DESTROY(cl); + return rv; +} + void am_init(void) { - static struct timeval tv = { 5, 0 }; static const char *server = localhost; + if (ping_pmap() == -1) + return; /* * Create RPC endpoint */
CVS commit: src/usr.bin/eject
Module Name:src Committed By: christos Date: Fri Feb 26 20:18:37 UTC 2010 Modified Files: src/usr.bin/eject: am_glue.c Log Message: PR/42207: YAMAMOTO Takashi: If the portmapper (rpcbind) is not running, eject takes 2 minutes to timeout. Add a ping the portmapper function that times out after 5 seconds. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/eject/am_glue.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/eject
Module Name:src Committed By: christos Date: Fri Feb 26 22:44:17 UTC 2010 Modified Files: src/usr.bin/eject: am_glue.c Log Message: matt wants the ping timeout to be 1sec To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/eject/am_glue.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/eject
Module Name:src Committed By: christos Date: Fri Feb 26 22:44:17 UTC 2010 Modified Files: src/usr.bin/eject: am_glue.c Log Message: matt wants the ping timeout to be 1sec To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/eject/am_glue.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/eject/am_glue.c diff -u src/usr.bin/eject/am_glue.c:1.2 src/usr.bin/eject/am_glue.c:1.3 --- src/usr.bin/eject/am_glue.c:1.2 Fri Feb 26 15:18:37 2010 +++ src/usr.bin/eject/am_glue.c Fri Feb 26 17:44:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: am_glue.c,v 1.2 2010/02/26 20:18:37 christos Exp $ */ +/* $NetBSD: am_glue.c,v 1.3 2010/02/26 22:44:17 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: am_glue.c,v 1.2 2010/02/26 20:18:37 christos Exp $); +__RCSID($NetBSD: am_glue.c,v 1.3 2010/02/26 22:44:17 christos Exp $); #endif /* not lint */ #ifdef HAVE_CONFIG_H @@ -60,6 +60,7 @@ struct pmap parms; struct sockaddr_in si; int s = -1, rv; + static struct timeval pingtv = { 1, 0 }; (void)memset(si, 0, sizeof(si)); si.sin_family = AF_INET; @@ -67,7 +68,7 @@ si.sin_addr.s_addr = htonl(INADDR_LOOPBACK); si.sin_port = htons(PMAPPORT); - if ((cl = clntudp_bufcreate(si, PMAPPROG, PMAPVERS, tv, + if ((cl = clntudp_bufcreate(si, PMAPPROG, PMAPVERS, pingtv, s, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE)) == NULL) return -1; @@ -78,7 +79,7 @@ rv = CLNT_CALL(cl, (rpcproc_t)PMAPPROC_GETPORT, (xdrproc_t)xdr_pmap, parms, - (xdrproc_t)xdr_u_short, port, tv) == RPC_SUCCESS ? 0 : -1; + (xdrproc_t)xdr_u_short, port, pingtv) == RPC_SUCCESS ? 0 : -1; CLNT_DESTROY(cl); return rv;
CVS commit: src/lib/libc/gmon
Module Name:src Committed By: christos Date: Mon Mar 1 19:52:38 UTC 2010 Modified Files: src/lib/libc/gmon: gmon.c Log Message: - KNF - fix hertz() - fix error and warning messages To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/lib/libc/gmon/gmon.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/gmon
Module Name:src Committed By: christos Date: Mon Mar 1 19:52:38 UTC 2010 Modified Files: src/lib/libc/gmon: gmon.c Log Message: - KNF - fix hertz() - fix error and warning messages To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/lib/libc/gmon/gmon.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/gmon/gmon.c diff -u src/lib/libc/gmon/gmon.c:1.31 src/lib/libc/gmon/gmon.c:1.32 --- src/lib/libc/gmon/gmon.c:1.31 Sun Jan 17 18:09:02 2010 +++ src/lib/libc/gmon/gmon.c Mon Mar 1 14:52:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: gmon.c,v 1.31 2010/01/17 23:09:02 wiz Exp $ */ +/* $NetBSD: gmon.c,v 1.32 2010/03/01 19:52:38 christos Exp $ */ /* * Copyright (c) 2003, 2004 Wasabi Systems, Inc. @@ -69,7 +69,7 @@ #if 0 static char sccsid[] = @(#)gmon.c 8.1 (Berkeley) 6/4/93; #else -__RCSID($NetBSD: gmon.c,v 1.31 2010/01/17 23:09:02 wiz Exp $); +__RCSID($NetBSD: gmon.c,v 1.32 2010/03/01 19:52:38 christos Exp $); #endif #endif @@ -104,24 +104,21 @@ /* see profil(2) where this is describe (incorrectly) */ #define SCALE_1_TO_1 0x1L -#define ERR(s) write(STDERR_FILENO, s, sizeof(s)) - -void moncontrol __P((int)); -void monstartup __P((u_long, u_long)); -void _mcleanup __P((void)); -static int hertz __P((void)); +void moncontrol(int); +void monstartup(u_long, u_long); +void _mcleanup(void); +static int hertz(void); #ifdef _REENTRANT static void _m_gmon_destructor(void *); -struct gmonparam *_m_gmon_alloc(void) __attribute__((__no_instrument_function__)); +struct gmonparam *_m_gmon_alloc(void) +__attribute__((__no_instrument_function__)); static void _m_gmon_merge(void); static void _m_gmon_merge_two(struct gmonparam *, struct gmonparam *); #endif void -monstartup(lowpc, highpc) - u_long lowpc; - u_long highpc; +monstartup(u_long lowpc, u_long highpc) { u_long o; char *cp; @@ -146,11 +143,11 @@ cp = sbrk((intptr_t)(p-kcountsize + p-fromssize + p-tossize)); if (cp == (char *)-1) { - ERR(monstartup: out of memory\n); + warnx(%s: out of memory, __func__); return; } #ifdef notdef - memset(cp, 0, p-kcountsize + p-fromssize + p-tossize); + (void)memset(cp, 0, p-kcountsize + p-fromssize + p-tossize); #endif p-tos = (struct tostruct *)(void *)cp; cp += (size_t)p-tossize; @@ -350,10 +347,12 @@ mutex_lock(_gmonlock); - for (q = _gmonfree; q != NULL; q = (struct gmonparam *)(void *)q-kcount) + for (q = _gmonfree; q != NULL; + q = (struct gmonparam *)(void *)q-kcount) _m_gmon_merge_two(_gmonparam, q); - for (q = _gmoninuse; q != NULL; q = (struct gmonparam *)(void *)q-kcount) { + for (q = _gmoninuse; q != NULL; + q = (struct gmonparam *)(void *)q-kcount) { q-state = GMON_PROF_OFF; _m_gmon_merge_two(_gmonparam, q); } @@ -363,7 +362,7 @@ #endif void -_mcleanup() +_mcleanup(void) { int fd; int fromindex; @@ -390,13 +389,13 @@ * our real one. */ if (issetugid() (geteuid() != getuid() || getegid() != getgid())) { - warnx(mcount: Profiling of set{u,g}id binaries is not - allowed); + warnx(%s: Profiling of set{u,g}id binaries is not + allowed, __func__); return; } if (p-state == GMON_PROF_ERROR) - ERR(_mcleanup: tos overflow\n); + warnx(%s: tos overflow, __func__); size = sizeof(clockinfo); mib[0] = CTL_KERN; @@ -422,8 +421,9 @@ return; if (snprintf(buf, sizeof buf, %s/%d.%s, - profdir, getpid(), getprogname()) = (int)(sizeof buf)) { - warnx(_mcleanup: internal buffer overflow, PROFDIR too long); + profdir, getpid(), getprogname()) = (int)(sizeof buf)) { + warnx(%s: internal buffer overflow, PROFDIR too long, + __func__); return; } @@ -434,13 +434,13 @@ fd = open(proffile , O_CREAT|O_TRUNC|O_WRONLY, 0666); if (fd 0) { - warn(mcount: Cannot open `%s', proffile); + warn(%s: Cannot open `%s', __func__, proffile); return; } #ifdef DEBUG logfd = open(gmon.log, O_CREAT|O_TRUNC|O_WRONLY, 0664); if (logfd 0) { - warn(mcount: Cannot open `gmon.log'); + warn(%s: Cannot open `%s', __func__, gmon.log); return; } len = snprintf(buf2, sizeof buf2, [mcleanup1] kcount %p ssiz %lu\n, @@ -477,12 +477,12 @@ rawarc.raw_frompc = frompc; rawarc.raw_selfpc = p-tos[toindex].selfpc; rawarc.raw_count = p-tos[toindex].count; - write(fd, rawarc, sizeof rawarc); + (void)write(fd, rawarc, sizeof rawarc); } } - close(fd); + (void)close(fd); #ifdef DEBUG - close(logfd); + (void)close(logfd); #endif } @@ -492,8 +492,7 @@ * all the data structures are ready. */ void -moncontrol(mode) - int mode; +moncontrol(int mode) { struct gmonparam *p = _gmonparam; @@ -514,17 +513,31 @@ * if something goes wrong, we return 0, an impossible hertz. */ static int -hertz() +hertz(void) { - struct itimerval tim; - - tim.it_interval.tv_sec = 0; - tim.it_interval.tv_usec = 1; - tim.it_value.tv_sec = 0; -
CVS commit: src/sbin/fsck
Module Name:src Committed By: christos Date: Sat Mar 6 00:30:54 UTC 2010 Modified Files: src/sbin/fsck: partutil.c Log Message: - use warn/err properly - wrap long lines To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sbin/fsck/partutil.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/fsck/partutil.c diff -u src/sbin/fsck/partutil.c:1.9 src/sbin/fsck/partutil.c:1.10 --- src/sbin/fsck/partutil.c:1.9 Thu Jul 16 19:50:32 2009 +++ src/sbin/fsck/partutil.c Fri Mar 5 19:30:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: partutil.c,v 1.9 2009/07/16 23:50:32 dyoung Exp $ */ +/* $NetBSD: partutil.c,v 1.10 2010/03/06 00:30:54 christos Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: partutil.c,v 1.9 2009/07/16 23:50:32 dyoung Exp $); +__RCSID($NetBSD: partutil.c,v 1.10 2010/03/06 00:30:54 christos Exp $); #include sys/types.h #include sys/disklabel.h @@ -76,12 +76,16 @@ static void dict2geom(struct disk_geom *geo, prop_dictionary_t dict) { - memset(geo, 0, sizeof(struct disk_geom)); - prop_dictionary_get_int64(dict, sectors-per-unit, geo-dg_secperunit); + (void)memset(geo, 0, sizeof(struct disk_geom)); + prop_dictionary_get_int64(dict, sectors-per-unit, + geo-dg_secperunit); prop_dictionary_get_uint32(dict, sector-size, geo-dg_secsize); - prop_dictionary_get_uint32(dict, sectors-per-track, geo-dg_nsectors); - prop_dictionary_get_uint32(dict, tracks-per-cylinder, geo-dg_ntracks); - prop_dictionary_get_uint32(dict, cylinders-per-unit, geo-dg_ncylinders); + prop_dictionary_get_uint32(dict, sectors-per-track, + geo-dg_nsectors); + prop_dictionary_get_uint32(dict, tracks-per-cylinder, + geo-dg_ntracks); + prop_dictionary_get_uint32(dict, cylinders-per-unit, + geo-dg_ncylinders); } @@ -159,7 +163,7 @@ if (dt) { lp = getdiskbyname(dt); if (lp == NULL) - errx(1, %s: unknown disk type, dt); + errx(1, unknown disk type `%s', dt); } /* Get disk description dictionary */ @@ -171,7 +175,7 @@ * cgd, ccd pseudo disk drives doesn't support DIOCGDDISKINFO */ if (ioctl(fd, DIOCGDINFO, lp) == -1) { - printf(DIOCGDINFO on %s failed\n, s); + warn(DIOCGDINFO on %s failed, s); return -1; } label2geom(geo, lp); @@ -183,8 +187,8 @@ /* Get info about partition/wedge */ if (ioctl(fd, DIOCGWEDGEINFO, dkw) == -1) { if (ioctl(fd, DIOCGDINFO, lp) == -1) - errx(errno, Please implement DIOCGWEDGEINFO or - DIOCGDINFO for disk device %s\n, s); + err(1, Please implement DIOCGWEDGEINFO or + DIOCGDINFO for disk device %s, s); part2wedge(dkw, lp, s); }
Re: CVS commit: src/lib/libedit
On Mar 7, 5:24am, takehiko.noz...@gmail.com (Takehiko NOZAKI) wrote: -- Subject: Re: CVS commit: src/lib/libedit | -typedef int (*el_rfunc_t)(EditLine *, char *); | +typedef int (*el_rfunc_t)(EditLine *, Char *); | | typedef struct el_read_t { | el_rfunc_t read_char; /* Function to read a character */ | | | what shoulld we do to solve this problem? | i believe tempolary backout this patch is the way we have to go. Are you sure? because the code handles the narrow case? (That is what the NARROW_READ flag is for. | # i'm now started completely rewriting wide-character support for libedit. | # but it still need lots of time. Good luck. christos
Re: CVS commit: src/lib/libedit
On Mar 7, 7:46am, takehiko.noz...@gmail.com (Takehiko NOZAKI) wrote: -- Subject: Re: CVS commit: src/lib/libedit | oh, i see. i don't recognize NARROW_READ flag. | source/binary compatibility are still **kept**, | i withdrawn previous mail, sorry. | | | BTW, this hack is not good for MB_CUR_MAX 1 case. | if el_set(EL_GETCFN) called without EL_BUILTIN_GETCFN, | we can't treat multibyte correctly. | # because where we convert multibyte - wide-character is | # EL_BUILTIN_GETCFN(=3Dread_char) itself. Totally agree, but there is other breakage for the non UTF8 and MB_CUR_MAX 1 case. christos