Re: svn commit: r196752 - head/lib/libc/stdtime

2009-09-02 Thread Andrey Chernov
On Wed, Sep 02, 2009 at 09:08:09AM +0200, Simon L. Nielsen wrote: Log: Use (unsigned char) cast for ctype macro Acording to the manual page and the C standard book I have, isdigit() takes an int for an argument, so why change this? Not exactly that. From our manual page: The value of

Re: svn commit: r196752 - head/lib/libc/stdtime

2009-09-03 Thread Andrey Chernov
On Thu, Sep 03, 2009 at 09:26:03AM +0200, Dag-Erling Sm??rgrav wrote: - The core dump ache refers to can occur with a na??ve implementation that uses a lookup table and checks for EOF, but not for other negative values. Thanx for detailed explanation. Just to note: even such naive

Re: svn commit: r196752 - head/lib/libc/stdtime

2009-09-03 Thread Andrey Chernov
On Thu, Sep 03, 2009 at 11:08:26AM +0200, Dag-Erling Sm??rgrav wrote: What do you think of the attached patch? Looks nice. -- http://ache.pp.ru/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To

Re: svn commit: r196752 - head/lib/libc/stdtime

2009-09-03 Thread Andrey Chernov
On Fri, Sep 04, 2009 at 01:42:04PM +1000, Bruce Evans wrote: The patch is missing the corresponding text for wctype functions (argmuments of type wint_t generally give undefined behaviour unless their value is representable as a wchar_t or equal to the value of WEOF). In FreeBSD, wint_t has

Re: svn commit: r196752 - head/lib/libc/stdtime

2009-09-04 Thread Andrey Chernov
On Fri, Sep 04, 2009 at 03:21:09PM +1000, Bruce Evans wrote: % The value of the argument must be representable as an % .Vt unsigned char % or the value of % .Dv EOF . This is the same as in POSIX except the POSIX wording is better (e.g., the above only says implicitly that the behaviour is

Re: svn commit: r196818 - head/contrib/ee

2009-09-04 Thread Andrey Chernov
On Fri, Sep 04, 2009 at 12:32:14PM +0200, Ed Schouten wrote: Even though I really appreciate fixes/cleanups to ee(1), I think changes like these should be sent to its maintainer as well. Have you done this? Yes. -- http://ache.pp.ru/ pgpkzWA3ddeoN.pgp Description: PGP signature

Re: svn commit: r196818 - head/contrib/ee

2009-09-04 Thread Andrey Chernov
On Fri, Sep 04, 2009 at 04:50:05PM +0200, Ed Schouten wrote: * Andrey Chernov a...@nagual.pp.ru wrote: On Fri, Sep 04, 2009 at 12:32:14PM +0200, Ed Schouten wrote: Even though I really appreciate fixes/cleanups to ee(1), I think changes like these should be sent to its maintainer as well

Re: svn commit: r196981 - head/usr.bin/unzip

2009-09-09 Thread Andrey Chernov
On Tue, Sep 08, 2009 at 03:55:13PM +, Roman Divacky wrote: + * Detect whether this is a text file. The correct way to + * do this is to check the least significant bit of the + * internal file attributes field of the corresponding + *

Re: svn commit: r196981 - head/usr.bin/unzip

2009-09-09 Thread Andrey Chernov
On Wed, Sep 09, 2009 at 05:14:32PM +0200, Dag-Erling Sm??rgrav wrote: Andrey Chernov a...@nagual.pp.ru writes: If I understand the purpose of this code right, better use isalnum()+ispunct()+ispace() combination to count non-ASCII people too. uh, isprint() perhaps? In some charsets

Re: svn commit: r196981 - head/usr.bin/unzip

2009-09-09 Thread Andrey Chernov
On Wed, Sep 09, 2009 at 08:16:09AM -0700, Tim Kientzle wrote: Since this is only to support -a (which does end-of-line conversions), I would suggest using a rather different set of heuristics that examines end-of-line sequences and control characters only: * Any byte value 31 that's not CR

Re: svn commit: r207206 - head/bin/sh

2010-04-26 Thread Andrey Chernov
On Sun, Apr 25, 2010 at 08:43:19PM +, Jilles Tjoelker wrote: Author: jilles Date: Sun Apr 25 20:43:19 2010 New Revision: 207206 URL: http://svn.freebsd.org/changeset/base/207206 Log: sh: Use stalloc for arith variable names. This is simpler than the custom memory tracker I

Re: svn commit: r208868 - in head/usr.bin: bc dc

2010-06-06 Thread Andrey Chernov
On Sun, Jun 06, 2010 at 03:00:04PM +0300, Kostik Belousov wrote: On Sun, Jun 06, 2010 at 11:36:09AM +, Gabor Kovesdan wrote: @@ -223,14 +222,11 @@ static const struct jump_entry jump_tabl (sizeof(jump_table_data)/sizeof(jump_table_data[0])) static void -sighandler(int

Re: svn commit: r209388 - in head/sbin/geom: class/part core misc

2010-06-21 Thread Andrey Chernov
On Mon, Jun 21, 2010 at 08:24:51AM +, Andrey V. Elsukov wrote: +done: + if (mult * unit mult || number * mult * unit number) + return (ERANGE); A general rule is: don't check for overflow when it already occurs, since result can be any, including valid ones. Redo it to

Re: svn commit: r210679 - head/bin/sleep

2010-07-31 Thread Andrey Chernov
On Sat, Jul 31, 2010 at 02:30:11PM +, Konstantin Belousov wrote: Author: kib Date: Sat Jul 31 14:30:11 2010 New Revision: 210679 URL: http://svn.freebsd.org/changeset/base/210679 Log: Report the time left for the sleep on SIGINFO. Be stricter in the checking of interval

Re: svn commit: r201604 - head/lib/libc/gen

2010-01-10 Thread Andrey Chernov
Well. Since I see no objections so far, I'll plan to commit strcmp()-strcoll() replacement in alphasort() soon. -- http://ache.pp.ru/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send

Re: svn commit: r201999 - head/lib/libc/stdio

2010-01-10 Thread Andrey Chernov
On Sun, Jan 10, 2010 at 02:30:30PM +, Colin Percival wrote: + * Check for integer overflow. As an optimization, first check that + * at least one of {count, size} is at least 2^16, since if both + * values are less than that, their product can't possible overflow + *

Re: svn commit: r201999 - head/lib/libc/stdio

2010-01-10 Thread Andrey Chernov
On Mon, Jan 11, 2010 at 12:06:18AM +0100, Jilles Tjoelker wrote: I picked EINVAL because this is the code used by read(2) and write(2) if they are passed nbytes INT_MAX. It would seem odd to use one error code for a number of bytes between INT_MAX and SIZE_MAX and then switch to a

Re: svn commit: r201999 - head/lib/libc/stdio

2010-01-11 Thread Andrey Chernov
On Mon, Jan 11, 2010 at 02:29:03PM +1100, Bruce Evans wrote: 3) errno should be EOVERFLOW, see other owerflow checks in the stdio. There are none. I (we?) intentionally didn't set errno when the correct F.e. see fseek()/fseeko() stdio checks, as POSIX says: [EOVERFLOW] For fseek(), the

Re: svn commit: r202070 - head/usr.bin/make

2010-01-11 Thread Andrey Chernov
On Mon, Jan 11, 2010 at 09:16:42AM +, Hartmut Brandt wrote: @@ -1807,8 +1807,6 @@ JobStart(GNode *gn, int flags, Job *prev } else { fprintf(stdout, Remaking `%s'\n, gn-name); fflush(stdout); - if ((tdir =

Re: svn commit: r202572 - head/lib/libc/gen

2010-01-19 Thread Andrey Chernov
On Wed, Jan 20, 2010 at 01:42:08AM +1100, Bruce Evans wrote: The comment was correct. It says that POSIX requires strcoll() for alphasort(), not for opendir(). Since opendir() is not alphasort(), and it wants plain ASCII sorting to support union file systems, it intentionally doesn't use

Re: svn commit: r202572 - head/lib/libc/gen

2010-01-20 Thread Andrey Chernov
On Wed, Jan 20, 2010 at 07:43:29PM +1100, Bruce Evans wrote: No, it is a comment about opendir()'s comparison function. It has nothing to do with scandir(), and the only thing that it has to do with alphasort() is that it must be different for the reasons described. Then the comment was plain

Re: svn commit: r202572 - head/lib/libc/gen

2010-01-20 Thread Andrey Chernov
On Wed, Jan 20, 2010 at 09:33:08PM +1100, Bruce Evans wrote: But there is nothing said about opendir() strcoll() relation in the mentioned standards. The only word I found is that opendir() returns ordered sequence, but nowhere mentioned ordered by what criteria, so perhaps they mean

Re: svn commit: r202572 - head/lib/libc/gen

2010-01-21 Thread Andrey Chernov
On Thu, Jan 21, 2010 at 04:25:53PM +1100, Bruce Evans wrote: To be used in practice, strcoll() should never fails, doing fallback to strcmp() instead, not only in that, but in lots of other cases too (it may set errno like EILSEQ, but not fails). The next important thing is to return 0

Re: svn commit: r184161 - head/sys/i386/i386

2008-10-22 Thread Andrey Chernov
On Wed, Oct 22, 2008 at 06:04:52PM +0300, Kostik Belousov wrote: Taking apart commit message, I think you change is wrong semantically. Checking CPU_FAMILY without first checking vendor is meaningless. It was simple build breakage fix. Discuss this matter with original committer jkim@ --

Re: svn commit: r192486 - head/usr.bin/perror

2009-06-03 Thread Andrey Chernov
In the light of localized strerror() messages more interesting utility will be just duing backwards, i.e. to find error number and English explaination using given localized diagnostic. IMHO this functionality can be insterted into perror(1) additionally. -- http://ache.pp.ru/

Re: svn commit: r204803 - head/usr.bin/uniq

2010-03-07 Thread Andrey Chernov
On Sun, Mar 07, 2010 at 12:46:27PM +0200, Jaakko Heinonen wrote: On 2010-03-06, Andrey A. Chernov wrote: 3) Enforce the implied LINE_MAX limit (from POSIX definition of text file and POSIX uniq(1) description). Although a file with lines longer than LINE_MAX isn't a text file by

Additionally (was Re: svn commit: r204803 - head/usr.bin/uniq)

2010-03-07 Thread Andrey Chernov
On Sun, Mar 07, 2010 at 02:52:11PM +0300, Andrey Chernov wrote: On Sun, Mar 07, 2010 at 12:46:27PM +0200, Jaakko Heinonen wrote: On 2010-03-06, Andrey A. Chernov wrote: 3) Enforce the implied LINE_MAX limit (from POSIX definition of text file and POSIX uniq(1) description

Re: svn commit: r204803 - head/usr.bin/uniq

2010-03-07 Thread Andrey Chernov
On Mon, Mar 08, 2010 at 02:17:41AM +1100, Bruce Evans wrote: 3) Enforce the implied LINE_MAX limit (from POSIX definition of text file and POSIX uniq(1) description). This seems to enforce a limit of LINE_MAX - 1, since space for the NUL terminator is no longer provided. Hopfully

Re: svn commit: r204803 - head/usr.bin/uniq

2010-03-07 Thread Andrey Chernov
On Sun, Mar 07, 2010 at 09:31:39PM +0300, Andrey Chernov wrote: It is right idea. I'll use sysconf(__SC_LINE_MAX) there. But currently it does the same (sysconf.c): case _SC_LINE_MAX: return (LINE_MAX); ... To add more: NetBSD uniq grows (contrary, NetBSD comm

Re: svn commit: r204803 - head/usr.bin/uniq

2010-03-08 Thread Andrey Chernov
On Mon, Mar 08, 2010 at 02:51:23PM -0500, David Schultz wrote: You can actually just call getline() rather than reinventing the wheel. See just committed version. I use getline(3) (POSIX one). I've had a wide character version of getline() ready to commit for some time (I just need to find

Re: svn commit: r204803 - head/usr.bin/uniq

2010-03-09 Thread Andrey Chernov
On Tue, Mar 09, 2010 at 12:55:44PM -0500, David Schultz wrote: Actually, a question...why doesn't it suffice to simply call strcoll() instead of mbstowcs() followed by wcscoll()? I would expect that in the absence of the -i flag, none of this would be necessary. strcoll() is only for

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Andrey Chernov
On Tue, Jun 05, 2012 at 10:08:09AM +0200, Dimitry Andric wrote: On 2012-06-04 23:34, Andrey A. Chernov wrote: Author: ache Date: Mon Jun 4 21:34:49 2012 New Revision: 236582 URL: http://svn.freebsd.org/changeset/base/236582 Log: 1) IEEE Std 1003.1-2008, errno section, is explicit

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Andrey Chernov
On Tue, Jun 05, 2012 at 11:35:53AM +0300, Konstantin Belousov wrote: Not to mention that the patch was committed to _our_ implementation of libc, which uses _our_ free, and not some abstract free(3). Our free changing errno means that process state is so messed that worrying about realpath(3)

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Andrey Chernov
On Tue, Jun 05, 2012 at 04:39:01PM +0400, Andrey Chernov wrote: Actually, it says the following: RETURN VALUE The free() function shall not return a value. ERRORS No errors are defined. How much clearer do you want it? ;) It is pretty clear

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Andrey Chernov
On Tue, Jun 05, 2012 at 09:47:42AM +0200, Pawel Jakub Dawidek wrote: The setting of errno after a successful call to a function is unspecified unless the description of that function specifies that errno shall not be modified. Very interesting. However free(3) is always successful.

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Andrey Chernov
On Tue, Jun 05, 2012 at 02:55:20PM +0200, Joerg Sonnenberger wrote: On Tue, Jun 05, 2012 at 04:39:01PM +0400, Andrey Chernov wrote: Moreover, standard metion unsuccessful call case for free() where errno state is totally undefined. ...which would be a programming mistake in first place

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Andrey Chernov
On Tue, Jun 05, 2012 at 03:10:06PM +0200, Dag-Erling Sm??rgrav wrote: Pawel Jakub Dawidek p...@freebsd.org writes: Very interesting. However free(3) is always successful. Maybe we need more context here, but the sentence above might talk about functions that can either succeed or fail and

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Andrey Chernov
On Mon, Jun 04, 2012 at 09:34:49PM +, Andrey A. Chernov wrote: 1) IEEE Std 1003.1-2008, errno section, is explicit that The setting of errno after a successful call to a function is unspecified unless the description of that function specifies that errno shall not be modified.

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Andrey Chernov
On Tue, Jun 05, 2012 at 04:25:10PM +0200, Joerg Sonnenberger wrote: Please see http://austingroupbugs.net/view.php?id=385 That is about explicitly recognizing how stupid the notion of free(3) not preserving errno is. Seriously, before you start to randomly bloat code all over the place,

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Andrey Chernov
On Tue, Jun 05, 2012 at 08:23:20AM -0700, Marcel Moolenaar wrote: If we the resolution of the ID 385 indicates that a future version will have the suggested text, then one can definitely argue that it's not unreasonable to start changing our functions to match the new text (like free(3))

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Andrey Chernov
On Tue, Jun 05, 2012 at 05:17:33PM +0200, Joerg Sonnenberger wrote: On Tue, Jun 05, 2012 at 06:31:14PM +0400, Andrey Chernov wrote: BTW, if general consensus will be to track unpublished standard, I will back out my change (in hope our malloc() maintainer will change free() to directly

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Andrey Chernov
On Wed, Jun 06, 2012 at 04:57:29AM +1000, Bruce Evans wrote: POSIX may require errno to not be clobbered, especially for its functions. It probably shouldn't do this for Standard C library functions like free(), since this would be an extension and any use of the extension would give

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Andrey Chernov
On Wed, Jun 06, 2012 at 06:11:01AM +1000, Bruce Evans wrote: This is essentially unusable (so a bad idea). Instead of unconditionally saving and restoring errno around calls to free(), portable POSIX code can soon use a messy ifdef to avoid doing this in some cases, but still has to do it in

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Andrey Chernov
On Tue, Jun 05, 2012 at 11:30:34PM +0200, Joerg Sonnenberger wrote: On Wed, Jun 06, 2012 at 01:01:54AM +0400, Andrey Chernov wrote: On Wed, Jun 06, 2012 at 06:11:01AM +1000, Bruce Evans wrote: This is essentially unusable (so a bad idea). Instead of unconditionally saving and restoring

Re: svn commit: r236917 - head/sys/kern

2012-06-12 Thread Andrey Chernov
On Wed, Jun 13, 2012 at 12:37:50PM +1000, Bruce Evans wrote: On Mon, 11 Jun 2012, Pawel Jakub Dawidek wrote: -KASSERT(fd = 0 fd fdp-fd_nfiles, +KASSERT((unsigned int)fd fdp-fd_nfiles, (file descriptor %d out of range (0, %d), fd, fdp-fd_nfiles));

Re: svn commit: r235253 - stable/9/lib/libfetch

2012-05-11 Thread Andrey Chernov
On Fri, May 11, 2012 at 01:24:17AM +, Ed Maste wrote: Author: emaste Date: Fri May 11 01:24:16 2012 New Revision: 235253 URL: http://svn.freebsd.org/changeset/base/235253 Log: MFC r234138: Support percent-encoded user and password RFC 1738 specifies that any :, @,

Re: svn commit: r235266 - head/lib/libc/stdlib

2012-05-11 Thread Andrey Chernov
Thanks, but in this two places old errno value should be saved across free() because free() may damage it: On Fri, May 11, 2012 at 11:29:08AM +, Konstantin Belousov wrote: ... + if (lstat(resolved, sb) != 0) { + if (m) +

Re: svn commit: r235266 - head/lib/libc/stdlib

2012-05-11 Thread Andrey Chernov
On Fri, May 11, 2012 at 08:04:12PM +0300, Konstantin Belousov wrote: On Fri, May 11, 2012 at 06:54:32PM +0400, Andrey Chernov wrote: Thanks, but in this two places old errno value should be saved across free() because free() may damage it: I do not agree. free() cannot change errno. Perhaps

Re: svn commit: r235266 - head/lib/libc/stdlib

2012-05-11 Thread Andrey Chernov
On Fri, May 11, 2012 at 10:55:39AM -0700, Garrett Cooper wrote: On Fri, May 11, 2012 at 10:04 AM, Konstantin Belousov kostik...@gmail.com wrote: On Fri, May 11, 2012 at 06:54:32PM +0400, Andrey Chernov wrote: Thanks, but in this two places old errno value should be saved across free

Re: svn commit: r241962 - stable/8/sys/conf

2012-10-23 Thread Andrey Chernov
On 23.10.2012 23:04, John Baldwin wrote: Remove attempt to use an empty NORMAL_CTFCONVERT and always fall back to using a the null @: command if CTF is disabled. Thanks for merging. BTW, you can merge make change into branch 8 too and use complex check like that .elif (${MAKE_VERSION} =

Re: svn commit: r242417 - head/sys/dev/sound/pci/hda

2012-11-01 Thread Andrey Chernov
On 01.11.2012 2:11, Alexander Motin wrote: Author: mav Date: Wed Oct 31 22:11:51 2012 New Revision: 242417 URL: http://svn.freebsd.org/changeset/base/242417 Log: ASUS EeePC 1001px has strange variant of ALC269 CODEC, that mutes speaker if unused in that configuration mixer at NID 15

Re: svn commit: r243474 - head/usr.bin/cut

2012-11-24 Thread Andrey Chernov
On 24.11.2012 8:15, Andrew Turner wrote: The is_delim function works on wchar_t characters not ints, update the function to take a wchar_t as it's argument. static int -is_delim(int ch) +is_delim(wchar_t ch) { if (wflag) { if (ch == ' ' || ch == '\t') I can't

Re: svn commit: r243474 - head/usr.bin/cut

2012-11-24 Thread Andrey Chernov
On 24.11.2012 18:12, Dimitry Andric wrote: -is_delim(int ch) +is_delim(wchar_t ch) { if (wflag) { if (ch == ' ' || ch == '\t') I can't look at the whole code at this moment, but taking standalone this is incorrect comparison for wchar_t. Should be L' ' and L'\t'

Re: svn commit: r243474 - head/usr.bin/cut

2012-11-24 Thread Andrey Chernov
On 24.11.2012 18:51, Andrey Chernov wrote: On 24.11.2012 18:12, Dimitry Andric wrote: -is_delim(int ch) +is_delim(wchar_t ch) { if (wflag) { if (ch == ' ' || ch == '\t') I can't look at the whole code at this moment, but taking standalone this is incorrect comparison

Re: svn commit: r251874 - in stable/9/sys: arm/arm cam cam/ctl cam/scsi conf dev/aac dev/advansys dev/aha dev/ahb dev/ahci dev/aic dev/aic7xxx dev/amr dev/arcmsr dev/ata dev/buslogic dev/ciss dev/dpt

2013-06-17 Thread Andrey Chernov
On 18.06.2013 4:36, Scott Long wrote: Author: scottl Date: Tue Jun 18 00:36:53 2013 New Revision: 251874 URL: http://svnweb.freebsd.org/changeset/base/251874 === amd (all) cc -O2 -pipe -march=prescott -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc

Re: svn commit: r251888 - stable/9/sys/dev/amd

2013-06-17 Thread Andrey Chernov
On 18.06.2013 7:34, Scott Long wrote: Author: scottl Date: Tue Jun 18 03:34:08 2013 New Revision: 251888 URL: http://svnweb.freebsd.org/changeset/base/251888 Log: Catch up to the changes from r251874. This isn't an MFC because the amd(4) driver no longer exists in FreeBSD 10.

Re: RAND_MAX broken

2013-07-02 Thread Andrey Chernov
On 02.07.2013 11:39, Bruce Evans wrote: The bugs are a little different than I said above. There is no overflow problem and no problem with invalid values being produces, since the algorithm from ACM is careful to do everything with 32 bit signed integers without causing overflow. The

Re: RAND_MAX broken

2013-07-02 Thread Andrey Chernov
On 02.07.2013 20:33, Bruce Evans wrote: I checked the values returned by rand(). The ACM part works as intended, so it never returns RAND_MAX. It also never returns 0. So the distribution of values in the documented range [0, RAND_MAX] is very non-uniform. It is uniform in [1, RAND_MAX -

Re: svn commit: r252608 - in head: include lib/libc/stdlib

2013-07-03 Thread Andrey Chernov
On 04.07.2013 6:47, Bruce Evans wrote: Er, I think it is too dangerous to change either RAND_MAX or the offset without more preparation: - increasing the range returned (and increasing RAND_MAX to match) would obviously be binary-incompatible. Old binaries may have the old RAND_MAX built

Re: svn commit: r252608 - in head: include lib/libc/stdlib

2013-07-04 Thread Andrey Chernov
On 04.07.2013 11:01, Bruce Evans wrote: We already pass that moment in the past, changing oldbad formula with new one which cause the same effect: non-repeating sequence in the very global scope. We already agree that repeating depends on something like OS release numbers. I can't find that

Re: svn commit: r252608 - in head: include lib/libc/stdlib

2013-07-04 Thread Andrey Chernov
On 04.07.2013 16:30, Dmitry Morozovsky wrote: On Thu, 4 Jul 2013, Andrey Chernov wrote: We already pass that moment in the past, changing oldbad formula with new one which cause the same effect: non-repeating sequence in the very global scope. We already agree that repeating depends

Re: svn commit: r246913 - head/etc

2013-02-19 Thread Andrey Chernov
2560 19 Feb 17:15 .. lrwxr-xr-x 1 ache wheel 1 19 Feb 17:15 b - b On 19.02.2013 15:29, Andrey Chernov wrote: This patch makes install -C, -S and default (-c) to do the same for links, as 'ln -f'. Not well tested yes due to lack of time. --- xinstall.c.bak2013-02-19 15:20

Re: svn commit: r249035 - head/lib/libc/stdlib

2013-04-03 Thread Andrey Chernov
On 03.04.2013 11:04, Bruce Evans wrote: +mib[0] = CTL_KERN; +mib[1] = KERN_ARND; +sysctl(mib, 2, (void *)next, len, NULL, 0); } The sysctl() is certain to fail on old kernels (like open of /dev/random on even older kernels), but there is no longer any error checking or

Re: svn commit: r249035 - head/lib/libc/stdlib

2013-04-04 Thread Andrey Chernov
On 04.04.2013 9:24, Xin Li wrote: True, but keep mind that neither random(3) nor rand(3) is intended to satisfy cryptographically secure needs, and I don't see a reason why kernel arc4 can not be improved. Danger level here is not to get something cryptographically less secure, but even much

Re: svn commit: r249785 - in stable/9/sbin: dumpfs newfs tunefs

2013-04-22 Thread Andrey Chernov
The bug eye-catched: On 23.04.2013 5:09, Kirk McKusick wrote: + case 'k': + found_arg = 1; + name = space to hold for metadata blocks; + kvalue = atoi(optarg); + if (mvalue 0)

Re: svn commit: r249849 - in head/sys/dev: hptmv mpt

2013-04-25 Thread Andrey Chernov
On 25.04.2013 12:26, Ronald Klop wrote: Hi, Maybe I need more coffee, but I don't see a difference between the if and the else statements in the hptmv file. shutdown_kproc vs. kproc_shutdown Regards, Ronald. On Wed, 24 Apr 2013 21:00:45 +0200, Alexander Motin m...@freebsd.org wrote:

Re: svn commit: r250121 - in stable/9: . etc share/mk

2013-05-01 Thread Andrey Chernov
On 01.05.2013 2:13, Brooks Davis wrote: + Due to the use of the new -l option to install(1) during build + and install, you must take care not to directly set the INSTALL + make variable in your /etc/make.conf, /etc/src.conf, or on the + command line. If you with to use the -C

Re: svn commit: r250121 - in stable/9: . etc share/mk

2013-05-01 Thread Andrey Chernov
On 01.05.2013 2:13, Brooks Davis wrote: +# +# install(1) parameters. +# +HRDLINK?=-l h +SYMLINK?=-l s It is error, there must be no space or - sign. -- bitcoin:13fGiNutKNHcVSsgtGQ7bQ5kgUKgEQHn7N ___ svn-src-all@freebsd.org mailing list

Re: svn commit: r250121 - in stable/9: . etc share/mk

2013-05-01 Thread Andrey Chernov
On 02.05.2013 9:09, Andrey Chernov wrote: On 01.05.2013 2:13, Brooks Davis wrote: +# +# install(1) parameters. +# +HRDLINK?= -l h +SYMLINK?= -l s It is error, there must be no space or - sign. Sorry my mistake. All right. -- bitcoin:13fGiNutKNHcVSsgtGQ7bQ5kgUKgEQHn7N

Re: svn commit: r250215 - stable/9/lib/libc/locale

2013-05-03 Thread Andrey Chernov
I don't think this change is optimal (cause slowdown) since you add unneeded strlen() in the loop for known-sized elements plus one strlen() for tested property, and wctype_l() itself can be called very often, so we definitely don't need slowdown here. Since most of elements have equal sizes, your

Re: svn commit: r250215 - stable/9/lib/libc/locale

2013-05-04 Thread Andrey Chernov
On 04.05.2013 0:48, Sergey Kandaurov wrote: On 3 May 2013 23:55, Jilles Tjoelker jil...@stack.nl wrote: Some sort of perfect hashing can also be an option, although it makes it harder to add new properties or adds a build dependency on gperf(1) that we would like to get rid of. I hacked a bit

Re: svn commit: r250215 - stable/9/lib/libc/locale

2013-05-04 Thread Andrey Chernov
On 04.05.2013 16:03, Sergey Kandaurov wrote: BTW, I don't run tests and look in asm code for sure, but it seems property[0] == p[0] is unneeded because almost every compiler tries to inline strcmp(). Doesn't seem so (in-lining), see below. Yes, system's GNU cc don't inline strcmp() but

Re: svn commit: r250245 - head/lib/libc/locale

2013-05-05 Thread Andrey Chernov
On 04.05.2013 21:21, Sergey Kandaurov wrote: Log: Document that the return type is different from 1003.1-2008. It is better to fix this function return type to match POSIX standard rather than to document its non-standard behavior. We try to follow POSIX when possible and this is the

Re: svn commit: r250245 - head/lib/libc/locale

2013-05-06 Thread Andrey Chernov
On 06.05.2013 1:03, David Chisnall wrote: On 5 May 2013, at 19:31, Andrey Chernov a...@freebsd.org wrote: It is better to fix this function return type to match POSIX standard rather than to document its non-standard behavior. We try to follow POSIX when possible and this is the case. We

Re: svn commit: r250577 - head/sys/vm

2013-05-12 Thread Andrey Chernov
On 12.05.2013 20:50, Alan Cox wrote: GNU cc errors related to part of diff below: cc1: warnings being treated as errors ../../../vm/vm_page.c: In function 'vm_page_alloc': ../../../vm/vm_page.c:1209: warning: 'mpred' may be used uninitialized in this function *** [vm_page.o] Error code 1 Formally

Re: svn commit: r250883 - in head: include include/xlocale lib/libc/locale sys/sys tools/regression/lib/libc/locale

2013-05-21 Thread Andrey Chernov
On 22.05.2013 2:20, Ed Schouten wrote: 2013/5/22 Jilles Tjoelker jil...@stack.nl: Our wchar_t is only ISO 10646 for UTF-8 and possibly US-ASCII and ISO8859-1 (subset) locales. Oh, the horror! I thought on FreeBSD, we used the LC_CTYPE files to do a mapping to ISO 10646. Unfortunately, it

Re: svn commit: r240822 - head/sys/geom

2012-09-26 Thread Andrey Chernov
On Tue, Sep 25, 2012 at 05:37:12PM -0600, Kenneth D. Merry wrote: Use the topology lock to protect list of providers while withering them. It is possible that provider is destroyed while we are iterating over the list. This breaks devices going away in CAM. When the da(4) driver

Re: svn commit: r241373 - head/lib/libc/stdlib

2012-10-09 Thread Andrey Chernov
Do you check assembler output for _both_ cases? In my testing clang and gcc xor's 'junk' properly in case it have 'volatile' keyword (as in srandomdev()) and elide it without 'volatile'. IMHO this change should be backed out for srandomdev() and adding 'volatile' for sranddev() instead. On

Re: svn commit: r241373 - head/lib/libc/stdlib

2012-10-09 Thread Andrey Chernov
On 09.10.2012 21:47, Eitan Adler wrote: On 9 October 2012 12:33, Andrey Chernov a...@freebsd.org wrote: Do you check assembler output for _both_ cases? Yes. ... http://blog.eitanadler.com/2012/10/reduced-entropy-in-rand-and-random.html At this URL I see only already known buggy assembler

Re: svn commit: r241373 - head/lib/libc/stdlib

2012-10-11 Thread Andrey Chernov
On 11.10.2012 15:44, Pawel Jakub Dawidek wrote: On Tue, Oct 09, 2012 at 01:51:05PM -0400, Eitan Adler wrote: On 9 October 2012 13:27, m...@freebsd.org wrote: The original behavior can be recovered by using inline assembly to fetch the value from a register into a local C variable; this would

Re: svn commit: r241373 - head/lib/libc/stdlib

2012-10-11 Thread Andrey Chernov
On 11.10.2012 19:23, Peter Wemm wrote: On Thu, Oct 11, 2012 at 6:14 AM, Andrey Chernov a...@freebsd.org wrote: On 11.10.2012 15:44, Pawel Jakub Dawidek wrote: On Tue, Oct 09, 2012 at 01:51:05PM -0400, Eitan Adler wrote: On 9 October 2012 13:27, m...@freebsd.org wrote: The original behavior

Re: svn commit: r238118 - head/lib/libc/gen

2012-07-04 Thread Andrey Chernov
On Wed, Jul 04, 2012 at 11:02:20PM +0300, Konstantin Belousov wrote: On Wed, Jul 04, 2012 at 07:51:25PM +, Pawel Jakub Dawidek wrote: Author: pjd Date: Wed Jul 4 19:51:25 2012 New Revision: 238118 URL: http://svn.freebsd.org/changeset/base/238118 Log: Prefer sysctl to

Re: svn commit: r238118 - head/lib/libc/gen

2012-07-04 Thread Andrey Chernov
On Wed, Jul 04, 2012 at 01:49:01PM -0700, Doug Barton wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 07/04/2012 13:32, Andrey Chernov wrote: 1) /dev/urandom may not exist in jails/sandboxes That would be a pretty serious configuration error. It may be true, but old POLA

Re: svn commit: r238118 - head/lib/libc/gen

2012-07-05 Thread Andrey Chernov
On Thu, Jul 05, 2012 at 11:39:02PM +0200, Pawel Jakub Dawidek wrote: sysctls are not all Giant locked. KERN_ARND is marked MPSAFE, so it does not use Giant: It doesn't really matter. Our in-kernel random generator has its own giant lock, so is basically single threaded. Compare

Re: svn commit: r238741 - head/lib/libelf

2012-07-26 Thread Andrey Chernov
On Wed, Jul 25, 2012 at 04:26:29PM -0700, Garrett Cooper wrote: A bunch of the sys/boot directories probably need this too.. Two of them (ficl and zfs) just fixed in r238795. If I miss some others, point me to. -- http://ache.vniz.net/ ___

Re: svn commit: r239100 - head/lib/libpam/modules/pam_unix

2012-08-06 Thread Andrey Chernov
On Mon, Aug 06, 2012 at 09:01:05PM +0200, Dimitry Andric wrote: On 2012-08-06 20:44, Dimitry Andric wrote: Author: dim Date: Mon Aug 6 18:44:59 2012 New Revision: 239100 URL: http://svn.freebsd.org/changeset/base/239100 Log: Fix an instance in pam_krb5(8), where the variable

Re: svn commit: r239356 - head/sbin/dhclient

2012-08-17 Thread Andrey Chernov
On Fri, Aug 17, 2012 at 03:53:43PM +, John Baldwin wrote: Author: jhb Date: Fri Aug 17 15:53:43 2012 New Revision: 239356 URL: http://svn.freebsd.org/changeset/base/239356 Log: Fix dhclient to properly exit and teardown the configured lease when link is lost. devd will start a

Re: svn commit: r239356 - head/sbin/dhclient

2012-08-18 Thread Andrey Chernov
On Fri, Aug 17, 2012 at 03:07:07PM -0400, John Baldwin wrote: On Friday, August 17, 2012 2:25:12 pm Andrey Chernov wrote: On Fri, Aug 17, 2012 at 03:53:43PM +, John Baldwin wrote: Author: jhb Date: Fri Aug 17 15:53:43 2012 New Revision: 239356 URL: http://svn.freebsd.org

Re: svn commit: r239356 - head/sbin/dhclient

2012-08-20 Thread Andrey Chernov
On Mon, Aug 20, 2012 at 02:09:55PM -0400, John Baldwin wrote: RFC 2131 (if you mean it) describes DHCP process itself, it does not define contents of 'supersede' or other override options for dhclient. The supersede handling bits are all based on what the protocol can actually send, which

Re: svn commit: r239356 - head/sbin/dhclient

2012-08-20 Thread Andrey Chernov
On Tue, Aug 21, 2012 at 11:57:56AM +0900, Hajimu UMEMOTO wrote: FreeBSD 9 and above already have a feature to handle multiple source of DNS address,; resolvconf(8). Our dhclient(8) and rtsol(8) uses it to write /etc/resolv.conf. Thanks pointing to resolvconf(8) and rtsol(8), I'll try to look

Re: svn commit: r239356 - head/sbin/dhclient

2012-08-21 Thread Andrey Chernov
On Tue, Aug 21, 2012 at 03:16:26PM +0900, Hajimu UMEMOTO wrote: ache And I want to override IPv6 DNS address for the router's IPv6 tunnel ache with simple link-local IPv6 address of my router, i.e. fe80:... I think your network admin setup to advertise the address. Why do you want to use

Re: svn commit: r239356 - head/sbin/dhclient

2012-08-21 Thread Andrey Chernov
On Tue, Aug 21, 2012 at 03:58:12PM +0900, Hajimu UMEMOTO wrote: ache I am network admin, but what router advertise is out my easy control ache (fixing configs in the Linux router's FS or even rebuilding router ache components is needed, I don't want to touch this hardware). You may want to

Re: svn commit: r239356 - head/sbin/dhclient

2012-08-21 Thread Andrey Chernov
On Tue, Aug 21, 2012 at 03:58:12PM +0900, Hajimu UMEMOTO wrote: Okay, thanks. I solve this riddle, thanks to your helpful tips. Relevant part of my setup are at the end of this messae for anybody who may have the same problem. BTW, I notice that link-local router address behavior is strange

Re: svn commit: r239356 - head/sbin/dhclient

2012-08-22 Thread Andrey Chernov
On Thu, Aug 23, 2012 at 12:27:46AM +0900, Hajimu UMEMOTO wrote: A link-local address has a scope; an interface here. You cannot omit it on FreeBSD by default. To be able to omit it, specify something like ipv6_default_interface=em0 in your /etc/rc.conf. Please enlighten me a bit. RFC 4007

Re: svn commit: r245057 - head/usr.bin/grep

2013-01-05 Thread Andrey Chernov
Thanks. I think the fix below can be improved further, because strdup(3) is unneeded here and can be omitted. We don't have either constant argument nor want to preserve it. On 05.01.2013 18:52, Gabor Kovesdan wrote: case 'e': - add_pattern(optarg,

Re: svn commit: r188098 - head/lib/libc/string

2009-02-07 Thread Andrey Chernov
On Tue, Feb 03, 2009 at 08:25:36PM +, Warner Losh wrote: == --- head/lib/libc/string/memchr.c Tue Feb 3 20:01:51 2009 (r188097) +++ head/lib/libc/string/memchr.c Tue Feb 3 20:25:36 2009

Re: svn commit: r189646 - head/sys/dev/usb

2009-03-10 Thread Andrey Chernov
On Tue, Mar 10, 2009 at 07:35:41PM +, Andrew Thompson wrote: Author: thompsa Date: Tue Mar 10 19:35:41 2009 New Revision: 189646 URL: http://svn.freebsd.org/changeset/base/189646 Log: Make sure HID has a default usage, this fixes recent mouse problems. My mouse still not fixed by

Re: svn commit: r189617 - in head/sys: dev/syscons dev/syscons/teken pc98/cbus

2009-03-10 Thread Andrey Chernov
On Tue, Mar 10, 2009 at 11:28:54AM +, Ed Schouten wrote: Author: ed Date: Tue Mar 10 11:28:54 2009 New Revision: 189617 URL: http://svn.freebsd.org/changeset/base/189617 Log: Make a 1:1 mapping between syscons stats and terminal emulators. Well, reboot messages are now in the proper

Re: svn commit: r189617 - in head/sys: dev/syscons dev/syscons/teken pc98/cbus

2009-03-10 Thread Andrey Chernov
On Wed, Mar 11, 2009 at 04:27:05AM +0300, Andrey Chernov wrote: On Tue, Mar 10, 2009 at 11:28:54AM +, Ed Schouten wrote: Author: ed Date: Tue Mar 10 11:28:54 2009 New Revision: 189617 URL: http://svn.freebsd.org/changeset/base/189617 Log: Make a 1:1 mapping between syscons

Re: svn commit: r189617 - in head/sys: dev/syscons dev/syscons/teken pc98/cbus

2009-03-11 Thread Andrey Chernov
On Wed, Mar 11, 2009 at 02:54:03PM +0100, Ed Schouten wrote: So the screen isn't correctly blanked when switching modes? Messages shouldn't overlap anymore, because we use the same terminal emulator to print both user and kernel messages now. It seems that rc don't use NL with some output

  1   2   3   4   >