svn commit: r368754 - head/tools/tools/locale

2020-12-18 Thread Yuri Pankov
Author: yuripv
Date: Fri Dec 18 08:43:06 2020
New Revision: 368754
URL: https://svnweb.freebsd.org/changeset/base/368754

Log:
  tools/tools/locale: fix static-colldef

Modified:
  head/tools/tools/locale/Makefile

Modified: head/tools/tools/locale/Makefile
==
--- head/tools/tools/locale/MakefileFri Dec 18 08:40:33 2020
(r368753)
+++ head/tools/tools/locale/MakefileFri Dec 18 08:43:06 2020
(r368754)
@@ -126,9 +126,8 @@ build-colldef:  static-colldef
 
 static-colldef:
 .for area enc in ${COLLATION_SPECIAL}
-colldef.draft/${area}.${enc}.src: posix/${area}.${enc}.src
awk -f ${TOOLSDIR}/extract-colldef.awk \
-   ${.ALLSRC} > ${.TARGET} || (rm -f ${.TARGET} && false)
+   posix/${area}.${enc}.src > colldef.draft/${area}.${enc}.src
 .endfor
 
 BASE_LOCALES_OF_INTEREST?= \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r368750 - head/tools/tools/locale

2020-12-17 Thread Yuri Pankov
Author: yuripv
Date: Fri Dec 18 04:01:05 2020
New Revision: 368750
URL: https://svnweb.freebsd.org/changeset/base/368750

Log:
  tools/tools/locale: install generated files in current src checkout

Modified:
  head/tools/tools/locale/Makefile

Modified: head/tools/tools/locale/Makefile
==
--- head/tools/tools/locale/MakefileFri Dec 18 03:46:50 2020
(r368749)
+++ head/tools/tools/locale/MakefileFri Dec 18 04:01:05 2020
(r368750)
@@ -11,7 +11,7 @@
 .error Do make obj first.
 .endif
 
-LOCALESRCDIR?= ${DESTDIR}/usr/src/share
+LOCALESRCDIR?= ${SRCTOP}/share
 TMPDIR?=   /tmp
 
 BASEDIR=   ${.CURDIR}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r368711 - head/lib/libc/locale

2020-12-16 Thread Yuri Pankov
Author: yuripv
Date: Thu Dec 17 02:33:52 2020
New Revision: 368711
URL: https://svnweb.freebsd.org/changeset/base/368711

Log:
  nl_langinfo(3): document recognized item names
  
  While here, remove .Tn macro usage (prompted by mandoc lint).
  
  PR:   251468
  Reviewed by:  bapt
  Differential Revision:https://reviews.freebsd.org/D27606

Modified:
  head/lib/libc/locale/nl_langinfo.3

Modified: head/lib/libc/locale/nl_langinfo.3
==
--- head/lib/libc/locale/nl_langinfo.3  Thu Dec 17 00:20:57 2020
(r368710)
+++ head/lib/libc/locale/nl_langinfo.3  Thu Dec 17 02:33:52 2020
(r368711)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 30, 2012
+.Dd December 14, 2020
 .Dt NL_LANGINFO 3
 .Os
 .Sh NAME
@@ -46,10 +46,6 @@ the particular language or cultural area defined in th
 locale, or in the case of
 .Fn nl_langinfo_l ,
 the locale passed as the second argument.
-The manifest constant names and values of
-.Fa item
-are defined in
-.In langinfo.h .
 .Pp
 Calls to
 .Fn setlocale
@@ -59,12 +55,102 @@ or to the
 category
 .Dv LC_ALL ,
 may overwrite the buffer pointed to by the return value.
+.Pp
+The manifest constant names and values of
+.Fa item
+are defined in
+.In langinfo.h .
+.Pp
+The following standard constants are recognized:
+.Bl -column "Constant" "Category"
+.It Sy Constant Ta Sy Category Ta Sy Description
+.It Dv CODESET Ta Dv LC_CTYPE Ta codeset name
+.It Dv D_T_FMT Ta Dv LC_TIME Ta string for formatting date and time
+.It Dv D_FMT Ta Dv LC_TIME Ta date format string
+.It Dv T_FMT Ta Dv LC_TIME Ta time format string
+.It Dv T_FMT_AMPM Ta Dv LC_TIME Ta a.m. or p.m. time format string
+.It Dv AM_STR Ta Dv LC_TIME Ta ante-meridiem affix
+.It Dv PM_STR Ta Dv LC_TIME Ta post-meridiem affix
+.It Dv DAY_1 Ta Dv LC_TIME Ta name of the first day of the week
+.It Dv DAY_2 Ta Dv LC_TIME Ta name of the second day of the week
+.It Dv DAY_3 Ta Dv LC_TIME Ta name of the third day of the week
+.It Dv DAY_4 Ta Dv LC_TIME Ta name of the fourth day of the week
+.It Dv DAY_5 Ta Dv LC_TIME Ta name of the fifth day of the week
+.It Dv DAY_6 Ta Dv LC_TIME Ta name of the sixth day of the week
+.It Dv DAY_7 Ta Dv LC_TIME Ta name of the seventh day of the week
+.It Dv ABDAY_1 Ta Dv LC_TIME Ta abbreviated name of the first day of the week
+.It Dv ABDAY_2 Ta Dv LC_TIME Ta abbreviated name of the second day of the week
+.It Dv ABDAY_3 Ta Dv LC_TIME Ta abbreviated name of the third day of the week
+.It Dv ABDAY_4 Ta Dv LC_TIME Ta abbreviated name of the fourth day of the week
+.It Dv ABDAY_5 Ta Dv LC_TIME Ta abbreviated name of the fifth day of the week
+.It Dv ABDAY_6 Ta Dv LC_TIME Ta abbreviated name of the sixth day of the week
+.It Dv ABDAY_7 Ta Dv LC_TIME Ta abbreviated name of the seventh day of the week
+.It Dv MON_1 Ta Dv LC_TIME Ta name of the first month of the year
+.It Dv MON_2 Ta Dv LC_TIME Ta name of the second month
+.It Dv MON_3 Ta Dv LC_TIME Ta name of the third month
+.It Dv MON_4 Ta Dv LC_TIME Ta name of the fourth month
+.It Dv MON_5 Ta Dv LC_TIME Ta name of the fifth month
+.It Dv MON_6 Ta Dv LC_TIME Ta name of the sixth month
+.It Dv MON_7 Ta Dv LC_TIME Ta name of the seventh month
+.It Dv MON_8 Ta Dv LC_TIME Ta name of the eighth month
+.It Dv MON_9 Ta Dv LC_TIME Ta name of the ninth month
+.It Dv MON_10 Ta Dv LC_TIME Ta name of the tenth month
+.It Dv MON_11 Ta Dv LC_TIME Ta name of the eleventh month
+.It Dv MON_12 Ta Dv LC_TIME Ta name of the twelfth month
+.It Dv ABMON_1 Ta Dv LC_TIME Ta abbreviated name of the first month
+.It Dv ABMON_2 Ta Dv LC_TIME Ta abbreviated name of the second month
+.It Dv ABMON_3 Ta Dv LC_TIME Ta abbreviated name of the third month
+.It Dv ABMON_4 Ta Dv LC_TIME Ta abbreviated name of the fourth month
+.It Dv ABMON_5 Ta Dv LC_TIME Ta abbreviated name of the fifth month
+.It Dv ABMON_6 Ta Dv LC_TIME Ta abbreviated name of the sixth month
+.It Dv ABMON_7 Ta Dv LC_TIME Ta abbreviated name of the seventh month
+.It Dv ABMON_8 Ta Dv LC_TIME Ta abbreviated name of the eighth month
+.It Dv ABMON_9 Ta Dv LC_TIME Ta abbreviated name of the ninth month
+.It Dv ABMON_10 Ta Dv LC_TIME Ta abbreviated name of the tenth month
+.It Dv ABMON_11 Ta Dv LC_TIME Ta abbreviated name of the eleventh month
+.It Dv ABMON_12 Ta Dv LC_TIME Ta abbreviated name of the twelfth month
+.It Dv ERA Ta Dv LC_TIME Ta era description segments
+.It Dv ERA_D_FMT Ta Dv LC_TIME Ta era date format string
+.It Dv ERA_D_T_FMT Ta Dv LC_TIME Ta era date and time format string
+.It Dv ERA_T_FMT Ta Dv LC_TIME Ta era time format string
+.It Dv ALT_DIGITS Ta Dv LC_TIME Ta alternative symbols for digits
+.It Dv RADIXCHAR Ta Dv LC_NUMERIC Ta radix character
+.It Dv THOUSEP Ta Dv LC_NUMERIC Ta separator for thousands
+.It Dv YESEXPR Ta Dv LC_MESSAGES Ta affirmative response extended regular
+expression
+.It Dv NOEXPR Ta Dv LC_MESSAGES Ta negative response extended regular 
expression
+.It Dv CRNCYSTR Ta Dv LC_MONETARY 

Re: svn commit: r368606 - head/usr.bin/calendar

2020-12-13 Thread Yuri Pankov

Stefan Eßer wrote:

Author: se
Date: Sun Dec 13 09:38:50 2020
New Revision: 368606
URL: https://svnweb.freebsd.org/changeset/base/368606

Log:
   Fix WITHOUT_ICONV build
   
   There was an unprotected use of nl_langinfo() to determine the order of

   day vs. month in the generated output.


That's strange, nl_langinfo() is standard and its visibility should not 
(and does not?) depend on WITH/WITHOUT_ICONV.  May be just move 
langinfo.h include outside of "#ifdef WITH_ICONV" block?



   When building without ICONV support, the order will be: month, day.

Modified:
   head/usr.bin/calendar/events.c

Modified: head/usr.bin/calendar/events.c
==
--- head/usr.bin/calendar/events.c  Sun Dec 13 05:34:14 2020
(r368605)
+++ head/usr.bin/calendar/events.c  Sun Dec 13 09:38:50 2020
(r368606)
@@ -202,9 +202,13 @@ event_print_all(FILE *fp)
struct event *e;
struct tm tm;
char dbuf[80];
+#ifdef WITH_ICONV
static int d_first;
  
  	d_first = (*nl_langinfo(D_MD_ORDER) == 'd');

+#else
+#defined_first 0
+#endif
  
  	while (walkthrough_dates() != 0) {

if (e) {



___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r368598 - head/tools/tools/locale

2020-12-12 Thread Yuri Pankov
Author: yuripv
Date: Sat Dec 12 23:41:47 2020
New Revision: 368598
URL: https://svnweb.freebsd.org/changeset/base/368598

Log:
  locale: fix mode for installed files to be 644, not 755
  
  While here, drop '-c' flag to install as it's default and provided for
  backward compatibility only.

Modified:
  head/tools/tools/locale/Makefile

Modified: head/tools/tools/locale/Makefile
==
--- head/tools/tools/locale/MakefileSat Dec 12 23:01:11 2020
(r368597)
+++ head/tools/tools/locale/MakefileSat Dec 12 23:41:47 2020
(r368598)
@@ -96,7 +96,7 @@ install-${t}:
cd ${LOCALESRCDIR}/${t} && \
rm -f Makefile *.src && \
cd ${.OBJDIR} && \
-   install -c ${t}/* ${LOCALESRCDIR}/${t}
+   install -m 644 ${t}/* ${LOCALESRCDIR}/${t}
 .  endif
 .endfor
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r368580 - head/usr.bin/xargs

2020-12-12 Thread Yuri Pankov
Author: yuripv
Date: Sat Dec 12 15:38:32 2020
New Revision: 368580
URL: https://svnweb.freebsd.org/changeset/base/368580

Log:
  xargs: compile yesexpr as ERE
  
  yesexpr is an extended regular expression for quite some time now,
  use appropriate flag when compiling it.
  
  PR:   238762
  Reviewed by:  kevans
  Differential Revision:https://reviews.freebsd.org/D27509

Modified:
  head/usr.bin/xargs/xargs.c

Modified: head/usr.bin/xargs/xargs.c
==
--- head/usr.bin/xargs/xargs.c  Sat Dec 12 14:53:34 2020(r368579)
+++ head/usr.bin/xargs/xargs.c  Sat Dec 12 15:38:32 2020(r368580)
@@ -782,7 +782,7 @@ prompt(void)
(void)fprintf(stderr, "?...");
(void)fflush(stderr);
if ((response = fgetln(ttyfp, )) == NULL ||
-   regcomp(, nl_langinfo(YESEXPR), REG_BASIC) != 0) {
+   regcomp(, nl_langinfo(YESEXPR), REG_EXTENDED) != 0) {
(void)fclose(ttyfp);
return (0);
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r368390 - in head/tools/tools/locale: . etc/final-maps tools

2020-12-06 Thread Yuri Pankov
Author: yuripv
Date: Sun Dec  6 16:44:41 2020
New Revision: 368390
URL: https://svnweb.freebsd.org/changeset/base/368390

Log:
  update wcwidth data from utf8proc
  
  Character width data being out of date is a constant source
  of weird rendering issues and wasted time trying to diagnose
  those, e.g. as reported by Jeremy Chadwick:
  
  https://gitlab.com/muttmua/mutt/-/issues/67
  
  Sadly, there is no real ("standard") wcwidth data source, so
  this tries to rectify the problem using the utf8proc one (through
  its C API) which would hopefully benefeat both FreeBSD and
  utf8proc through bug reports (if any).
  
  Reviewed by:  bapt
  Differential Revision:https://reviews.freebsd.org/D27259

Added:
  head/tools/tools/locale/tools/getwidths.c   (contents, props changed)
  head/tools/tools/locale/tools/mkwidths.pl   (contents, props changed)
Modified:
  head/tools/tools/locale/Makefile
  head/tools/tools/locale/README
  head/tools/tools/locale/etc/final-maps/widths.txt   (contents, props changed)

Modified: head/tools/tools/locale/Makefile
==
--- head/tools/tools/locale/MakefileSun Dec  6 16:22:26 2020
(r368389)
+++ head/tools/tools/locale/MakefileSun Dec  6 16:44:41 2020
(r368390)
@@ -225,7 +225,7 @@ posix/${enc}.cm:
 .for area in ${BASE_LOCALES_OF_INTEREST}
 posixsrc: build-tools posix/${area}.UTF-8.src
 .ORDER: build-tools posix/${area}.UTF-8.src
-posix/${area}.UTF-8.src: 
+posix/${area}.UTF-8.src:
mkdir -p posix && \
${JAVA_CLDR} org.unicode.cldr.posix.GeneratePOSIX \
-d posix -m ${area} -c UTF-8
@@ -238,5 +238,21 @@ posix/${area}.${encoding}.src:
${JAVA_CLDR} org.unicode.cldr.posix.GeneratePOSIX \
-d posix -m ${area} -c ${encoding}
 .endfor
+
+# generate widths.txt using the data from libut8proc
+GETWIDTHS=${TOOLSDIR}/getwidths
+MKWIDTHS=${TOOLSDIR}/mkwidths.pl
+WIDTHS=${ETCDIR}/final-maps/widths.txt
+
+U8CFLAGS!=pkgconf --cflags libutf8proc
+U8LIBS!=pkgconf --libs libutf8proc
+CFLAGS+=${U8CFLAGS}
+LDFLAGS+=${U8LIBS}
+
+CLEANFILES+=${TOOLSDIR}/getwidths
+
+widths:${WIDTHS}
+${WIDTHS}: posixcm ${GETWIDTHS}
+   ${GETWIDTHS} | ${MKWIDTHS} ${.OBJDIR}/posix/UTF-8.cm ${.TARGET}
 
 .include 

Modified: head/tools/tools/locale/README
==
--- head/tools/tools/locale/README  Sun Dec  6 16:22:26 2020
(r368389)
+++ head/tools/tools/locale/README  Sun Dec  6 16:44:41 2020
(r368390)
@@ -55,4 +55,8 @@ Targets:
 
make install
Install the build results into $LOCALESRCDIR.
+
+   make widths
+   Generate widths.txt.  Requires pkgconf and utf8proc
+   packages to be installed.
 [EOF]

Modified: head/tools/tools/locale/etc/final-maps/widths.txt
==
--- head/tools/tools/locale/etc/final-maps/widths.txt   Sun Dec  6 16:22:26 
2020(r368389)
+++ head/tools/tools/locale/etc/final-maps/widths.txt   Sun Dec  6 16:44:41 
2020(r368390)
@@ -1,26 +1,73 @@
-#
-# Width Table. Credit for the input into this table, which is derived from
-# the Unicode standards, is due to Markus Kuhn's implementation of wcwidth
-# which can be found at http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
-#
-# Some key differences: The numbers here are translated to the values found
-# in the UTF-8 character map, and where symbolic names are missing for
-# values from that table, we have omitted the values here.  This means that
-# characters which lack a symbolic name but are not 1 screen column wide
-# are going to be mis-handled. This emphasizes the importance of having
-# symbolic names for all characters that are to be handled properly.
-#
-# Also, to support use with different encodings, we avoid the use of ranges
-# as some encodings may not have the same contiguous ranges as stock Unicode.
-#
-# This table must be processed *after* the charmap, as the symbolic names
-# need to be defined there.
-#
-# Everything after this comment was generated automatically using the
-# the mkwidths.py python script.  To make corrections, fix the widths-0.txt
-# or widths-2.txt files, and re-run mkwidths.py.  But preserve this header.
-#
+# Warning: Do not edit. This file is automatically generated from the
+# tools in /usr/src/tools/tools/locale. The data is obtained from the
+# utf8proc 2.5.0.
+# -
 WIDTH
+ 0
+ 0
+0
+  0
+  0
+  0
+  0
+0
+0
+  0
+  0
+ 0
+0
+  0
+0
+ 0
+ 0
+   0
+   0
+ 0
+  0
+ 0
+ 0
+0
+   0
+0
+   0
+   0
+   0
+  0
+0
+0
+   0
+ 0
+ 0
+ 0
+0
+ 0
+0
+   0
+ 0
+ 0
+  0
+  0
+ 0
+0
+0
+ 0
+   0
+0
+  0
+ 

svn commit: r368157 - head/share/man/man7

2020-11-29 Thread Yuri Pankov
Author: yuripv
Date: Sun Nov 29 16:29:40 2020
New Revision: 368157
URL: https://svnweb.freebsd.org/changeset/base/368157

Log:
  security(7): fix copy/paste error and correct aslr oids
  
  Submitted by: Mina Galić 
  Differential Revision:https://reviews.freebsd.org/D27408

Modified:
  head/share/man/man7/security.7

Modified: head/share/man/man7/security.7
==
--- head/share/man/man7/security.7  Sun Nov 29 16:22:33 2020
(r368156)
+++ head/share/man/man7/security.7  Sun Nov 29 16:29:40 2020
(r368157)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 11, 2020
+.Dd November 28, 2020
 .Dt SECURITY 7
 .Os
 .Sh NAME
@@ -1061,7 +1061,7 @@ position-independent (PIE) 32bit binaries.
 .It Dv kern.elf32.aslr.honor_sbrk
 Makes ASLR less aggressive and more compatible with old binaries
 relying on the sbrk area.
-.It Dv kern.elf32.aslr.aslr_stack_gap
+.It Dv kern.elf32.aslr.stack_gap
 If ASLR is enabled for a binary, a non-zero value creates a randomized
 stack gap between strings and the end of the aux vector.
 The value is the maximum percentage of main stack to waste on the gap.
@@ -1072,7 +1072,7 @@ Cannot be greater than 50, i.e., at most half of the s
 64bit PIE binaries ASLR control.
 .It Dv kern.elf64.aslr.honor_sbrk
 64bit binaries ASLR sbrk compatibility control.
-.It Dv kern.elf32.aslr.aslr_stack_gap
+.It Dv kern.elf64.aslr.stack_gap
 Controls stack gap for 64bit binaries.
 .It Dv kern.elf32.nxstack
 Enables non-executable stack for 32bit processes.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r368140 - head/sys/x86/cpufreq

2020-11-28 Thread Yuri Pankov
Author: yuripv
Date: Sun Nov 29 01:43:04 2020
New Revision: 368140
URL: https://svnweb.freebsd.org/changeset/base/368140

Log:
  hwpstate_intel: don't unconditionally print the error message
  
  Actually check the wrmsr_safe() return value when setting autonomous
  HWP for package.
  
  PR:   245582
  Differential Revision:https://reviews.freebsd.org/D24744

Modified:
  head/sys/x86/cpufreq/hwpstate_intel.c

Modified: head/sys/x86/cpufreq/hwpstate_intel.c
==
--- head/sys/x86/cpufreq/hwpstate_intel.c   Sun Nov 29 01:32:53 2020
(r368139)
+++ head/sys/x86/cpufreq/hwpstate_intel.c   Sun Nov 29 01:43:04 2020
(r368140)
@@ -461,8 +461,10 @@ set_autonomous_hwp(struct hwp_softc *sc)
 * not exist." (Intel SDM §14.4.4)
 */
ret = wrmsr_safe(MSR_IA32_HWP_REQUEST_PKG, sc->req);
-   device_printf(dev,
-   "Failed to set autonomous HWP for package\n");
+   if (ret) {
+   device_printf(dev,
+   "Failed to set autonomous HWP for package\n");
+   }
}
 
 out:
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r363543 - in head/usr.bin/sed: . tests

2020-07-26 Thread Yuri Pankov
Author: yuripv
Date: Sun Jul 26 09:15:05 2020
New Revision: 363543
URL: https://svnweb.freebsd.org/changeset/base/363543

Log:
  sed: treat '[' as ordinary character in 'y' command
  
  'y' does not handle bracket expressions, treat '[' as ordinary character
  and do not apply bracket expression checks (GNU sed agrees).
  
  PR:   247931
  Reviewed by:  pfg, kevans
  Tested by:antoine (exp-run), Quentin L'Hours 
  Differential Revision:https://reviews.freebsd.org/D25640

Modified:
  head/usr.bin/sed/compile.c
  head/usr.bin/sed/tests/sed2_test.sh

Modified: head/usr.bin/sed/compile.c
==
--- head/usr.bin/sed/compile.c  Sun Jul 26 02:51:00 2020(r363542)
+++ head/usr.bin/sed/compile.c  Sun Jul 26 09:15:05 2020(r363543)
@@ -437,11 +437,19 @@ compile_delimited(char *p, char *d, int is_tr)
linenum, fname);
while (*p) {
if (*p == '[' && *p != c) {
-   if ((d = compile_ccl(, d)) == NULL)
-   errx(1, "%lu: %s: unbalanced brackets ([])", 
linenum, fname);
-   continue;
+   if (!is_tr) {
+   if ((d = compile_ccl(, d)) == NULL) {
+   errx(1,
+   "%lu: %s: unbalanced brackets ([])",
+   linenum, fname);
+   }
+   continue;
+   }
} else if (*p == '\\' && p[1] == '[') {
-   *d++ = *p++;
+   if (is_tr)
+   p++;
+   else
+   *d++ = *p++;
} else if (*p == '\\' && p[1] == c) {
p++;
} else if (*p == '\\' &&

Modified: head/usr.bin/sed/tests/sed2_test.sh
==
--- head/usr.bin/sed/tests/sed2_test.sh Sun Jul 26 02:51:00 2020
(r363542)
+++ head/usr.bin/sed/tests/sed2_test.sh Sun Jul 26 09:15:05 2020
(r363543)
@@ -134,6 +134,22 @@ commands_on_stdin_body()
atf_check -o 'empty' sed -f - < insert_x
 }
 
+atf_test_case bracket_y
+bracket_y_head()
+{
+   atf_set "descr" "Verify '[' is ordinary character for 'y' command"
+}
+bracket_y_body()
+{
+   atf_check -e empty -o ignore echo | sed 'y/[/x/'
+   atf_check -e empty -o ignore echo | sed 'y/[]/xy/'
+   atf_check -e empty -o ignore echo | sed 'y/[a]/xyz/'
+   atf_check -e empty -o "inline:zyx" echo '][a' | sed 'y/[a]/xyz/'
+   atf_check -e empty -o "inline:bracket\n" echo 'bra[ke]' | sed 'y/[]/ct/'
+   atf_check -e empty -o "inline:bracket\n" \
+   echo 'bra[ke]' | sed 'y[\[][ct['
+}
+
 atf_init_test_cases()
 {
atf_add_test_case inplace_command_q
@@ -142,4 +158,5 @@ atf_init_test_cases()
atf_add_test_case escape_subst
atf_add_test_case commands_on_stdin
atf_add_test_case hex_subst
+   atf_add_test_case bracket_y
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r363207 - head/usr.bin/top

2020-07-14 Thread Yuri Pankov
Author: yuripv
Date: Tue Jul 14 22:43:40 2020
New Revision: 363207
URL: https://svnweb.freebsd.org/changeset/base/363207

Log:
  top: VIS_SAFE turned out to be unsafe
  
  Unset VIS_SAFE flag as it turned out to be actually unsafe
  for continuos top display as it's passing through sequences
  resulting cursor movement (backspace, tab, carriage-return),
  and explicitly set VIS_TAB for the same reason.
  
  Reported by:  Mark Millard , swills
  Tested by:Mark Millard , swills

Modified:
  head/usr.bin/top/machine.c

Modified: head/usr.bin/top/machine.c
==
--- head/usr.bin/top/machine.c  Tue Jul 14 22:25:06 2020(r363206)
+++ head/usr.bin/top/machine.c  Tue Jul 14 22:43:40 2020(r363207)
@@ -1016,7 +1016,7 @@ format_next_process(struct handle * xhandle, char *(*g
len = (argbuflen - (dst - argbuf) - 1) / 4;
strvisx(dst, src,
MIN(strlen(src), len),
-   VIS_NL | VIS_CSTYLE | VIS_OCTAL | VIS_SAFE);
+   VIS_NL | VIS_TAB | VIS_CSTYLE | VIS_OCTAL);
while (*dst != '\0')
dst++;
if ((argbuflen - (dst - argbuf) - 1) / 4 > 0)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r363176 - head/usr.sbin

2020-07-14 Thread Yuri Pankov

Adrian Chadd wrote:

Author: adrian
Date: Tue Jul 14 05:33:23 2020
New Revision: 363176
URL: https://svnweb.freebsd.org/changeset/base/363176

Log:
   [pmc] whoops, remove spurious #'s
   
   pointed out by gonzo@, thanks!


Modified:
   head/usr.sbin/Makefile


Now after r363174 and r363176:

$ svn diff -r 363173:363176 usr.sbin/Makefile
(empty)

Did you mean to do something else here?
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r363138 - head/usr.bin/sed/tests

2020-07-12 Thread Yuri Pankov
Author: yuripv
Date: Mon Jul 13 01:32:37 2020
New Revision: 363138
URL: https://svnweb.freebsd.org/changeset/base/363138

Log:
  sed/multi_test: print comment for current test, not next one
  
  This is visible when e.g. 8.20 is failing:
  
  not ok 96 8.20 # \ in y command
  
  8.20's comment should be '[ as an s delimiter and its escapes'.

Modified:
  head/usr.bin/sed/tests/multi_test.sh

Modified: head/usr.bin/sed/tests/multi_test.sh
==
--- head/usr.bin/sed/tests/multi_test.shMon Jul 13 01:28:45 2020
(r363137)
+++ head/usr.bin/sed/tests/multi_test.shMon Jul 13 01:32:37 2020
(r363138)
@@ -92,9 +92,9 @@ result()
cp current.out $REGRESS/${TESTNAME}
fi
if diff -c $REGRESS/${TESTNAME} current.out ; then
-   echo "ok $MARK $TESTNAME # $TODO$COMMENT"
+   echo "ok $MARK $TESTNAME # $TODO$OCOMMENT"
else
-   echo "not ok $MARK $TESTNAME # $TODO$COMMENT"
+   echo "not ok $MARK $TESTNAME # $TODO$OCOMMENT"
fi 1>&4 2>&5
 }
 
@@ -102,6 +102,7 @@ result()
 mark()
 {
[ $MARK -gt 0 ] && result
+   OCOMMENT=$COMMENT
MARK=`expr $MARK + 1`
TESTNAME=$1
exec 1>&4 2>&5
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r363031 - in head: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake (make now broken)

2020-07-08 Thread Yuri Pankov

Mark Millard wrote:



On 2020-Jul-8, at 20:35, Yuri Pankov  wrote:


Mark Millard wrote:

This seems to have broken doing buildworld buildkernel and
other things using make:
make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String 
comparison operator should be either == or !=
make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String 
comparison operator should be either == or !=
. . .
make[3]: "/usr/src/share/mk/bsd.sys.mk" line 100: warning: String comparison 
operator should be either == or !=
. . .
make[3]: "/usr/src/share/mk/bsd.sys.mk" line 81: warning: String comparison 
operator should be either == or !=
. . .
Using -d c shows the likes of:
. . .
lhs = "clang", rhs = "clang", op = ==
lhs = "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs = "gcc", op 
= ==
make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String 
comparison operator should be either == or !=
lhs = "clang", rhs = "clang", op = ==
lhs = "LD", rhs = "LD", op = ==
. . .
left = 6.00, right = 2.00, op = <=
left = 6.00, right = 1.00, op = <=
lhs = "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs = "clang", 
op = ==
make[3]: "/usr/src/share/mk/bsd.sys.mk" line 100: warning: String comparison 
operator should be either == or !=
lhs = "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs = "gcc", op 
= ==
lhs = "clang", rhs = "gcc", op = ==
. . .
left = 0.00, right = 6.00, op = <=
left = 0.00, right = 3.00, op = <=
lhs = "clang", rhs = "gcc", op = ==
make[3]: "/usr/src/share/mk/bsd.sys.mk" line 81: warning: String comparison 
operator should be either == or !=
lhs = "clang", rhs = "clang", op = ==
left = 11.00, right = 7.00, op = >=
lhs = "amd64", rhs = "arm", op = ==
(Now I just need to figure out how to get back to a working context.)


For me, buildworld/buildkernel produced only warnings,


But, looking at the code in bmake, the expression is also
evaluated differently/incorrectly when it is classified as
having the problem of having a incorrect operator. In other
words: the behavior in make changes via misevaluated
expressions.



though the one in ports is real issue:

$ make config
make: "/usr/ports/Mk/bsd.port.mk" line 2096: warning: String comparison 
operator should be either == or !=
make: "/usr/ports/Mk/bsd.port.mk" line 2096: Malformed conditional 
(defined(MAKE_JOBS_NUMBER_LIMIT) && ( ${MAKE_JOBS_NUMBER_LIMIT} < ${_MAKE_JOBS_NUMBER} ))
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/ports/devel/subversion


Not the only "real issue", I'm afraid.


Yeah, sorry, looks like I'm late to the party, and it was already 
discussed and reverted.

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r363031 - in head: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake (make now broken)

2020-07-08 Thread Yuri Pankov

Mark Millard wrote:

This seems to have broken doing buildworld buildkernel and
other things using make:

make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String 
comparison operator should be either == or !=
make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String 
comparison operator should be either == or !=
. . .
make[3]: "/usr/src/share/mk/bsd.sys.mk" line 100: warning: String comparison 
operator should be either == or !=
. . .
make[3]: "/usr/src/share/mk/bsd.sys.mk" line 81: warning: String comparison 
operator should be either == or !=
. . .

Using -d c shows the likes of:

. . .
lhs = "clang", rhs = "clang", op = ==
lhs = "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs = "gcc", op 
= ==
make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String 
comparison operator should be either == or !=
lhs = "clang", rhs = "clang", op = ==
lhs = "LD", rhs = "LD", op = ==
. . .
left = 6.00, right = 2.00, op = <=
left = 6.00, right = 1.00, op = <=
lhs = "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs = "clang", 
op = ==
make[3]: "/usr/src/share/mk/bsd.sys.mk" line 100: warning: String comparison 
operator should be either == or !=
lhs = "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs = "gcc", op 
= ==
lhs = "clang", rhs = "gcc", op = ==
. . .
left = 0.00, right = 6.00, op = <=
left = 0.00, right = 3.00, op = <=
lhs = "clang", rhs = "gcc", op = ==
make[3]: "/usr/src/share/mk/bsd.sys.mk" line 81: warning: String comparison 
operator should be either == or !=
lhs = "clang", rhs = "clang", op = ==
left = 11.00, right = 7.00, op = >=
lhs = "amd64", rhs = "arm", op = ==

(Now I just need to figure out how to get back to a working context.)


For me, buildworld/buildkernel produced only warnings, though the one in 
ports is real issue:


$ make config
make: "/usr/ports/Mk/bsd.port.mk" line 2096: warning: String comparison 
operator should be either == or !=
make: "/usr/ports/Mk/bsd.port.mk" line 2096: Malformed conditional 
(defined(MAKE_JOBS_NUMBER_LIMIT) && ( ${MAKE_JOBS_NUMBER_LIMIT} < 
${_MAKE_JOBS_NUMBER} ))

make: Fatal errors encountered -- cannot continue
make: stopped in /usr/ports/devel/subversion
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362515 - head/contrib/nvi/common

2020-06-22 Thread Yuri Pankov
Author: yuripv
Date: Mon Jun 22 22:59:03 2020
New Revision: 362515
URL: https://svnweb.freebsd.org/changeset/base/362515

Log:
  Revert r362148.
  
  Breaks UTF-8 input for new or having only 7bit characters present files.
  
  Reported by:  glebius

Modified:
  head/contrib/nvi/common/exf.c

Modified: head/contrib/nvi/common/exf.c
==
--- head/contrib/nvi/common/exf.c   Mon Jun 22 22:43:09 2020
(r362514)
+++ head/contrib/nvi/common/exf.c   Mon Jun 22 22:59:03 2020
(r362515)
@@ -1237,10 +1237,7 @@ file_encinit(SCR *sp)
}
 
/*
-* 1. Check for valid UTF-8.
-* 2. Check if fallback fileencoding is set and is NOT UTF-8.
-* 3. Check if user locale's encoding is NOT UTF-8.
-* 4. Use ISO8859-1 as last resort.
+* Detect UTF-8 and fallback to the locale/preset encoding.
 *
 * XXX
 * A manually set O_FILEENCODING indicates the "fallback
@@ -1249,13 +1246,9 @@ file_encinit(SCR *sp)
 */
if (looks_utf8(buf, blen) > 1)
o_set(sp, O_FILEENCODING, OS_STRDUP, "utf-8", 0);
-   else if (O_ISSET(sp, O_FILEENCODING) &&
-   strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8") != 0)
-   /* Use fileencoding as is */ ;
-   else if (strcasecmp(codeset(), "utf-8") != 0)
+   else if (!O_ISSET(sp, O_FILEENCODING) ||
+   !strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8"))
o_set(sp, O_FILEENCODING, OS_STRDUP, codeset(), 0);
-   else
-   o_set(sp, O_FILEENCODING, OS_STRDUP, "iso8859-1", 0);
 
conv_enc(sp, O_FILEENCODING, 0);
 #endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r362148 - head/contrib/nvi/common

2020-06-22 Thread Yuri Pankov

Zhihao Yuan wrote:
On Mon, Jun 22, 2020 at 5:24 PM Gleb Smirnoff > wrote:



My first attempt was this fix:

--- common/exf.c        (revision 362200)
+++ common/exf.c        (working copy)
@@ -1252,7 +1252,8 @@ file_encinit(SCR *sp)
         else if (O_ISSET(sp, O_FILEENCODING) &&
             strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8") != 0)
                 /* Use fileencoding as is */ ;
-       else if (strcasecmp(codeset(), "utf-8") != 0)
+       else if (strncasecmp(codeset() + strlen(codeset()) - 5,
"utf-8", 5) !=
+           0)
                 o_set(sp, O_FILEENCODING, OS_STRDUP, codeset(), 0);
         else
                 o_set(sp, O_FILEENCODING, OS_STRDUP, "iso8859-1", 0);

But it appeared to be not the case. To my surprise, codeset()
which is wrapper around nl_langinfo() in my case returns US-ASCII.


That sounds strange.

   1. Can you set LC_CTYPE as well and see
     if anything changes?
   2. Can you revert to the previous version
     and see what nl_langinfo gives?

There is another issue... I'm sorry.  I totally forgot what
looks_utf8 actually does.

Here is its behavior (encoding.c):

  Returns
  -1: invalid UTF-8
   0: uses odd control characters, so doesn't look like text
   1: 7-bit text
   2: definitely UTF-8 text (valid high-bit set bytes)

So if looks_utf8() > 1, it means the file itself is UTF-8
for sure.  If you opened a file with 7-bit text or with
control characters, :set fileencoding should set
the encoding intended to write.  But the HEAD
behaviors is that you can't input Unicode.

I'm reverting upstream.


Yes, I will revert for now.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r362148 - head/contrib/nvi/common

2020-06-22 Thread Yuri Pankov

Gleb Smirnoff wrote:

   Yuri, Zhihao,

this commit totally broke Russian input for me in nvi. After
exiting edit mode, nvi immediately converts all text to ???.

I don't have any special settings in my environment. All I have
is "russian" class for my user which yields in these environment
variables:

declare -x LANG="ru_RU.UTF-8"
declare -x MM_CHARSET="UTF-8"
declare -x XTERM_LOCALE="ru_RU.UTF-8"

I'm already digging into that problem, but may be you have
a clue immediately.


My bad, yes, I see the problem, looking into it.


On Sat, Jun 13, 2020 at 02:11:02PM +, Yuri Pankov wrote:
Y> Author: yuripv
Y> Date: Sat Jun 13 14:11:02 2020
Y> New Revision: 362148
Y> URL: https://svnweb.freebsd.org/changeset/base/362148
Y>
Y> Log:
Y>   nvi: fallback to ISO8859-1 as last resort
Y>
Y>   Current logic of using user's locale encoding that is UTF-8 doesn't make
Y>   much sense if we already failed the looks_utf8() check and skipped
Y>   encoding set using "fileencoding" as being UTF-8 as well; fallback to
Y>   ISO8859-1 in that case.
Y>
Y>   Reviewed by:Zhihao Yuan 
Y>   Differential Revision:  https://reviews.freebsd.org/D24919
Y>
Y> Modified:
Y>   head/contrib/nvi/common/exf.c
Y>
Y> Modified: head/contrib/nvi/common/exf.c
Y> 
==
Y> --- head/contrib/nvi/common/exf.c Sat Jun 13 09:16:07 2020(r362147)
Y> +++ head/contrib/nvi/common/exf.c Sat Jun 13 14:11:02 2020(r362148)
Y> @@ -1237,7 +1237,10 @@ file_encinit(SCR *sp)
Y>   }
Y>
Y>   /*
Y> -  * Detect UTF-8 and fallback to the locale/preset encoding.
Y> +  * 1. Check for valid UTF-8.
Y> +  * 2. Check if fallback fileencoding is set and is NOT UTF-8.
Y> +  * 3. Check if user locale's encoding is NOT UTF-8.
Y> +  * 4. Use ISO8859-1 as last resort.
Y>*
Y>* XXX
Y>* A manually set O_FILEENCODING indicates the "fallback
Y> @@ -1246,9 +1249,13 @@ file_encinit(SCR *sp)
Y>*/
Y>   if (looks_utf8(buf, blen) > 1)
Y>   o_set(sp, O_FILEENCODING, OS_STRDUP, "utf-8", 0);
Y> - else if (!O_ISSET(sp, O_FILEENCODING) ||
Y> - !strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8"))
Y> + else if (O_ISSET(sp, O_FILEENCODING) &&
Y> + strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8") != 0)
Y> + /* Use fileencoding as is */ ;
Y> + else if (strcasecmp(codeset(), "utf-8") != 0)
Y>   o_set(sp, O_FILEENCODING, OS_STRDUP, codeset(), 0);
Y> + else
Y> + o_set(sp, O_FILEENCODING, OS_STRDUP, "iso8859-1", 0);
Y>
Y>   conv_enc(sp, O_FILEENCODING, 0);
Y>  #endif

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r362452 - in head: contrib/xz/src/liblzma/check lib/liblzma share/mk

2020-06-22 Thread Yuri Pankov

Ruslan Garipov wrote:

On 6/21/2020 2:32 AM, Xin LI wrote:

Author: delphij
Date: Sat Jun 20 21:32:07 2020
New Revision: 362452
URL: https://svnweb.freebsd.org/changeset/base/362452

Log:
   liblzma: Make liblzma use libmd implementation of SHA256.

I'm trying to update from r362172 (GENERIC-NODEBUG) to r362468 (a custom
KERNCONF), and failing on buildworld:

[...]

I think kevans took care of it in r362478.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362464 - head/usr.bin/w

2020-06-21 Thread Yuri Pankov
Author: yuripv
Date: Sun Jun 21 11:42:49 2020
New Revision: 362464
URL: https://svnweb.freebsd.org/changeset/base/362464

Log:
  w: use locale-based string format specifiers
  
  Use locale-based string format specifiers when printing
  the process names/arguments.
  
  Reviewed by:  pstef
  Differential Revision:https://reviews.freebsd.org/D25174

Modified:
  head/usr.bin/w/w.c

Modified: head/usr.bin/w/w.c
==
--- head/usr.bin/w/w.c  Sun Jun 21 10:09:34 2020(r362463)
+++ head/usr.bin/w/w.c  Sun Jun 21 11:42:49 2020(r362464)
@@ -438,8 +438,8 @@ main(int argc, char *argv[])
if (ptr == NULL)
ptr = "-";
xo_open_instance("process-entry");
-   xo_emit("\t\t{:process-id/%-9d/%d} 
{:command/%s}\n",
-   dkp->ki_pid, ptr);
+   xo_emit("\t\t{:process-id/%-9d/%d} "
+   "{:command/%hs}\n", dkp->ki_pid, ptr);
xo_close_instance("process-entry");
}
xo_close_list("process-entry");
@@ -460,7 +460,7 @@ main(int argc, char *argv[])
t = ep->utmp.ut_tv.tv_sec;
longattime = pr_attime(, );
longidle = pr_idle(ep->idle);
-   xo_emit("{:command/%.*s/%@*@s}\n",
+   xo_emit("{:command/%.*hs/%@*@hs}\n",
argwidth - longidle - longattime,
ep->args);
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r362318 - head/usr.bin/tee

2020-06-18 Thread Yuri Pankov

Fernando Apesteguía wrote:

Author: fernape (ports committer)
Date: Thu Jun 18 10:48:37 2020
New Revision: 362318
URL: https://svnweb.freebsd.org/changeset/base/362318

Log:
   tee(1): Add EXAMPLES section
   
   Probably the simplest one ever.
   
   Approved by:	gbe@, 0mp@

   Differential Revision:   https://reviews.freebsd.org/D25206

Modified:
   head/usr.bin/tee/tee.1

Modified: head/usr.bin/tee/tee.1
==
--- head/usr.bin/tee/tee.1  Thu Jun 18 10:47:30 2020(r362317)
+++ head/usr.bin/tee/tee.1  Thu Jun 18 10:48:37 2020(r362318)
@@ -31,7 +31,7 @@
  .\" @(#)tee.18.1 (Berkeley) 6/6/93
  .\" $FreeBSD$
  .\"
-.Dd November 13, 2007
+.Dd June 18, 2020
  .Dt TEE 1
  .Os
  .Sh NAME
@@ -74,6 +74,12 @@ except in the event of the
  option.
  .Sh EXIT STATUS
  .Ex -std
+.Sh EXAMPLES
+Send echoed message both to stdout and to the greetings file:


Should this be like the following, at least to get the filename right?

Send echoed message both to stdout and to the file
.Pa greetings.txt :


+.Bd -literal -offset indent
+$ echo "Hello" | tee greetings.txt
+Hello
+.Ed
  .Sh STANDARDS
  The
  .Nm



___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r362191 - head/sbin/md5

2020-06-15 Thread Yuri Pankov

Mateusz Piotrowski wrote:

Hi,

On 6/15/20 2:33 PM, Rodney W. Grimes wrote:

[ Charset UTF-8 unsupported, converting... ]

Author: fernape (ports committer)
Date: Mon Jun 15 10:08:02 2020
New Revision: 362191
URL: https://svnweb.freebsd.org/changeset/base/362191

Log:
   md5(1): fix style in man page


Mandoc is fine to ignore this, but it is wrong to call it useless.

I really wish that this stop.  .Tn might be useless to mandoc,
but it is a very usable thing if your formatting to something
other than txt, as in a ps or pdf.


In that case I would consider patching our in-tree mandoc to not warn
about Tn. Or request support for Tn or a well-defined replacement upstream.

I can see the benefit of keeping Tn around, as it /might/ potentially
create nice formatting for HTML. On the other hand, I don't like the
idea of not following the linter.


It's marked as obsolete exactly because it's misused, quoting mdoc(7):

Even though the macro name (“tradename”) suggests a semantic
function, historic usage is inconsistent, mostly using it as a
presentation-level macro to request a small caps font.

If we want to somehow emphasize the text, .Sy, .Em, or similar macros 
should be used instead, I don't see why though, it certainly doesn't 
help the readability (IMO, of coursE).

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r362191 - head/sbin/md5

2020-06-15 Thread Yuri Pankov

Fernando Apesteguía wrote:

Author: fernape (ports committer)
Date: Mon Jun 15 10:08:02 2020
New Revision: 362191
URL: https://svnweb.freebsd.org/changeset/base/362191

Log:
   md5(1): fix style in man page
   
   Fix a bunch of style problems reported by mandoc(1) and igor:
   
   mandoc: ./md5.1:19:71: STYLE: no blank before trailing delimiter: Nm ... rmd160,

   mandoc: ./md5.1:20:23: STYLE: no blank before trailing delimiter: Nm ...  
skein512,
   mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:35:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:42:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:45:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:47:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:56:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:58:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:61:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:66:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:68:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:104:24: STYLE: no blank before trailing delimiter: Nm 
skein512,
   mandoc: ./md5.1:117:6: STYLE: referenced manual not found: Xr sha224 3
   
   igor:

   md5.1:46:no comma after "i.e.":either algorithm, [i.e.] to find an input 
that produces a specific
   
   Approved by:	bcr@

   Differential Revision: https://reviews.freebsd.org/D25277

Modified:
   head/sbin/md5/md5.1

Modified: head/sbin/md5/md5.1
==
--- head/sbin/md5/md5.1 Mon Jun 15 03:10:53 2020(r362190)
+++ head/sbin/md5/md5.1 Mon Jun 15 10:08:02 2020(r362191)
@@ -1,5 +1,5 @@
  .\" $FreeBSD$
-.Dd July 9, 2018
+.Dd June 15, 2020
  .Dt MD5 1
  .Os
  .Sh NAME
@@ -16,8 +16,8 @@
  (All other hashes have the same options and usage.)
  .Sh DESCRIPTION
  The
-.Nm md5 , sha1 , sha224 , sha256 , sha384 , sha512, sha512t256, rmd160,
-.Nm skein256, skein512,
+.Nm md5 , sha1 , sha224 , sha256 , sha384 , sha512 , sha512t256 , rmd160 ,
+.Nm skein256 , skein512 ,
  and
  .Nm skein1024
  utilities take as input a message of arbitrary length and produce as
@@ -29,43 +29,29 @@ of the input.
  It is conjectured that it is computationally infeasible to
  produce two messages having the same message digest, or to produce any
  message having a given prespecified target message digest.
-The
-.Tn SHA-224 , SHA-256 , SHA-384 , SHA-512, RIPEMD-160,
-and
-.Tn SKEIN
+The SHA-224 , SHA-256 , SHA-384 , SHA-512, RIPEMD-160,
+and SKEIN
  algorithms are intended for digital signature applications, where a
  large file must be
  .Dq compressed
  in a secure manner before being encrypted with a private
  (secret)
-key under a public-key cryptosystem such as
-.Tn RSA .
+key under a public-key cryptosystem such as RSA.
  .Pp
-The
-.Tn MD5
-and
-.Tn SHA-1
-algorithms have been proven to be vulnerable to practical collision
-attacks and should not be relied upon to produce unique outputs,
+The MD5 and SHA-1 algorithms have been proven to be vulnerable to practical
+collision attacks and should not be relied upon to produce unique outputs,
  .Em nor should they be used as part of a cryptographic signature scheme.
  As of 2017-03-02, there is no publicly known method to
  .Em reverse
-either algorithm, i.e. to find an input that produces a specific
+either algorithm, i.e., to find an input that produces a specific
  output.
  .Pp
-.Tn SHA-512t256
-is a version of
-.Tn SHA-512
-truncated to only 256 bits.
-On 64-bit hardware, this algorithm is approximately 50% faster than
-.Tn SHA-256
-but with the same level of security.
+SHA-512t256 is a version of SHA-512 truncated to only 256 bits.
+On 64-bit hardware, this algorithm is approximately 50% faster than SHA-256 but
+with the same level of security.
  The hashes are not interchangeable.
  .Pp
-It is recommended that all new applications use
-.Tn SHA-512
-or
-.Tn SKEIN-512
+It is recommended that all new applications use SHA-512 or SKEIN-512
  instead of one of the other hash functions.
  .Pp
  The following options may be used in any combination and must
@@ -101,7 +87,7 @@ Run a built-in test script.
  .Sh EXIT STATUS
  The
  .Nm md5 , sha1 , sha224 , sha256 , sha512 , sha512t256 , rmd160 ,
-.Nm skein256 , skein512,
+.Nm skein256 , skein512 ,
  and
  .Nm skein1024
  utilities exit 0 on success,
@@ -114,7 +100,6 @@ option.
  .Xr md5 3 ,
  .Xr ripemd 3 ,
  .Xr sha 3 ,
-.Xr sha224 3 ,
  .Xr sha256 3 ,
  .Xr sha384 3 ,
  .Xr sha512 3 ,


I think we should create sha256.3 -> sha224.3 instead of removing the 
reference, as done for sha512.3 -> sha384.3 -- if you look at the 
sha256.3 man page, it documents all of the SHA224_* functions; i.e.,:


Index: Makefile
===
--- Makefile(revision 362145)
+++ Makefile(working copy)
@@ -40,7 +40,7 @@
 MLINKS+=sha256.3 SHA224_Init.3  sha256.3 

svn commit: r362148 - head/contrib/nvi/common

2020-06-13 Thread Yuri Pankov
Author: yuripv
Date: Sat Jun 13 14:11:02 2020
New Revision: 362148
URL: https://svnweb.freebsd.org/changeset/base/362148

Log:
  nvi: fallback to ISO8859-1 as last resort
  
  Current logic of using user's locale encoding that is UTF-8 doesn't make
  much sense if we already failed the looks_utf8() check and skipped
  encoding set using "fileencoding" as being UTF-8 as well; fallback to
  ISO8859-1 in that case.
  
  Reviewed by:  Zhihao Yuan 
  Differential Revision:https://reviews.freebsd.org/D24919

Modified:
  head/contrib/nvi/common/exf.c

Modified: head/contrib/nvi/common/exf.c
==
--- head/contrib/nvi/common/exf.c   Sat Jun 13 09:16:07 2020
(r362147)
+++ head/contrib/nvi/common/exf.c   Sat Jun 13 14:11:02 2020
(r362148)
@@ -1237,7 +1237,10 @@ file_encinit(SCR *sp)
}
 
/*
-* Detect UTF-8 and fallback to the locale/preset encoding.
+* 1. Check for valid UTF-8.
+* 2. Check if fallback fileencoding is set and is NOT UTF-8.
+* 3. Check if user locale's encoding is NOT UTF-8.
+* 4. Use ISO8859-1 as last resort.
 *
 * XXX
 * A manually set O_FILEENCODING indicates the "fallback
@@ -1246,9 +1249,13 @@ file_encinit(SCR *sp)
 */
if (looks_utf8(buf, blen) > 1)
o_set(sp, O_FILEENCODING, OS_STRDUP, "utf-8", 0);
-   else if (!O_ISSET(sp, O_FILEENCODING) ||
-   !strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8"))
+   else if (O_ISSET(sp, O_FILEENCODING) &&
+   strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8") != 0)
+   /* Use fileencoding as is */ ;
+   else if (strcasecmp(codeset(), "utf-8") != 0)
o_set(sp, O_FILEENCODING, OS_STRDUP, codeset(), 0);
+   else
+   o_set(sp, O_FILEENCODING, OS_STRDUP, "iso8859-1", 0);
 
conv_enc(sp, O_FILEENCODING, 0);
 #endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362147 - head/usr.bin/awk

2020-06-13 Thread Yuri Pankov
Author: yuripv
Date: Sat Jun 13 09:16:07 2020
New Revision: 362147
URL: https://svnweb.freebsd.org/changeset/base/362147

Log:
  awk(1): use -version instead of -V
  
  -V is OpenBSD specific, use -version instead.
  
  While here, fix issue reported by mandoc lint and drop nonexistent
  script(7) reference.
  
  PR:   247004
  Reviewed by:  0mp, markj
  Differential Revision:https://reviews.freebsd.org/D25164

Modified:
  head/usr.bin/awk/awk.1

Modified: head/usr.bin/awk/awk.1
==
--- head/usr.bin/awk/awk.1  Sat Jun 13 08:37:24 2020(r362146)
+++ head/usr.bin/awk/awk.1  Sat Jun 13 09:16:07 2020(r362147)
@@ -23,7 +23,7 @@
 .\" THIS SOFTWARE.
 .\"
 .\"$FreeBSD$
-.Dd $Mdocdate: September 14 2015 $
+.Dd $Mdocdate: June 6 2020 $
 .Dt AWK 1
 .Os
 .Sh NAME
@@ -32,7 +32,7 @@
 .Sh SYNOPSIS
 .Nm awk
 .Op Fl safe
-.Op Fl V
+.Op Fl version
 .Op Fl d Ns Op Ar n
 .Op Fl F Ar fs
 .Op Fl v Ar var Ns = Ns Ar value
@@ -101,7 +101,7 @@ approximation to a
 .Dq safe
 version of
 .Nm .
-.It Fl V
+.It Fl version
 Print the version number of
 .Nm
 to standard output and exit.
@@ -265,7 +265,7 @@ and concatenation
 .Pq indicated by whitespace .
 The operators
 .Ic \&! ++ \-\- += \-= *= /= %= ^=
-.Ic > >= < <= == != ?:
+.Ic > >= < <= == != ?\&:
 are also available in expressions.
 Variables may be scalars, array elements
 (denoted
@@ -752,8 +752,7 @@ Print an error message to standard error:
 .Xr lex 1 ,
 .Xr printf 1 ,
 .Xr sed 1 ,
-.Xr re_format 7 ,
-.Xr script 7
+.Xr re_format 7
 .Rs
 .%A A. V. Aho
 .%A B. W. Kernighan
@@ -774,9 +773,10 @@ except
 does not support {n,m} pattern matching.
 .Pp
 The flags
-.Op Fl \
+.Fl d ,
+.Fl safe ,
 and
-.Op Fl safe ,
+.Fl version
 as well as the commands
 .Cm fflush , compl , and , or ,
 .Cm xor , lshift , rshift ,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362146 - in head/usr.bin/locale: . tests

2020-06-13 Thread Yuri Pankov
Author: yuripv
Date: Sat Jun 13 08:37:24 2020
New Revision: 362146
URL: https://svnweb.freebsd.org/changeset/base/362146

Log:
  locale: exit 1 if unknown keyword was specified
  
  PR:   241906
  Submitted by: Akos Somfai 

Modified:
  head/usr.bin/locale/locale.c
  head/usr.bin/locale/tests/locale_test.sh

Modified: head/usr.bin/locale/locale.c
==
--- head/usr.bin/locale/locale.cSat Jun 13 04:47:59 2020
(r362145)
+++ head/usr.bin/locale/locale.cSat Jun 13 08:37:24 2020
(r362146)
@@ -61,7 +61,7 @@ void  list_locales(void);
 const char *lookup_localecat(int);
 char   *kwval_lconv(int);
 intkwval_lookup(const char *, char **, int *, int *, int *);
-void   showdetails(const char *);
+intshowdetails(const char *);
 void   showkeywordslist(char *substring);
 void   showlocale(void);
 void   usage(void);
@@ -414,7 +414,8 @@ main(int argc, char *argv[])
setlocale(LC_ALL, "");
if (argc > 0) {
while (argc > 0) {
-   showdetails(*argv);
+   if (showdetails(*argv) != 0)
+   exit(EXIT_FAILURE);
argv++;
argc--;
}
@@ -837,19 +838,16 @@ kwval_lookup(const char *kwname, char **kwval, int *ca
  * Show details about requested keyword according to '-k' and/or '-c'
  * command line options specified.
  */
-void
+int
 showdetails(const char *kw)
 {
int type, cat, tmpval, alloc;
char*kwval;
 
if (kwval_lookup(kw, , , , ) == 0) {
-   /*
-* invalid keyword specified.
-* XXX: any actions?
-*/
+   /* Invalid keyword specified */
fprintf(stderr, "Unknown keyword: `%s'\n", kw);
-   return;
+   return (1);
}
 
if (prt_categories) {
@@ -889,6 +887,8 @@ showdetails(const char *kw)
 
if (alloc)
free(kwval);
+
+   return (0);
 }
 
 /*

Modified: head/usr.bin/locale/tests/locale_test.sh
==
--- head/usr.bin/locale/tests/locale_test.shSat Jun 13 04:47:59 2020
(r362145)
+++ head/usr.bin/locale/tests/locale_test.shSat Jun 13 08:37:24 2020
(r362146)
@@ -160,8 +160,24 @@ no_flags_posix_body()
noexpr
 }
 
+atf_test_case k_flag_unknown_kw
+k_flag_unknown_kw_head()
+{
+   atf_set "descr" \
+   "Verify 'locale -k' exit status is '1' for unknown keywords"
+}
+k_flag_unknown_kw_body()
+{
+   export LC_ALL="C"
+
+   # Hopefully the keyword will stay nonexistent
+   atf_check -s exit:1 -o empty -e ignore locale -k nonexistent
+}
+
+
 atf_init_test_cases()
 {
atf_add_test_case k_flag_posix
atf_add_test_case no_flags_posix
+   atf_add_test_case k_flag_unknown_kw
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r362017 - in head/usr.bin/sed: . tests

2020-06-10 Thread Yuri Pankov

Mateusz Piotrowski wrote:

Author: 0mp (doc,ports committer)
Date: Wed Jun 10 19:23:58 2020
New Revision: 362017
URL: https://svnweb.freebsd.org/changeset/base/362017

Log:
   Read commands from stdin when -f - is passed to sed(1)
   
   This patch teaches sed to interpret a "-" in a special way when given

   as an argument to the -f flag.
   
   This behavior is also present in GNU sed.
   
   PR:		244872

   Tested by:   antoine (exp-run)
   Reviewed by: pfg, tobik (older version)
   Approved by: pfg (src)
   Relnotes:yes
   MFC after:   2 weeks
   Differential Revision:   https://reviews.freebsd.org/D24079

Modified:
   head/usr.bin/sed/main.c
   head/usr.bin/sed/sed.1
   head/usr.bin/sed/tests/sed2_test.sh

[...]

Modified: head/usr.bin/sed/tests/sed2_test.sh
==
--- head/usr.bin/sed/tests/sed2_test.sh Wed Jun 10 18:59:46 2020
(r362016)
+++ head/usr.bin/sed/tests/sed2_test.sh Wed Jun 10 19:23:58 2020
(r362017)
@@ -116,11 +116,68 @@ hex_subst_body()
atf_check -o "inline:" sed 's/\xx//' d
  }
  
+atf_test_case commands_on_stdin

+commands_on_stdin_head()
+{
+   atf_set "descr" "Verify -f -"
+}
+commands_on_stdin_body()
+{
+   printf "a\n" > a
+   printf "s/a/b/\n" > a_to_b
+   printf "s/b/c/\n" > b_to_c
+   printf "s/c/d/\n" > ./-
+   atf_check -o 'inline:d\n' sed -f a_to_b -f - -f ./- a < b_to_c
+
+   # Verify that nothing is printed if there are no input files provided.
+   printf 'i\\\nx' > insert_x
+   atf_check -o 'empty' sed -f - < insert_x
+}
+
+atf_test_case commands_on_stdin
+commands_on_stdin_head()
+{
+   atf_set "descr" "Verify -f -"
+}
+commands_on_stdin_body()
+{
+   printf "a\n" > a
+   printf "s/a/b/\n" > a_to_b
+   printf "s/b/c/\n" > b_to_c
+   printf "s/c/d/\n" > ./-
+   atf_check -o 'inline:d\n' sed -f a_to_b -f - -f ./- a < b_to_c
+
+   # Verify that nothing is printed if there are no input files provided.
+   printf 'i\\\nx' > insert_x
+   atf_check -o 'empty' sed -f - < insert_x
+}
+
+atf_test_case commands_on_stdin
+commands_on_stdin_head()
+{
+   atf_set "descr" "Verify -f -"
+}
+commands_on_stdin_body()
+{
+   printf "a\n" > a
+   printf "s/a/b/\n" > a_to_b
+   printf "s/b/c/\n" > b_to_c
+   printf "s/c/d/\n" > ./-
+   atf_check -o 'inline:d\n' sed -f a_to_b -f - -f ./- a < b_to_c
+
+   # Verify that nothing is printed if there are no input files provided.
+   printf 'i\\\nx' > insert_x
+   atf_check -o 'empty' sed -f - < insert_x
+}
+
  atf_init_test_cases()
  {
atf_add_test_case inplace_command_q
atf_add_test_case inplace_hardlink_src
atf_add_test_case inplace_symlink_src
atf_add_test_case escape_subst
+   atf_add_test_case commands_on_stdin
+   atf_add_test_case commands_on_stdin
+   atf_add_test_case commands_on_stdin
atf_add_test_case hex_subst
  }



Am I reading it wrong, or is it the same test case added 3 times?
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361962 - head/bin/ps

2020-06-09 Thread Yuri Pankov
Author: yuripv
Date: Tue Jun  9 07:07:29 2020
New Revision: 361962
URL: https://svnweb.freebsd.org/changeset/base/361962

Log:
  ps: remove xo_no_setlocale() call
  
  Apparently libxo was fixed to do the right thing on FreeBSD,
  and calling xo_no_setlocale() is no longer needed.
  
  Reported by:  phil

Modified:
  head/bin/ps/ps.c

Modified: head/bin/ps/ps.c
==
--- head/bin/ps/ps.cTue Jun  9 06:48:25 2020(r361961)
+++ head/bin/ps/ps.cTue Jun  9 07:07:29 2020(r361962)
@@ -192,7 +192,6 @@ main(int argc, char *argv[])
char fmtbuf[_POSIX2_LINE_MAX];
 
(void) setlocale(LC_ALL, "");
-   xo_no_setlocale();
time(); /* Used by routines in print.c. */
 
/*
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361888 - head/share/man/man9

2020-06-07 Thread Yuri Pankov
Author: yuripv
Date: Sun Jun  7 09:17:57 2020
New Revision: 361888
URL: https://svnweb.freebsd.org/changeset/base/361888

Log:
  taskqueue(9): reference callout(9) instead of timeout(9)
  
  As timeout(9) was removed and all consumers were converted to
  callout(9), reference it instead for the description of sbt, pr,
  and flags arguments.
  
  Reviewed by:  trasz
  Differential Revision:https://reviews.freebsd.org/D25165

Modified:
  head/share/man/man9/taskqueue.9

Modified: head/share/man/man9/taskqueue.9
==
--- head/share/man/man9/taskqueue.9 Sun Jun  7 08:21:19 2020
(r361887)
+++ head/share/man/man9/taskqueue.9 Sun Jun  7 09:17:57 2020
(r361888)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 17, 2019
+.Dd June 6, 2020
 .Dt TASKQUEUE 9
 .Os
 .Sh NAME
@@ -236,7 +236,7 @@ function provides finer control over the scheduling ba
 and
 .Va flags ,
 as detailed in
-.Xr timeout 9 .
+.Xr callout 9 .
 Only non-fast task queues can be used for
 .Va timeout_task
 scheduling.
@@ -510,10 +510,10 @@ may be delayed an indeterminate amount of time before 
 If queueing delays cannot be tolerated then a private taskqueue should
 be created with a dedicated processing thread.
 .Sh SEE ALSO
+.Xr callout 9 ,
 .Xr ithread 9 ,
 .Xr kthread 9 ,
 .Xr swi 9
-.Xr timeout 9
 .Sh HISTORY
 This interface first appeared in
 .Fx 5.0 .
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361887 - head/bin/ps

2020-06-07 Thread Yuri Pankov
Author: yuripv
Date: Sun Jun  7 08:21:19 2020
New Revision: 361887
URL: https://svnweb.freebsd.org/changeset/base/361887

Log:
  ps: use %hs instead of %s format specifiers
  
  Use %hs (locale-based encoding) instead of %s (UTF-8) format for
  strings that are expected to be in current locale encoding (date/time,
  process names/argument list).
  
  PR:   241491
  Reviewed by:  phil
  Differential Revision:https://reviews.freebsd.org/D22160

Modified:
  head/bin/ps/keyword.c
  head/bin/ps/print.c
  head/bin/ps/ps.c

Modified: head/bin/ps/keyword.c
==
--- head/bin/ps/keyword.c   Sun Jun  7 05:08:44 2020(r361886)
+++ head/bin/ps/keyword.c   Sun Jun  7 08:21:19 2020(r361887)
@@ -254,7 +254,7 @@ showkey(void)
i = len;
sep = "\n";
}
-   xo_emit("{P:/%s}{l:key/%s}", sep, p);
+   xo_emit("{P:/%hs}{l:key/%hs}", sep, p);
sep = " ";
}
xo_emit("\n");

Modified: head/bin/ps/print.c
==
--- head/bin/ps/print.c Sun Jun  7 05:08:44 2020(r361886)
+++ head/bin/ps/print.c Sun Jun  7 08:21:19 2020(r361887)
@@ -89,11 +89,11 @@ printheader(void)
v = vent->var;
if (v->flag & LJUST) {
if (STAILQ_NEXT(vent, next_ve) == NULL) /* last one */
-   xo_emit("{T:/%s}", vent->header);
+   xo_emit("{T:/%hs}", vent->header);
else
-   xo_emit("{T:/%-*s}", v->width, vent->header);
+   xo_emit("{T:/%-*hs}", v->width, vent->header);
} else
-   xo_emit("{T:/%*s}", v->width, vent->header);
+   xo_emit("{T:/%*hs}", v->width, vent->header);
if (STAILQ_NEXT(vent, next_ve) != NULL)
xo_emit("{P: }");
}

Modified: head/bin/ps/ps.c
==
--- head/bin/ps/ps.cSun Jun  7 05:08:44 2020(r361886)
+++ head/bin/ps/ps.cSun Jun  7 08:21:19 2020(r361887)
@@ -192,6 +192,7 @@ main(int argc, char *argv[])
char fmtbuf[_POSIX2_LINE_MAX];
 
(void) setlocale(LC_ALL, "");
+   xo_no_setlocale();
time(); /* Used by routines in print.c. */
 
/*
@@ -696,7 +697,7 @@ main(int argc, char *argv[])
fwidthmin = (xo_get_style(NULL) != XO_STYLE_TEXT ||
(STAILQ_NEXT(vent, next_ve) == NULL &&
(vent->var->flag & LJUST))) ? 0 : vent->var->width;
-   snprintf(fmtbuf, sizeof(fmtbuf), "{:%s/%%%s%d..%ds}",
+   snprintf(fmtbuf, sizeof(fmtbuf), "{:%s/%%%s%d..%dhs}",
vent->var->field ? vent->var->field : 
vent->var->name,
(vent->var->flag & LJUST) ? "-" : "",
fwidthmin, fwidthmax);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361871 - head/share/man/man7

2020-06-06 Thread Yuri Pankov
Author: yuripv
Date: Sat Jun  6 17:48:55 2020
New Revision: 361871
URL: https://svnweb.freebsd.org/changeset/base/361871

Log:
  stats(7): fix bad Xr references and lint noise
  
  Reviewed by:  bjk, debdrup
  Differential Revision:https://reviews.freebsd.org/D25166

Modified:
  head/share/man/man7/stats.7

Modified: head/share/man/man7/stats.7
==
--- head/share/man/man7/stats.7 Sat Jun  6 14:19:16 2020(r361870)
+++ head/share/man/man7/stats.7 Sat Jun  6 17:48:55 2020(r361871)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 14, 2020
+.Dd June 6, 2020
 .Dt STATS 7
 .Os
 .Sh NAME
@@ -86,31 +86,32 @@ Display system statistics
 Report virtual memory statistics
 .It Nm zpool iostat
 Report ZFS I/O statistics
+.El
 .Sh SEE ALSO
+.Xr btsockstat 1 ,
+.Xr fstat 1 ,
 .Xr intro 1 ,
+.Xr lockstat 1 ,
+.Xr netstat 1 ,
+.Xr plockstat 1 ,
+.Xr procstat 1 ,
+.Xr sockstat 1 ,
+.Xr stat 1 ,
+.Xr systat 1 ,
 .Xr intro 7 ,
-.Xr intro 8 ,
-.Xr btsockstat 1 ,
 .Xr ctlstat 8 ,
-.Xr fstat 1 ,
 .Xr gstat 8 ,
 .Xr ibstat 8 ,
 .Xr ifmcstat 8 ,
+.Xr intro 8 ,
 .Xr iostat 8 ,
 .Xr ipfstat 8 ,
 .Xr kldstat 8 ,
-.Xr lockstat 1 ,
 .Xr mailstats 8 ,
-.Xr netstat 1 ,
-.Xr plockstat 1 ,
 .Xr pmcstat 8 ,
-.Xr procstat 1 ,
 .Xr pstat 8 ,
-.Xr sockstat 1,
-.Xr stat 1 ,
-.Xr systat 1 ,
 .Xr vmstat 8 ,
-.Xr zpool-iostat 8 ,
+.Xr zpool 8
 .Sh HISTORY
 The
 .Nm
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r361867 - head/share/man/man4

2020-06-06 Thread Yuri Pankov

Warner Losh wrote:

Author: imp
Date: Sat Jun  6 06:21:20 2020
New Revision: 361867
URL: https://svnweb.freebsd.org/changeset/base/361867

Log:
   Document all the sysctl values for the nda devices. Include some minimal
   documentation on namespace support for nda devices. Fix a few typos
   and formatting nits to apease igor.

Modified:
   head/share/man/man4/nda.4

Modified: head/share/man/man4/nda.4
==
--- head/share/man/man4/nda.4   Sat Jun  6 06:21:15 2020(r361866)
+++ head/share/man/man4/nda.4   Sat Jun  6 06:21:20 2020(r361867)
@@ -25,7 +25,7 @@
  .\"
  .\" $FreeBSD$
  .\"
-.Dd December 20, 2017
+.Dd June 6, 2020
  .Dt NDA 4
  .Os
  .Sh NAME
@@ -48,37 +48,156 @@ variables and
  .Xr loader 8
  tunables:
  .Bl -tag -width 12
+.It Va hw.nvme.use_nvd
+The
+.Xr nvme 4
+driver will create
+.Nm
+device nodes for block storage when set to 0.
+Create
+.Xr nvd 4
+device nodes for block storage when set to 1.
+See
+.Xr nvd 4
+when set to 1.
+.It Va kern.cam.nda.nvd_compat
+When set to 1,
+.Xr nvd 4
+aliases will be created for all
+.Nm
+devices, including partitions and other
+.Xr goem 4


A typo in the link.


+providers that take their names from the disk's name.
+.Xr nvd
+devices will not, however, be reported in the
+.Va kern.disks
+.Xr sysctl 8 .
  .It Va kern.cam.nda.sort_io_queue
-.Pp
  This variable determines whether the software queued entries are
  sorted in LBA order or not.
  Sorting is almost always a waste of time.
  The default is to not sort.
+.It Va kern.cam.nda.enable_biospeedup
+This variable determines if the
+.Nm
+devices participate in the speedup protocol.
+When the device participates in the speedup, then when the upper layers
+send a
+.Va BIO_SPEEDUP ,
+all current
+.Va BIO_DELETE
+requests not yet sent to the hardware are completed successfully immediate
+without sending them to the hardware.
+Used in low disk space scenarios when the filesystem encounters
+a critical shortage and needs blocks immediately.
+Since trims have maximum benefit when the LBA is unused for a long time,
+skipping the trim when space is needed for immediate writes results in little 
to
+no excess wear.
+When participation is disabled,
+.Va BIO_SPEEDUP
+requests are ignored.
+.It Va kern.cam.nda.max_trim
+The maximum number of LBA ranges to be collected together for each DSM trims
+send to the hardware.
+Defaults to 256, which is the maximum number of ranges the protocol supports.
+Sometimes poor trim performance can be mitigated by limiting the number of
+ranges sent to the device.
+This value must be between 1 and 256 inclusive.
  .El
  .Pp
  The following report per-device settings, and are read-only unless
-otherwise indicated. Replace
+otherwise indicated.
+Replace
  .Va N
  with the device unit number.
  .Bl -tag -width 12
  .It Va kern.cam.nda.N.rotating
-.Pp
  This variable reports whether the storage volume is spinning or
  flash.
-It's value is hard coded to 0 indicating flash.
+Its value is hard coded to 0 indicating flash.
  .It Va kern.cam.nda.N.unmapped_io
  This variable reports whether the
  .Nm
  driver accepts unmapped I/O for this unit.
+.It Va kern.cam.nda.N.flags
+This variable reports the current flags.
+.Bl -tag -width 12
+.It Va OPEN
+The device is open.
+.It Va DIRTY
+Set when a write to the drive is scheduled.
+Cleared after flush commands.
+.It Va SCTX_INIT
+Internal flag set after
+.Xr sysctl 8
+nodes have been created.
  .El
+.It Va kern.cam.nda.N.sort_io_queue
+Same as the
+.Va kern.cam.nda.sort_io_queue
+tunable.
+.It Va kern.cam.nda.N.trim_ticks
+Writable.
+When greater than zero, hold trims for up to this many ticks before sending
+to the drive.
+Sometimes waiting a little bit to collect more trims to send at one time
+improves trim performance.
+When 0, no delaying of trims are done.
+.It Va kern.cam.nda.N.trim_goal
+Writable.
+When delaying a bit to collect multiple trims, send the accumulated DSM TRIM to
+the drive.
+.It Va kern.cam.nda.N.trim_lbas
+Total number of LBAs that have been trimmed.
+.It Va kern.cam.nda.N.trim_ranges
+Total number of LBA ranges that have been trimmed.
+.It Va kern.cam.nda.N.trim_count
+Total number of trims sent to the hardware.
+.It Va kern.cam.nda.N.deletes
+Total number of
+.Va BIO_DELETE
+requests queued to the device.
+.El
+.Sh NAMESPACE MAPPING
+Each
+.Xr nvme 4
+drive has one or more namespaces associated with it.
+One instance of the
+.Nm
+driver will be created for each of the namespaces on
+the drive.
+All the
+.Nm
+nodes for a
+.Xr nvme 4
+device are at target 0.
+However, the namespace ID maps to the CAM lun, as reported
+in kernel messages and in the
+.Va devlist
+sub command of
+.Xr camcontrol 8 .
+.Pp
+Namespaces are managed with the
+.Va ns
+sub command of
+.Xr nvmecontrol 8 .
+Not all drives support namespace management,
+but all drives support at least one namespace.
+Device nodes for
+.Nm
+will be created and destroyed dynamically as

Re: svn commit: r360956 - head/cddl/contrib/opensolaris/cmd/zfs

2020-05-12 Thread Yuri Pankov

Andriy Gapon wrote:

Author: avg
Date: Tue May 12 09:04:57 2020
New Revision: 360956
URL: https://svnweb.freebsd.org/changeset/base/360956

Log:
   zfs allow/unallow should work with numeric uid/gid
   
   And that should work even (especially) if there is no matching user or

   group name.  This change allows to see and modify delegations for
   deleted groups and users.
   
   The change is originally by Xin Li.

   illumos report: https://www.illumos.org/issues/6037
   OpenZFS (ZoL) PR: https://github.com/openzfs/zfs/pull/10280
   
   Obtained from:	delphij

   MFC after:   2 weeks


Also, PR: 200663.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r359950 - head/usr.sbin/bhyve

2020-04-19 Thread Yuri Pankov

Shawn Webb wrote:

This is the full output from bhyve:

fbuf frame buffer base: 0x69191a0 [sz 16777216]
bhyve: bootrom_alloc: vm_mmap_mapseg: No space left on device
bhyve: vmgenc_init: bootrom_alloc


I wonder if it's coincidence, and you really didn't have 16G to wire at 
that moment, and after reverting the commit it was there (reboot?) -- I 
was getting the same error well before this change when I had almost all 
of the memory eaten by ZFS ARC, I was looking at r359949 as possible 
candidate, but limiting that memory hog did make the issue disappear.

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r360078 - in head: sbin/bectl share/man/man8

2020-04-19 Thread Yuri Pankov

Mateusz Piotrowski wrote:

On 4/18/20 11:11 PM, Yuri Pankov wrote:

We don't have the man style guide (that I know of, at least)

We have style.mdoc(5)!


Now I know, thanks.

May be it would make sense to reference it from style(9) as it's where I 
was looking, and SEE ALSO already lists style.Makefile and style.lua?

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r360078 - in head: sbin/bectl share/man/man8

2020-04-18 Thread Yuri Pankov

Alan Somers wrote:

Author: asomers
Date: Sat Apr 18 19:53:47 2020
New Revision: 360078
URL: https://svnweb.freebsd.org/changeset/base/360078

Log:
   bectl.8, beinstall.sh.8: fix man page section of beinstall.sh
   
   Reported by:	phk

   MFC after:   2 weeks

Modified:
   head/sbin/bectl/bectl.8
   head/share/man/man8/beinstall.8

Modified: head/sbin/bectl/bectl.8
==
--- head/sbin/bectl/bectl.8 Sat Apr 18 19:47:38 2020(r360077)
+++ head/sbin/bectl/bectl.8 Sat Apr 18 19:53:47 2020(r360078)
@@ -17,7 +17,7 @@
  .\"
  .\" $FreeBSD$
  .\"
-.Dd September 11, 2019
+.Dd April 18, 2020
  .Dt BECTL 8
  .Os
  .Sh NAME
@@ -343,7 +343,7 @@ is specified.
  To fill in with jail upgrade example when behavior is firm.
  .El
  .Sh SEE ALSO
-.Xr beinstall.sh 1 ,
+.Xr beinstall.sh 8 ,
  .Xr libbe 3 ,
  .Xr jail 8 ,
  .Xr zfs 8 ,


This breaks the sorting used in SEE ALSO:

$ mandoc -Tlint -Wwarning sbin/bectl/bectl.8
mandoc: sbin/bectl/bectl.8:347:2: WARNING: unusual Xr order: libbe(3) 
after beinstall.sh(8)


We don't have the man style guide (that I know of, at least), but 
keeping it consistent would be nice.



Modified: head/share/man/man8/beinstall.8
==
--- head/share/man/man8/beinstall.8 Sat Apr 18 19:47:38 2020
(r360077)
+++ head/share/man/man8/beinstall.8 Sat Apr 18 19:53:47 2020
(r360078)
@@ -25,8 +25,8 @@
  .\" SUCH DAMAGE.
  .\"
  .\" $FreeBSD$
-.Dd August 20, 2018
-.Dt BEINSTALL.SH 1
+.Dd April 18, 2020
+.Dt BEINSTALL.SH 8
  .Os
  .Sh NAME
  .Nm beinstall.sh

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r358483 - head/sys/compat/linux

2020-03-05 Thread Yuri Pankov

Tijl Coosemans wrote:

Author: tijl
Date: Sun Mar  1 13:12:04 2020
New Revision: 358483
URL: https://svnweb.freebsd.org/changeset/base/358483

Log:
   linuxulator: Map scheduler priorities to Linux priorities.
   
   On Linux the valid range of priorities for the SCHED_FIFO and SCHED_RR

   scheduling policies is [1,99].  For SCHED_OTHER the single valid priority is
   0.  On FreeBSD it is [0,31] for all policies.  Programs are supposed to
   query the valid range using sched_get_priority_(min|max), but of course some
   programs assume the Linux values are valid.
   
   This commit adds a tunable compat.linux.map_sched_prio.  When enabled

   sched_get_priority_(min|max) return the Linux values and sched_setscheduler
   and sched_(get|set)param translate between FreeBSD and Linux values.
   
   Because there are more Linux levels than FreeBSD levels, multiple Linux

   levels map to a single FreeBSD level, which means pre-emption might not
   happen as it does on Linux, so the tunable allows to disable this behaviour.
   It is enabled by default because I think it is unlikely that anyone runs
   real-time software under Linux emulation on FreeBSD that critically relies
   on correct pre-emption.
   
   This fixes FMOD, a commercial sound library used by several games.
   
   PR:		240043

   Tested by:   Alex S 
   Reviewed by: dchagin
   MFC after:   2 weeks
   Differential Revision:   https://reviews.freebsd.org/D23790

Modified:
   head/sys/compat/linux/linux_misc.c
   head/sys/compat/linux/linux_misc.h

Modified: head/sys/compat/linux/linux_misc.c
==
--- head/sys/compat/linux/linux_misc.c  Sun Mar  1 12:34:27 2020
(r358482)
+++ head/sys/compat/linux/linux_misc.c  Sun Mar  1 13:12:04 2020
(r358483)
@@ -144,6 +144,11 @@ struct l_pselect6arg {
l_size_tss_len;
  };
  
+static bool map_sched_prio = true;

+SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN,
+_sched_prio, 0, "Map scheduler priorities to Linux priorities "
+"(not POSIX compliant)");


I'm seeing the following in the log:

sysctl_warn_reuse: can't re-use a leaf (compat.linux.map_sched_prio)!

Should this be done for both linux and linux32 (when one exists) or made 
to install one time only?

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r358153 - head/usr.sbin/services_mkdb

2020-02-19 Thread Yuri Pankov
On 20 Feb 2020, at 06:54, Pedro F. Giffuni  wrote:
> 
> Author: pfg
> Date: Thu Feb 20 03:54:07 2020
> New Revision: 358153
> URL: https://svnweb.freebsd.org/changeset/base/358153
> 
> Log:
>  /etc/services: attempt bring the database to this century.
> 
>  Document better this file, updating the URL to the IANA registry and closely
>  match the official services.
> 
>  For system ports (0 to 1023) we now try to follow the registry closely, 
> noting
>  some historical differences where applicable.
>  For the User ports (1024 - 49151) we try to keep some sensible balance only
>  of services that are likely to be found on FreeBSD/UNIX systems. This 
> attempts
>  to strike a balance between complexity and usefulness.
> 
>  As a side effect: drop references to unofficial Kerberos IV which was EOL'ed
>  on Oct 2006[1]. While it is conceivable some people may still use it in some
>  very old FreeBSD machines that can't be replaced easily, the use of it is
>  considered a security risk. Also drop the unofficial netatalk, which we
>  supported long ago in the kernel but was dropped long ago.
> 
>  [1] https://web.mit.edu/kerberos/krb4-end-of-life.html
> 
>  MFC after:   3 weeks (likely to 12-stable only)
>  Differential Revision:   https://reviews.freebsd.org/D23621
> 
> Modified:
>  head/usr.sbin/services_mkdb/services

I noticed `mergemaster` failing, and it seems to be not happy with this change:

# make installconfig
installing DIRS CONFSDIR
install  -d -m 0755 -o root  -g wheel  /etc
install  -C -o root  -g wheel -m 644  /usr/src/usr.sbin/services_mkdb/services 
/etc/services
services_mkdb -l -q -o /var/db/services.db  /etc/services
services_mkdb: Ran out of protocols adding `divert'; recompile with larger 
PROTOMAX
*** Error code 1

Stop.
make: stopped in /usr/src/usr.sbin/services_mkdb
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r358062 - in head: contrib/ncurses contrib/ncurses/doc contrib/ncurses/doc/html contrib/ncurses/form contrib/ncurses/include contrib/ncurses/man contrib/ncurses/menu contrib/ncurses/mi

2020-02-19 Thread Yuri Pankov
On 18 Feb 2020, at 11:11, Baptiste Daroussin  wrote:
> 
> Author: bapt
> Date: Tue Feb 18 08:11:52 2020
> New Revision: 358062
> URL: https://svnweb.freebsd.org/changeset/base/358062
> 
> Log:
>  Update ncurses to 20200118
> 
>  Among the changes from before:
>  - Add support for extended colors on widechar version
>  - Enable ncurses extended functions
>  - Enable version 2 of the extended mouse support
>  - Enable SCREEN extensions
> 
>  Modification that differs from upstream:
>  - _nc_delink_entries used to be exposed and was turn static,
>turn it back as dynamic to not break abi
>  - Adapt our old termcap.c to modern ncurses
> 
>  MFC after:   3 weeks

Somewhat confusingly, I had to rebuild e.g. dialog4ports after this change as 
it was displaying garbage.  May be a brief headsup is in order (or am I the 
only one seeing it)?
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r353791 - head/tools/tools/locale

2019-10-20 Thread Yuri Pankov
Author: yuripv
Date: Mon Oct 21 03:01:05 2019
New Revision: 353791
URL: https://svnweb.freebsd.org/changeset/base/353791

Log:
  tools/tools/locale: allow POSIX target to be built in parallel
  
  While it's rarely used target, more so a one not used during the
  buildworld, it helps when it's not taking hours (literally).

Modified:
  head/tools/tools/locale/Makefile

Modified: head/tools/tools/locale/Makefile
==
--- head/tools/tools/locale/MakefileMon Oct 21 01:27:01 2019
(r353790)
+++ head/tools/tools/locale/MakefileMon Oct 21 03:01:05 2019
(r353791)
@@ -143,37 +143,33 @@ ENCODINGS=Big5 \
KOI8-U \
SJIS \
US-ASCII \
-   UTF-8 \
+   UTF-8
 
-
-POSIX:
-.if exists (${UNIDIR}/tools/java/cldr.jar)
-   mkdir -p ${UNIDIR}/posix
-.  for area in ${BASE_LOCALES_OF_INTEREST}
-.if !exists(${UNIDIR}/posix/${area}.UTF-8.src)
+POSIX: posixsrc posixcol posixcm
+.if !exists(${UNIDIR}/tools/java/cldr.jar)
+.error check README about building cldr.jar
+.endif
+.for area in ${BASE_LOCALES_OF_INTEREST}
+posixsrc: ${UNIDIR}/posix/${area}.UTF-8.src
+${UNIDIR}/posix/${area}.UTF-8.src:
java -DCLDR_DIR=${UNIDIR:Q} -jar ${UNIDIR}/tools/java/cldr.jar \
org.unicode.cldr.posix.GeneratePOSIX \
-d ${UNIDIR}/posix -m ${area} -c UTF-8
-.endif
-.  endfor
-.  for area encoding in ${COLLATION_SPECIAL}
-.if !exists(${UNIDIR}/posix/${area}.${encoding}.src)
+.endfor
+.for area encoding in ${COLLATION_SPECIAL}
+posixcol: ${UNIDIR}/posix/${area}.${encoding}.src
+${UNIDIR}/posix/${area}.${encoding}.src:
java -DCLDR_DIR=${UNIDIR:Q} -jar ${UNIDIR}/tools/java/cldr.jar \
org.unicode.cldr.posix.GeneratePOSIX \
-d ${UNIDIR}/posix -m ${area} -c ${encoding}
-.endif
-.  endfor
-.  for enc in ${ENCODINGS}
-.  if !exists(${UNIDIR}/posix/${enc}.cm)
+.endfor
+.for enc in ${ENCODINGS}
+posixcm: ${UNIDIR}/posix/${enc}.cm
+${UNIDIR}/posix/${enc}.cm:
java -DCLDR_DIR=${UNIDIR:Q} -jar ${UNIDIR}/tools/java/cldr.jar \
org.unicode.cldr.posix.GenerateCharmap \
-d ${UNIDIR}/posix -c ${enc}
-.  endif
-.  endfor
-.else
-   @echo "Please install CLDR toolset for the desired release"
-   @echo "It should go at ${UNIDIR}/tools"
-.endif
+.endfor
 
 clean-POSIX:
rm -f ${UNIDIR}/posix/*
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r353725 - in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux

2019-10-18 Thread Yuri Pankov
Author: yuripv
Date: Fri Oct 18 12:25:33 2019
New Revision: 353725
URL: https://svnweb.freebsd.org/changeset/base/353725

Log:
  linux: futex_mtx should follow futex_list
  
  Move futex_mtx to linux_common.ko for amd64 and aarch64 along
  with respective list/mutex init/destroy.
  
  PR:   240989
  Reported by:  Alex S 

Modified:
  head/sys/amd64/linux/linux_sysvec.c
  head/sys/amd64/linux32/linux32_sysvec.c
  head/sys/arm64/linux/linux_sysvec.c
  head/sys/compat/linux/linux.c
  head/sys/compat/linux/linux.h
  head/sys/compat/linux/linux_common.c
  head/sys/compat/linux/linux_futex.c
  head/sys/compat/linux/linux_futex.h
  head/sys/i386/linux/linux_sysvec.c

Modified: head/sys/amd64/linux/linux_sysvec.c
==
--- head/sys/amd64/linux/linux_sysvec.c Fri Oct 18 10:28:08 2019
(r353724)
+++ head/sys/amd64/linux/linux_sysvec.c Fri Oct 18 12:25:33 2019
(r353725)
@@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -865,8 +864,6 @@ linux64_elf_modevent(module_t mod, int type, void *dat
if (error == 0) {
SET_FOREACH(lihp, linux_ioctl_handler_set)
linux_ioctl_register_handler(*lihp);
-   LIST_INIT(_list);
-   mtx_init(_mtx, "ftllk64", NULL, MTX_DEF);
stclohz = (stathz ? stathz : hz);
if (bootverbose)
printf("Linux x86-64 ELF exec handler 
installed\n");
@@ -887,7 +884,6 @@ linux64_elf_modevent(module_t mod, int type, void *dat
if (error == 0) {
SET_FOREACH(lihp, linux_ioctl_handler_set)
linux_ioctl_unregister_handler(*lihp);
-   mtx_destroy(_mtx);
if (bootverbose)
printf("Linux ELF exec handler removed\n");
} else

Modified: head/sys/amd64/linux32/linux32_sysvec.c
==
--- head/sys/amd64/linux32/linux32_sysvec.c Fri Oct 18 10:28:08 2019
(r353724)
+++ head/sys/amd64/linux32/linux32_sysvec.c Fri Oct 18 12:25:33 2019
(r353725)
@@ -81,7 +81,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -1023,8 +1022,6 @@ linux_elf_modevent(module_t mod, int type, void *data)
if (error == 0) {
SET_FOREACH(lihp, linux_ioctl_handler_set)
linux32_ioctl_register_handler(*lihp);
-   LIST_INIT(_list);
-   mtx_init(_mtx, "ftllk", NULL, MTX_DEF);
stclohz = (stathz ? stathz : hz);
if (bootverbose)
printf("Linux ELF exec handler installed\n");
@@ -1045,7 +1042,6 @@ linux_elf_modevent(module_t mod, int type, void *data)
if (error == 0) {
SET_FOREACH(lihp, linux_ioctl_handler_set)
linux32_ioctl_unregister_handler(*lihp);
-   mtx_destroy(_mtx);
if (bootverbose)
printf("Linux ELF exec handler removed\n");
} else

Modified: head/sys/arm64/linux/linux_sysvec.c
==
--- head/sys/arm64/linux/linux_sysvec.c Fri Oct 18 10:28:08 2019
(r353724)
+++ head/sys/arm64/linux/linux_sysvec.c Fri Oct 18 12:25:33 2019
(r353725)
@@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -494,8 +493,6 @@ linux64_elf_modevent(module_t mod, int type, void *dat
if (error == 0) {
SET_FOREACH(lihp, linux_ioctl_handler_set)
linux_ioctl_register_handler(*lihp);
-   LIST_INIT(_list);
-   mtx_init(_mtx, "ftllk64", NULL, MTX_DEF);
stclohz = (stathz ? stathz : hz);
if (bootverbose)
printf("Linux arm64 ELF exec handler 
installed\n");
@@ -515,7 +512,6 @@ linux64_elf_modevent(module_t mod, int type, void *dat
if (error == 0) {
SET_FOREACH(lihp, linux_ioctl_handler_set)
linux_ioctl_unregister_handler(*lihp);
-   mtx_destroy(_mtx);
if (bootverbose)
printf("Linux ELF exec handler removed\n");
} else

Modified: head/sys/compat/linux/linux.c
==
--- head/sys/compat/linux/linux.c   Fri Oct 18 

svn commit: r353724 - head/sys/compat/linux

2019-10-18 Thread Yuri Pankov
Author: yuripv
Date: Fri Oct 18 10:28:08 2019
New Revision: 353724
URL: https://svnweb.freebsd.org/changeset/base/353724

Log:
  linux: provide just one instance of futex_list
  
  Move futex_list definition to linux.c which is included once
  in linux.ko (i386) and in linux_common.ko (amd64 and aarch64)
  allowing 32/64 bit linux programs to access the same futexes
  in the latter case.
  
  PR:   240989
  Reviewed by:  dchagin
  Differential Revision:https://reviews.freebsd.org/D22073

Modified:
  head/sys/compat/linux/linux.c
  head/sys/compat/linux/linux.h
  head/sys/compat/linux/linux_futex.c
  head/sys/compat/linux/linux_futex.h

Modified: head/sys/compat/linux/linux.c
==
--- head/sys/compat/linux/linux.c   Fri Oct 18 09:09:32 2019
(r353723)
+++ head/sys/compat/linux/linux.c   Fri Oct 18 10:28:08 2019
(r353724)
@@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+struct futex_list futex_list;
+
 CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ);
 
 static int bsd_to_linux_sigtbl[LINUX_SIGTBLSZ] = {

Modified: head/sys/compat/linux/linux.h
==
--- head/sys/compat/linux/linux.h   Fri Oct 18 09:09:32 2019
(r353723)
+++ head/sys/compat/linux/linux.h   Fri Oct 18 10:28:08 2019
(r353724)
@@ -140,4 +140,6 @@ void bsd_to_linux_sigset(sigset_t *, l_sigset_t *);
 int linux_to_bsd_signal(int sig);
 int bsd_to_linux_signal(int sig);
 
+extern LIST_HEAD(futex_list, futex) futex_list;
+
 #endif /* _LINUX_MI_H_ */

Modified: head/sys/compat/linux/linux_futex.c
==
--- head/sys/compat/linux/linux_futex.c Fri Oct 18 09:09:32 2019
(r353723)
+++ head/sys/compat/linux/linux_futex.c Fri Oct 18 10:28:08 2019
(r353724)
@@ -207,8 +207,6 @@ struct futex {
TAILQ_HEAD(lf_waiting_proc, waiting_proc) f_waiting_proc;
 };
 
-struct futex_list futex_list;
-
 #define FUTEX_LOCK(f)  mtx_lock(&(f)->f_lck)
 #define FUTEX_LOCKED(f)mtx_owned(&(f)->f_lck)
 #define FUTEX_UNLOCK(f)mtx_unlock(&(f)->f_lck)

Modified: head/sys/compat/linux/linux_futex.h
==
--- head/sys/compat/linux/linux_futex.h Fri Oct 18 09:09:32 2019
(r353723)
+++ head/sys/compat/linux/linux_futex.h Fri Oct 18 10:28:08 2019
(r353724)
@@ -38,7 +38,6 @@
 #ifndef _LINUX_FUTEX_H
 #define _LINUX_FUTEX_H
 
-extern LIST_HEAD(futex_list, futex) futex_list;
 extern struct mtx futex_mtx;
 
 #define LINUX_FUTEX_WAIT0
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r353335 - head/usr.sbin/bsdinstall/scripts

2019-10-08 Thread Yuri Pankov
Author: yuripv
Date: Wed Oct  9 05:28:10 2019
New Revision: 353335
URL: https://svnweb.freebsd.org/changeset/base/353335

Log:
  bsdinstall: fix ESP detection for auto ZFS layout
  
  Pass the list of user selected disks from zfsboot to bootconfig so that
  the latter doesn't rely on ESP autodetection that apparently fails for
  some cases, e.g. memstick installation with nvme (boot) and sata drives.
  
  While here, fix printing of debug messages in bootconfig.
  
  Reviewed by:  bcran, imp, tsoome
  Differential Revision:https://reviews.freebsd.org/D21930

Modified:
  head/usr.sbin/bsdinstall/scripts/bootconfig
  head/usr.sbin/bsdinstall/scripts/zfsboot

Modified: head/usr.sbin/bsdinstall/scripts/bootconfig
==
--- head/usr.sbin/bsdinstall/scripts/bootconfig Wed Oct  9 02:02:22 2019
(r353334)
+++ head/usr.sbin/bsdinstall/scripts/bootconfig Wed Oct  9 05:28:10 2019
(r353335)
@@ -27,6 +27,9 @@
 #
 # $FreeBSD$
 
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
+
 die() {
echo $*
exit 1
@@ -47,7 +50,8 @@ if [ "$(uname -m)" = "amd64" ] || [ "$(uname -m)" = "i
 fi
 
 if [ "$(uname -m)" = "arm64" ] || [ "$X86_BOOTMETHOD" = "UEFI" ]; then
-   UFSBOOT_ESPS=$(cat /tmp/bsdinstall-esps)
+   UFSBOOT_ESPS=$(cat /tmp/bsdinstall-esps 2>/dev/null)
+   ZFSBOOT_DISKS=$(cat /tmp/bsdinstall-zfsboot 2>/dev/null)
num_esps=0
 
if [ -n "$ZFSBOOT_DISKS" ]; then
@@ -119,20 +123,20 @@ if [ "$(uname -m)" = "arm64" ] || [ "$X86_BOOTMETHOD" 
fi
 
for esp in $ESPS; do
-   echo "Formatting /dev/${esp} as FAT32"
+   f_dprintf "Formatting /dev/${esp} as FAT32"
newfs_msdos -F 32 -c 1 -L EFISYS "/dev/$esp" > /dev/null 2>&1
if [ $? -ne 0 ]; then
die "Failed to format ESP $esp as FAT32"
fi
 
mntpt=$(mktemp -d /tmp/stand-test.XX)
-   echo "Mounting ESP /dev/${esp}"
+   f_dprintf "Mounting ESP /dev/${esp}"
mount -t msdosfs "/dev/${esp}" "${mntpt}"
if [ $? -ne 0 ]; then
die "Failed to mount ESP ${dev} on ${mntpt}"
fi
 
-   echo "Installing loader.efi onto ESP"
+   f_dprintf "Installing loader.efi onto ESP"
mkdir -p "$mntpt/EFI/freebsd"
cp "$BSDINSTALL_CHROOT/boot/loader.efi" 
"${mntpt}/EFI/freebsd/loader.efi"
 
@@ -142,14 +146,14 @@ if [ "$(uname -m)" = "arm64" ] || [ "$X86_BOOTMETHOD" 
bootlabel="FreeBSD"
fi
 
-   echo "Creating UEFI boot entry"
+   f_dprintf "Creating UEFI boot entry"
efibootmgr --create --activate --label "$bootlabel" --loader 
"${mntpt}/EFI/freebsd/loader.efi" > /dev/null
 
-   echo "Unmounting ESP"
+   f_dprintf "Unmounting ESP"
umount "${mntpt}"
rmdir "${mntpt}"
 
-   echo "Finished configuring /dev/${esp} as ESP"
+   f_dprintf "Finished configuring /dev/${esp} as ESP"
done
 fi
 

Modified: head/usr.sbin/bsdinstall/scripts/zfsboot
==
--- head/usr.sbin/bsdinstall/scripts/zfsbootWed Oct  9 02:02:22 2019
(r353334)
+++ head/usr.sbin/bsdinstall/scripts/zfsbootWed Oct  9 05:28:10 2019
(r353335)
@@ -1656,6 +1656,9 @@ while :; do
zfs_create_boot "$ZFSBOOT_POOL_NAME" \
"$vdev_type" $ZFSBOOT_DISKS || continue
 
+   # To be reused by bootconfig
+   echo "$ZFSBOOT_DISKS" > /tmp/bsdinstall-zfsboot
+
break # to success
;;
?" $msg_pool_type_disks")
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r353130 - in head: share/ctypedef tools/tools/locale/tools

2019-10-05 Thread Yuri Pankov
Author: yuripv
Date: Sat Oct  5 22:17:54 2019
New Revision: 353130
URL: https://svnweb.freebsd.org/changeset/base/353130

Log:
  Mark "private use area" characters as printable.
  
  At least some of the characters in E000-F8FF range are used by Powerline
  fonts, and having no attributes for these ranges in UnicodeData.txt
  other than "Other, Private Use" it should be safe to mark all of them as
  printable.  Some actually were before r340491, so this fixes the
  regression introduced there as well.
  
  PR:   240911
  Reviewed by:  bapt
  Tested by:Daniel Ponte 
  Differential Revision:https://reviews.freebsd.org/D21850

Modified:
  head/share/ctypedef/C.UTF-8.src
  head/tools/tools/locale/tools/utf8-rollup.pl

Modified: head/share/ctypedef/C.UTF-8.src
==
--- head/share/ctypedef/C.UTF-8.src Sat Oct  5 21:52:06 2019
(r353129)
+++ head/share/ctypedef/C.UTF-8.src Sat Oct  5 22:17:54 2019
(r353130)
@@ -16434,7 +16434,6 @@ cntrl   ;/
;/
;/
;/
-   ;...;;/
;/
;/
;/
@@ -16549,9 +16548,7 @@ cntrl   ;/
;/
;/
;/
-   ;/
-   ;...;;/
-   ;...;
+   
 digit  ;/
;/
;/
@@ -22555,6 +22552,7 @@ graph   ;/
;/
;/
;/
+   ;...;;/
;/
;/
;/
@@ -27547,7 +27545,9 @@ graph   ;/
;/
;/
;/
-   
+   ;/
+   ;...;;/
+   ;...;
 lower  ;/
;/
;/

Modified: head/tools/tools/locale/tools/utf8-rollup.pl
==
--- head/tools/tools/locale/tools/utf8-rollup.plSat Oct  5 21:52:06 
2019(r353129)
+++ head/tools/tools/locale/tools/utf8-rollup.plSat Oct  5 22:17:54 
2019(r353130)
@@ -161,7 +161,8 @@ sub parse_unidata {
$cat = "alpha";
} elsif ($d[2] =~ /^P/) {
$cat = "punct";
-   } elsif ($d[2] =~ /^M/ || $d[2] =~ /^N/ || $d[2] =~ /^S/) {
+   } elsif ($d[2] =~ /^Co/ || $d[2] =~ /^M/ || $d[2] =~ /^N/ ||
+   $d[2] =~ /^S/) {
$cat = "graph";
} elsif ($d[2] =~ /^C/) {
$cat = "cntrl";
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r353127 - in head/tools/tools/locale: etc/final-maps tools

2019-10-05 Thread Yuri Pankov
Author: yuripv
Date: Sat Oct  5 21:28:46 2019
New Revision: 353127
URL: https://svnweb.freebsd.org/changeset/base/353127

Log:
  Pre-generate Big5 charmap from CLDR data.
  
  The one used previously was missing the characters in 0-127 range,
  making various tools try to escape them in output.
  
  PR:   235100
  Reviewed by:  bapt
  Tested by:Ting-Wei Lan 
  Differential Revision:https://reviews.freebsd.org/D21794

Modified:
  head/tools/tools/locale/etc/final-maps/map.Big5   (contents, props changed)
  head/tools/tools/locale/tools/finalize

Modified: head/tools/tools/locale/etc/final-maps/map.Big5
==
--- head/tools/tools/locale/etc/final-maps/map.Big5 Sat Oct  5 17:44:33 
2019(r353126)
+++ head/tools/tools/locale/etc/final-maps/map.Big5 Sat Oct  5 21:28:46 
2019(r353127)
@@ -1,13708 +1,13968 @@
+##
+# POSIX charmap 
+# Generated automatically from the Unicode Character Database and Common 
Locale Data Repository
+# see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html
+# charset: Big5
+##
+#
+# Copyright 1991-2011 Unicode, Inc. All rights reserved. Distributed under the 
Terms of Use in  #
+# http://www.unicode.org/copyright.html.   
 #
+#  
 #
+# Permission is hereby granted, free of charge, to any person obtaining a copy 
of the Unicode   #
+# data files and any associated documentation (the "Data Files") or Unicode 
software and any#
+# associated documentation (the "Software") to deal in the Data Files or 
Software without   #
+# restriction, including without limitation the rights to use, copy, modify, 
merge, publish,#
+# distribute, and/or sell copies of the Data Files or Software, and to permit 
persons to whom   #
+# the Data Files or Software are furnished to do so, provided that (a) the 
above copyright  #
+# notice(s) and this permission notice appear with all copies of the Data 
Files or Software,#
+# (b) both the above copyright notice(s) and this permission notice appear in 
associated#
+# documentation, and (c) there is clear notice in each modified Data File or 
in the Software as #
+# well as in the documentation associated with the Data File(s) or Software 
that the data or#
+# software has been modified.  
 #
+#  
 #
+# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 
KIND, EXPRESS OR#
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS FOR A#
+# PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT 
SHALL THE COPYRIGHT #
+# HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY 
SPECIAL INDIRECT OR #
+# CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 
DATA OR PROFITS, #
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 
ARISING OUT OF OR IN   #
+# CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE.
 #
+#
+
  "Big5"
- 1
- 2
+1
+2
+
 CHARMAP
- \xa1\x40
- \xa1\x41
- \xa1\x42
- \xa1\x43
- \xa1\x44
- \xa1\x45
- \xa1\x46
- \xa1\x47
- \xa1\x48
- \xa1\x49
- \xa1\x4a
- \xa1\x4b
- \xa1\x4c
- \xa1\x4d
- \xa1\x4e
- \xa1\x4f
- \xa1\x50
- \xa1\x51
- \xa1\x52
- \xa1\x53
- \xa1\x54
- \xa1\x55
- \xa1\x56
- \xa1\x57
- \xa1\x58
- \xa1\x59
- \xa1\x5b
- \xa1\x5c
- \xa1\x5d
- \xa1\x5e
- \xa1\x5f
- \xa1\x60
- \xa1\x61
- \xa1\x62
- \xa1\x63
- \xa1\x64
- \xa1\x65
- \xa1\x66
- \xa1\x67
- \xa1\x68
- \xa1\x69
- \xa1\x6a
- \xa1\x6b
- \xa1\x6c
- \xa1\x6d
- \xa1\x6e
- \xa1\x6f
- \xa1\x70
- \xa1\x71
- \xa1\x72
- \xa1\x73
- \xa1\x74
- \xa1\x75
- \xa1\x76
- \xa1\x77
- \xa1\x78
- \xa1\x79
- \xa1\x7a
- \xa1\x7b
- \xa1\x7c
- \xa1\x7d
- \xa1\x7e
- \xa1\xa1
- \xa1\xa2
- \xa1\xa3
- \xa1\xa4
- \xa1\xa5
- \xa1\xa6
- \xa1\xa7
- \xa1\xa8
- \xa1\xa9
- \xa1\xaa
- \xa1\xab
- \xa1\xac
- \xa1\xad
- \xa1\xae
- \xa1\xaf
- \xa1\xb0
- \xa1\xb1
- \xa1\xb2
- \xa1\xb3
- \xa1\xb4
- \xa1\xb5
- \xa1\xb6
- \xa1\xb7
- \xa1\xb8
- \xa1\xb9
- \xa1\xba
- \xa1\xbb
- \xa1\xbc
- \xa1\xbd
- \xa1\xbe
- \xa1\xbf
- \xa1\xc0
- \xa1\xc1
- \xa1\xc2
- \xa1\xc4
- \xa1\xc6
- \xa1\xc7
- \xa1\xc8
- \xa1\xc9
- \xa1\xca
- \xa1\xcb
- \xa1\xcc
- \xa1\xcd
- \xa1\xce
- \xa1\xcf
- \xa1\xd0
- \xa1\xd1
- \xa1\xd2
- \xa1\xd3
- \xa1\xd4
- \xa1\xd5
- \xa1\xd6
- \xa1\xd7
- \xa1\xd8
- \xa1\xd9
- \xa1\xda
- \xa1\xdb
- \xa1\xdc
- \xa1\xdd
- \xa1\xde
- \xa1\xdf
- \xa1\xe0

svn commit: r352726 - head/usr.sbin/efibootmgr

2019-09-25 Thread Yuri Pankov
Author: yuripv
Date: Wed Sep 25 21:23:30 2019
New Revision: 352726
URL: https://svnweb.freebsd.org/changeset/base/352726

Log:
  efibootmgr(8): fix markup and style issues
  
  - split synopsis into separate options that can't be used together
  - sort options
  - fix (style) issues reported by mandoc lint
  
  Reviewed by:  imp
  Differential Revision:https://reviews.freebsd.org/D21710

Modified:
  head/usr.sbin/efibootmgr/efibootmgr.8

Modified: head/usr.sbin/efibootmgr/efibootmgr.8
==
--- head/usr.sbin/efibootmgr/efibootmgr.8   Wed Sep 25 20:46:09 2019
(r352725)
+++ head/usr.sbin/efibootmgr/efibootmgr.8   Wed Sep 25 21:23:30 2019
(r352726)
@@ -24,20 +24,42 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 28, 2018
+.Dd September 24, 2019
 .Dt EFIBOOTMGR 8
 .Os
 .Sh NAME
-.Nm efibootmgr 
+.Nm efibootmgr
 .Nd manipulate the EFI Boot Manager
 .Sh SYNOPSIS
-.Op Fl aAnNB
-.Op Fl b Ar bootnum
-.Op Fl t Ar timeout
-.Op Fl T
-.Op Fl o Ar bootorder
+.Nm
 .Op Fl v
-.Op Fl c l Ar loader [ Fl k Ar kernel ] [ Fl L Ar label ] [ Fl -dry-run ]
+.Nm
+.Fl a
+.Fl b Ar bootnum
+.Nm
+.Fl A
+.Fl b Ar bootnum
+.Nm
+.Fl B
+.Fl b Ar bootnum
+.Nm
+.Fl c
+.Fl l Ar loader
+.Op Fl aD
+.Op Fl b Ar bootnum
+.Op Fl k Ar kernel
+.Op Fl L Ar label
+.Nm
+.Fl n
+.Fl b Ar bootnum
+.Nm
+.Fl N
+.Nm
+.Fl o Ar bootorder
+.Nm
+.Fl t Ar timeout
+.Nm
+.Fl T
 .Sh "DESCRIPTION"
 .Nm
 manipulates how UEFI Boot Managers boot the system.
@@ -50,13 +72,13 @@ The UEFI standard defines how hosts may control what i
 bootstrap the system.
 Each method is encapsulated within a persistent UEFI variable, stored
 by the UEFI BIOS of the form
-.Va Boot .
+.Cm Boot Ns Em  .
 These variables are numbered, describe where to load the bootstrap
 program from, and whether or not the method is active.
 The boot order of these methods is controlled by another variable
-.Va BootOrder .
-The currently booting method is communicated using 
-.Va BootCurrent .
+.Cm BootOrder .
+The currently booting method is communicated using
+.Cm BootCurrent .
 A global timeout can also be set.
 .Pp
 .Nm
@@ -64,91 +86,133 @@ requires that the kernel efirt module be loaded to get
 non-volatile variables.
 .Pp
 The following options are available:
-.Bl -tag -width 28m
-.It Fl c Fl -create
-Create a new Boot Variable
-.It Fl l -loader Ar loader
-The path to and name of the loader.
-.It Fl k -kernel Ar kernel
-The path to and name of the kernel.
+.Bl -tag -width Ds
+.It Fl a -activate
+Activate the given
+.Ar bootnum
+boot entry, or the new entry when used with
+.Fl c .
+.It Fl A -deactivate
+Deactivate the given
+.Ar bootnum
+boot entry.
 .It Fl b -bootnum Ar bootnum
-When creating or modifying an entry, use bootnum as the index.
+When creating or modifying an entry, use
+.Ar bootnum
+as the index.
 When creating a new entry, fail if it already exists.
-.It Fl L -label Ar label
-An optional description for the entry.
+.It Fl B -delete
+Delete the given
+.Ar bootnum
+boot entry.
+.It Fl c -create
+Create a new
+.Cm Boot
+variable.
 .It Fl D -dry-run
 Process but do not change any variables.
-.It Fl B -delete
-Delete the given bootnum boot entry.
-.It Fl a -activate
-Activate the given bootnum boot entry, or the new entry when used with -c.
-.It Fl A -deactivate
-Deactivate the given bootnum boot entry.
+.It Fl k -kernel Ar kernel
+The path to and name of the kernel.
+.It Fl l -loader Ar loader
+The path to and name of the loader.
+.It Fl L -label Ar label
+An optional description for the entry.
 .It Fl n -bootnext
-Set bootnum boot entry as the BootNext variable.
-.It Fl N -delete-bootnext 
-Delete the BootNext optional variable.
+Set
+.Ar bootnum
+boot entry as the
+.Cm BootNext
+variable.
+.It Fl N -delete-bootnext
+Delete the
+.Cm BootNext
+optional variable.
 .It Fl o -bootorder Ar bootorder
-Set BootOrder variable to the given comma delimited set of bootnums.
-The numbers are in hex to match Boot, but may omit leading zeros.
+Set
+.Cm BootOrder
+variable to the given comma delimited set of
+.Ar bootnum Ns s .
+The numbers are in hex to match
+.Cm Boot Ns Em  ,
+but may omit leading zeros.
 .It Fl t -set-timeout Ar timeout
 Set the bootmenu timeout value.
 .It Fl T -del-timeout
-Delete the BootTimeout variable.
+Delete the
+.Cm BootTimeout
+variable.
 .It Fl v -verbose
 Display the device path of boot entries in the output.
 .El
-.Pp
 .Sh Examples
+To display the current
+.Cm Boot
+related variables in the system:
 .Pp
-To display the current Boot related variables in the system:
-.Pp
 .Dl efibootmgr [-v]
 .Pp
-This will display the optional BootNext bootnum, BootCurrent,
-or currently booted bootnum, followed by the optional Timeout value, any
-BootOrder that may be set, followed finally by all currently defined Boot
-variables, active or not. The verbose flag will augment this output with
-the disk partition uuids, size/offset and device-path of the
-variable.
+This will 

svn commit: r352651 - head/lib/libc/regex

2019-09-24 Thread Yuri Pankov
Author: yuripv
Date: Tue Sep 24 12:21:01 2019
New Revision: 352651
URL: https://svnweb.freebsd.org/changeset/base/352651

Log:
  lib/libc/regex: fix build with REDEBUG defined
  
  Reviewed by:  kevans
  Differential Revision:https://reviews.freebsd.org/D21760

Modified:
  head/lib/libc/regex/engine.c
  head/lib/libc/regex/regcomp.c

Modified: head/lib/libc/regex/engine.c
==
--- head/lib/libc/regex/engine.cTue Sep 24 06:37:01 2019
(r352650)
+++ head/lib/libc/regex/engine.cTue Sep 24 12:21:01 2019
(r352651)
@@ -1068,7 +1068,7 @@ print(struct match *m,
fprintf(d, " %s", pchar(ch));
for (i = 0; i < g->nstates; i++)
if (ISSET(st, i)) {
-   fprintf(d, "%s%d", (first) ? "\t" : ", ", i);
+   fprintf(d, "%s%lu", (first) ? "\t" : ", ", i);
first = 0;
}
fprintf(d, "\n");

Modified: head/lib/libc/regex/regcomp.c
==
--- head/lib/libc/regex/regcomp.c   Tue Sep 24 06:37:01 2019
(r352650)
+++ head/lib/libc/regex/regcomp.c   Tue Sep 24 12:21:01 2019
(r352651)
@@ -196,12 +196,6 @@ static char nuls[10];  /* place to point 
scanner in ev
 #defineTHERETHERE()(p->slen - 2)
 #defineDROP(n) (p->slen -= (n))
 
-#ifndef NDEBUG
-static int never = 0;  /* for use in asserts; shuts lint up */
-#else
-#definenever   0   /* some s have bugs too */
-#endif
-
 /* Macro used by computejump()/computematchjump() */
 #define MIN(a,b)   ((a)<(b)?(a):(b))
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r352391 - head/share/man/man9

2019-09-16 Thread Yuri Pankov
Author: yuripv
Date: Mon Sep 16 13:10:03 2019
New Revision: 352391
URL: https://svnweb.freebsd.org/changeset/base/352391

Log:
  sbuf(9): fix sbuf_drain_func typedef markup
  
  Reviewed by:  0mp (previous version)
  Differential Revision:https://reviews.freebsd.org/D21569

Modified:
  head/share/man/man9/sbuf.9

Modified: head/share/man/man9/sbuf.9
==
--- head/share/man/man9/sbuf.9  Mon Sep 16 12:54:44 2019(r352390)
+++ head/share/man/man9/sbuf.9  Mon Sep 16 13:10:03 2019(r352391)
@@ -65,7 +65,12 @@
 .Sh SYNOPSIS
 .In sys/types.h
 .In sys/sbuf.h
-.Ft typedef\ int ( sbuf_drain_func ) ( void\ *arg, const\ char\ *data, int\ 
len ) ;
+.Ft typedef int
+.Fo (sbuf_drain_func)
+.Fa "void *arg"
+.Fa "const char *data"
+.Fa "int len"
+.Fc
 .Pp
 .Ft struct sbuf *
 .Fo sbuf_new
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r352216 - head/usr.bin/locale

2019-09-11 Thread Yuri Pankov
Author: yuripv
Date: Wed Sep 11 16:00:03 2019
New Revision: 352216
URL: https://svnweb.freebsd.org/changeset/base/352216

Log:
  locale: initialize variables to make gcc happy
  
  Reported by:  jenkins

Modified:
  head/usr.bin/locale/locale.c

Modified: head/usr.bin/locale/locale.c
==
--- head/usr.bin/locale/locale.cWed Sep 11 15:41:36 2019
(r352215)
+++ head/usr.bin/locale/locale.cWed Sep 11 16:00:03 2019
(r352216)
@@ -745,7 +745,7 @@ kwval_ltime(int id)
 {
char *rval;
struct sbuf *kwsbuf;
-   nl_item i, s_item, e_item;
+   nl_item i, s_item = 0, e_item = 0;
 
switch (id) {
case KW_TIME_DAY:
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r352214 - in head/usr.bin/locale: . tests

2019-09-11 Thread Yuri Pankov
Author: yuripv
Date: Wed Sep 11 15:39:28 2019
New Revision: 352214
URL: https://svnweb.freebsd.org/changeset/base/352214

Log:
  locale: more output fixes
  
  - make abday, day, abmon, mon, am_pm output quoting match linux
  - workaround localeconv() issue for mon_grouping and grouping (PR172215)
  - for other values not available in default locale, output -1 instead of
127 (CHAR_MAX) as returned by localeconv()
  
  With these changes, output of `locale` and `locale -k` for all keywords
  specified by POSIX exactly matches the linux one.
  
  PR:   237752
  Reviewed by:  bapt
  Differential Revision:https://reviews.freebsd.org/D21599

Added:
  head/usr.bin/locale/tests/no_flags_posix_messages.out   (contents, props 
changed)
  head/usr.bin/locale/tests/no_flags_posix_monetary.out   (contents, props 
changed)
  head/usr.bin/locale/tests/no_flags_posix_numeric.out   (contents, props 
changed)
  head/usr.bin/locale/tests/no_flags_posix_time.out   (contents, props changed)
Modified:
  head/usr.bin/locale/locale.c
  head/usr.bin/locale/tests/Makefile
  head/usr.bin/locale/tests/k_flag_posix_monetary.out
  head/usr.bin/locale/tests/k_flag_posix_numeric.out
  head/usr.bin/locale/tests/k_flag_posix_time.out
  head/usr.bin/locale/tests/locale_test.sh

Modified: head/usr.bin/locale/locale.c
==
--- head/usr.bin/locale/locale.cWed Sep 11 13:35:22 2019
(r352213)
+++ head/usr.bin/locale/locale.cWed Sep 11 15:39:28 2019
(r352214)
@@ -54,7 +54,7 @@
 #include "setlocale.h"
 
 /* Local prototypes */
-char   *format_grouping(const char *);
+char   *format_grouping(char *);
 void   init_locales_list(void);
 void   list_charmaps(void);
 void   list_locales(void);
@@ -119,6 +119,12 @@ enum {
 };
 
 enum {
+   TYPE_NUM,
+   TYPE_STR,
+   TYPE_UNQ
+};
+
+enum {
SRC_LINFO,
SRC_LCONV,
SRC_LTIME
@@ -126,218 +132,218 @@ enum {
 
 static const struct _kwinfo {
const char  *name;
-   int isstr;  /* true - string, false - number */
+   int type;
int catid;  /* LC_* */
int source;
int value_ref;
const char  *comment;
 } kwinfo [] = {
-   { "charmap",1, LC_CTYPE,SRC_LINFO,
+   { "charmap",TYPE_STR, LC_CTYPE, SRC_LINFO,
  CODESET, "" },/* hack */
 
/* LC_MONETARY - POSIX */
-   { "int_curr_symbol",1, LC_MONETARY, SRC_LCONV,
+   { "int_curr_symbol",TYPE_STR, LC_MONETARY,  SRC_LCONV,
  KW_INT_CURR_SYMBOL, "" },
-   { "currency_symbol",1, LC_MONETARY, SRC_LCONV,
+   { "currency_symbol",TYPE_STR, LC_MONETARY,  SRC_LCONV,
  KW_CURRENCY_SYMBOL, "" },
-   { "mon_decimal_point",  1, LC_MONETARY, SRC_LCONV,
+   { "mon_decimal_point",  TYPE_STR, LC_MONETARY,  SRC_LCONV,
  KW_MON_DECIMAL_POINT, "" },
-   { "mon_thousands_sep",  1, LC_MONETARY, SRC_LCONV,
+   { "mon_thousands_sep",  TYPE_STR, LC_MONETARY,  SRC_LCONV,
  KW_MON_THOUSANDS_SEP, "" },
-   { "mon_grouping",   1, LC_MONETARY, SRC_LCONV,
+   { "mon_grouping",   TYPE_UNQ, LC_MONETARY,  SRC_LCONV,
  KW_MON_GROUPING, "" },
-   { "positive_sign",  1, LC_MONETARY, SRC_LCONV,
+   { "positive_sign",  TYPE_STR, LC_MONETARY,  SRC_LCONV,
  KW_POSITIVE_SIGN, "" },
-   { "negative_sign",  1, LC_MONETARY, SRC_LCONV,
+   { "negative_sign",  TYPE_STR, LC_MONETARY,  SRC_LCONV,
  KW_NEGATIVE_SIGN, "" },
-   { "int_frac_digits",0, LC_MONETARY, SRC_LCONV,
+   { "int_frac_digits",TYPE_NUM, LC_MONETARY,  SRC_LCONV,
  KW_INT_FRAC_DIGITS, "" },
-   { "frac_digits",0, LC_MONETARY, SRC_LCONV,
+   { "frac_digits",TYPE_NUM, LC_MONETARY,  SRC_LCONV,
  KW_FRAC_DIGITS, "" },
-   { "p_cs_precedes",  0, LC_MONETARY, SRC_LCONV,
+   { "p_cs_precedes",  TYPE_NUM, LC_MONETARY,  SRC_LCONV,
  KW_P_CS_PRECEDES, "" },
-   { "p_sep_by_space", 0, LC_MONETARY, SRC_LCONV,
+   { "p_sep_by_space", TYPE_NUM, LC_MONETARY,  SRC_LCONV,
  KW_P_SEP_BY_SPACE, "" },
-   { "n_cs_precedes",  0, LC_MONETARY, SRC_LCONV,
+   { "n_cs_precedes",  TYPE_NUM, LC_MONETARY,  SRC_LCONV,
  KW_N_CS_PRECEDES, "" },
-   { "n_sep_by_space", 0, LC_MONETARY, SRC_LCONV,
+   { "n_sep_by_space", TYPE_NUM, LC_MONETARY,  SRC_LCONV,
  KW_N_SEP_BY_SPACE, "" },
-   { "p_sign_posn",0, LC_MONETARY, SRC_LCONV,
+   { "p_sign_posn",TYPE_NUM, LC_MONETARY,  SRC_LCONV,
  KW_P_SIGN_POSN, "" },
-   { "n_sign_posn",0, LC_MONETARY, SRC_LCONV,
+   { "n_sign_posn",TYPE_NUM, LC_MONETARY,  SRC_LCONV,
  KW_N_SIGN_POSN, "" },
-   { 

svn commit: r352138 - in head: etc/mtree usr.bin/locale usr.bin/locale/tests

2019-09-10 Thread Yuri Pankov
mpat */
 
-   { "yesexpr",1, LC_MESSAGES, YESEXPR, "" },
-   { "noexpr", 1, LC_MESSAGES, NOEXPR, "" },
-   { "yesstr", 1, LC_MESSAGES, YESSTR,
- "(POSIX legacy)" },   /* compat */
-   { "nostr",  1, LC_MESSAGES, NOSTR,
- "(POSIX legacy)" }/* compat */
-
 };
 #defineNKWINFO (nitems(kwinfo))
 
@@ -522,7 +640,7 @@ format_grouping(const char *binary)
 }
 
 /*
- * keyword value lookup helper (via localeconv())
+ * keyword value lookup helper for values accessible via localeconv()
  */
 char *
 kwval_lconv(int id)
@@ -606,24 +724,86 @@ kwval_lconv(int id)
 }
 
 /*
+ * keyword value lookup helper for LC_TIME keywords not accessible
+ * via nl_langinfo() or localeconv()
+ */
+static char *
+kwval_ltime(int id)
+{
+   char *rval;
+   struct sbuf *kwsbuf;
+   nl_item i, s_item, e_item;
+
+   switch (id) {
+   case KW_TIME_DAY:
+   s_item = DAY_1;
+   e_item = DAY_7;
+   break;
+   case KW_TIME_ABDAY:
+   s_item = ABDAY_1;
+   e_item = ABDAY_7;
+   break;
+   case KW_TIME_MON:
+   s_item = MON_1;
+   e_item = MON_12;
+   break;
+   case KW_TIME_ABMON:
+   s_item = ABMON_1;
+   e_item = ABMON_12;
+   break;
+   case KW_TIME_AM_PM:
+   if (asprintf(, "%s\";\"%s",
+   nl_langinfo(AM_STR),
+   nl_langinfo(PM_STR)) == -1)
+   err(1, "asprintf");
+   return (rval);
+   }
+
+   kwsbuf = sbuf_new_auto();
+   if (kwsbuf == NULL)
+   err(1, "sbuf");
+   for (i = s_item; i <= e_item; i++) {
+   if (i != s_item)
+   (void) sbuf_cat(kwsbuf, "\"");
+   (void) sbuf_cat(kwsbuf, nl_langinfo(i));
+   if (i != e_item)
+   (void) sbuf_cat(kwsbuf, "\";");
+   }
+   (void) sbuf_finish(kwsbuf);
+   rval = strdup(sbuf_data(kwsbuf));
+   if (rval == NULL)
+   err(1, "strdup");
+   sbuf_delete(kwsbuf);
+   return (rval);
+}
+
+/*
  * keyword value and properties lookup
  */
 int
-kwval_lookup(const char *kwname, char **kwval, int *cat, int *isstr)
+kwval_lookup(const char *kwname, char **kwval, int *cat, int *isstr, int 
*alloc)
 {
int rval;
size_t  i;
 
rval = 0;
+   *alloc = 0;
for (i = 0; i < NKWINFO; i++) {
if (strcasecmp(kwname, kwinfo[i].name) == 0) {
rval = 1;
*cat = kwinfo[i].catid;
*isstr = kwinfo[i].isstr;
-   if (kwinfo[i].value_ref < KW_ZERO) {
+   switch (kwinfo[i].source) {
+   case SRC_LINFO:
*kwval = nl_langinfo(kwinfo[i].value_ref);
-   } else {
+   break;
+   case SRC_LCONV:
*kwval = kwval_lconv(kwinfo[i].value_ref);
+   break;
+   case SRC_LTIME:
+   *kwval = kwval_ltime(kwinfo[i].value_ref);
+   *alloc = 1;
+   break;
        }
break;
}
@@ -639,10 +819,10 @@ kwval_lookup(const char *kwname, char **kwval, int *ca
 void
 showdetails(const char *kw)
 {
-   int isstr, cat, tmpval;
+   int isstr, cat, tmpval, alloc;
char*kwval;
 
-   if (kwval_lookup(kw, , , ) == 0) {
+   if (kwval_lookup(kw, , , , ) == 0) {
/*
 * invalid keyword specified.
 * XXX: any actions?
@@ -675,6 +855,9 @@ showdetails(const char *kw)
printf("%d\n", tmpval);
}
}
+
+   if (alloc)
+   free(kwval);
 }
 
 /*

Added: head/usr.bin/locale/tests/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/locale/tests/Makefile  Tue Sep 10 15:09:46 2019
(r352138)
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+PACKAGE=   tests
+
+ATF_TESTS_SH=  locale_test
+
+${PACKAGE}FILES+=  k_flag_posix_monetary.out
+${PACKAGE}FILES+=  k_flag_posix_numeric.out
+${PACKAGE}FILES+=  k_flag_posix_time.out
+${PACKAGE}FILES+=  k_flag_posix_messages.out
+
+.include 

Added: head/usr.bin/locale/tests/k_flag_posix_messages.out

svn commit: r351604 - head/sys/dev/ichsmb

2019-08-29 Thread Yuri Pankov
Author: yuripv
Date: Thu Aug 29 12:49:21 2019
New Revision: 351604
URL: https://svnweb.freebsd.org/changeset/base/351604

Log:
  ichsmb: defer smbus attach until interrupts are available
  
  This fixes a "timed sleep before timers are working" panic seen
  while attaching jedec_dimm(4) instances too early in the boot.
  
  Submitted by: ian
  Reviewed by:  hselasky
  Differential Revision:https://reviews.freebsd.org/D21452

Modified:
  head/sys/dev/ichsmb/ichsmb.c

Modified: head/sys/dev/ichsmb/ichsmb.c
==
--- head/sys/dev/ichsmb/ichsmb.cThu Aug 29 12:05:06 2019
(r351603)
+++ head/sys/dev/ichsmb/ichsmb.cThu Aug 29 12:49:21 2019
(r351604)
@@ -131,11 +131,8 @@ ichsmb_attach(device_t dev)
goto fail;
}
 
-   /* Attach "smbus" child */
-   if ((error = bus_generic_attach(dev)) != 0) {
-   device_printf(dev, "failed to attach child: %d\n", error);
-   goto fail;
-   }
+   /* Probe and attach the smbus when interrupts are available */
+   config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev);
 
return (0);
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r343826 - head/usr.sbin/pwm

2019-02-05 Thread Yuri Pankov
Author: yuripv
Date: Wed Feb  6 04:00:37 2019
New Revision: 343826
URL: https://svnweb.freebsd.org/changeset/base/343826

Log:
  pwm.8: fix markup in synopsis, add -f description
  
  Reviewed by:  bcr, manu
  Differential revision:https://reviews.freebsd.org/D18829

Modified:
  head/usr.sbin/pwm/pwm.8

Modified: head/usr.sbin/pwm/pwm.8
==
--- head/usr.sbin/pwm/pwm.8 Wed Feb  6 03:57:51 2019(r343825)
+++ head/usr.sbin/pwm/pwm.8 Wed Feb  6 04:00:37 2019(r343826)
@@ -22,7 +22,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 12, 2018
+.Dd January 12, 2019
 .Dt PWM 8
 .Os
 .Sh NAME
@@ -44,20 +44,25 @@
 .Nm
 .Op Fl f Ar device
 .Fl c Ar channel
-.Fl p period
+.Fl p Ar period
 .Nm
 .Op Fl f Ar device
 .Fl c Ar channel
-.Fl d duty
+.Fl d Ar duty
 .Sh DESCRIPTION
 The
 .Nm
 utility can be used to configure pwm controllers.
 .Pp
 The options are as follow:
-.Bl -tag -width ".Fl f Ar device"
+.Bl -tag -width "-c channel"
 .It Fl c Ar channel
 Channel number to operate on
+.It Fl f Ar device
+Device to operate on.
+If not specified,
+.Pa /dev/pwmc0
+is used.
 .It Fl E
 Enable the pwm channel
 .It Fl D
@@ -73,16 +78,19 @@ Configure the duty (in nanoseconds or percentage) of t
 .Bl -bullet
 .It
 Show the configuration of the pwm channel:
-.Pp
+.Bd -literal
 pwm -f /dev/pwmc0 -C
+.Ed
 .It
 Configure a 5 ns period and a 25000 duty cycle:
-.Pp
+.Bd -literal
 pwm -f /dev/pwmc0 -p 5 -d 25000
+.Ed
 .It
 Configure a 50% duty cycle:
-.Pp
+.Bd -literal
 pwm -f /dev/pwmc0 -d 50%
+.Ed
 .El
 .Sh SEE ALSO
 .Xr pwm 9 ,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r343825 - head/share/man/man9

2019-02-05 Thread Yuri Pankov
Author: yuripv
Date: Wed Feb  6 03:57:51 2019
New Revision: 343825
URL: https://svnweb.freebsd.org/changeset/base/343825

Log:
  pwm.9: fix markup in interfaces description
  
  Reviewed by:  manu
  Differential revision:https://reviews.freebsd.org/D18830

Modified:
  head/share/man/man9/pwm.9

Modified: head/share/man/man9/pwm.9
==
--- head/share/man/man9/pwm.9   Wed Feb  6 03:52:14 2019(r343824)
+++ head/share/man/man9/pwm.9   Wed Feb  6 03:57:51 2019(r343825)
@@ -22,7 +22,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 12, 2018
+.Dd January 12, 2019
 .Dt PWM 9
 .Os
 .Sh NAME
@@ -79,7 +79,7 @@ Get the current flags for the channel.
 Enable the PWM channel.
 .It Fn PWM_CHANNEL_ISENABLED "device_t dev" "int channel" "bool *enable"
 Test if the PWM channel is enabled.
-.It PWM_CHANNEL_MAX "device_t dev" "int channel" "int *nchannel"
+.It Fn PWM_CHANNEL_MAX "device_t dev" "int channel" "int *nchannel"
 Get the maximum number of channels supported by the controller.
 .El
 .Sh HISTORY
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r343291 - in head/sys: dev/vmware/vmxnet3 net

2019-02-02 Thread Yuri Pankov
Patrick Kelsey wrote:
> Author: pkelsey
> Date: Tue Jan 22 01:11:17 2019
> New Revision: 343291
> URL: https://svnweb.freebsd.org/changeset/base/343291
> 
> Log:
>   onvert vmx(4) to being an iflib driver.
>   
>   Also, expose IFLIB_MAX_RX_SEGS to iflib drivers and add
>   iflib_dma_alloc_align() to the iflib API.
>   
>   Performance is generally better with the tunable/sysctl
>   dev.vmx..iflib.tx_abdicate=1.
>   
>   Reviewed by:shurd
>   MFC after:  1 week
>   Relnotes:   yes
>   Sponsored by:   RG Nets
>   Differential Revision:  https://reviews.freebsd.org/D18761

This breaks vmx interfaces for me in ESXi 6.7 (output below).  The
review mentions setting hw.pci.honor_msi_blacklist="0" and it helps
indeed -- worth mentioning in UPDATING?

vmx0:  port 0x3000-0x300f mem
0xfe903000-0xfe903fff,0xfe902000-0xfe902fff,0xfe90-0xfe901fff at
device 0.0 on pci3
vmx0: Using 512 tx descriptors and 256 rx descriptors
vmx0: msix_init qsets capped at 8
vmx0: intr CPUs: 20 queue msgs: 24 admincnt: 1
vmx0: Using 8 rx queues 8 tx queues
vmx0: attempting to allocate 9 MSI-X vectors (25 supported)
vmx0: failed to allocate 9 MSI-X vectors, err: 6 - using MSI
vmx0: attempting to allocate 1 MSI vectors (1 supported)
msi: routing MSI IRQ 25 to local APIC 6 vector 48
vmx0: using IRQ 25 for MSI
vmx0: Using an MSI interrupt
msi: Assigning MSI IRQ 25 to local APIC 25 vector 48
msi: Assigning MSI IRQ 25 to local APIC 24 vector 48
vmx0: bpf attached
vmx0: Ethernet address: 00:00:00:00:00:33
vmx0: netmap queues/slots: TX 1/512, RX 1/512
vmx0: device enable command failed!
vmx0: link state changed to UP
vmx0: device enable command failed!



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r342576 - head/share/skel

2018-12-28 Thread Yuri Pankov
Rodney W. Grimes wrote:
>> Author: trasz
>> Date: Fri Dec 28 17:50:40 2018
>> New Revision: 342576
>> URL: https://svnweb.freebsd.org/changeset/base/342576
>>
>> Log:
>>   Simplify the way we set the default sh(1) PS1.  No functional changes.
>>   
>>   Reviewed by:   jilles
>>   MFC after: 2 weeks
>>   Sponsored by:  DARPA, AFRL
>>   Differential Revision: https://reviews.freebsd.org/D18662
>>
>> Modified:
>>   head/share/skel/dot.shrc
>>
>> Modified: head/share/skel/dot.shrc
>> ==
>> --- head/share/skel/dot.shrc Fri Dec 28 17:00:12 2018(r342575)
>> +++ head/share/skel/dot.shrc Fri Dec 28 17:50:40 2018(r342576)
>> @@ -33,11 +33,7 @@ alias g='egrep -i'
>>  
>>  
>>  # # set prompt: ``username@hostname$ '' 
>> -# PS1="`whoami`@`hostname | sed 's/\..*//'`"
>> -# case `id -u` in
>> -#   0) PS1="${PS1}# ";;
>> -#   *) PS1="${PS1}$ ";;
>> -# esac
>> +# PS1="`whoami`@\h\\$ "
> 
> You lost the fact that for root the prompt ends in #

Note that '$' is not literal here.  '\$' is expanded to '$' for normal
users, and to '#' for superusers.

>>  
>>  # search path for cd(1)
>>  # CDPATH=:$HOME
>>
>>
> 




signature.asc
Description: OpenPGP digital signature


svn commit: r342265 - head/lib/libc/regex

2018-12-19 Thread Yuri Pankov
Author: yuripv
Date: Wed Dec 19 23:28:56 2018
New Revision: 342265
URL: https://svnweb.freebsd.org/changeset/base/342265

Log:
  regcomp: revert part of r341838 which turned out to be unrelated
  and caused issues with search in less.
  
  PR:   234066
  Reviewed by:  pfg
  Differential revision:https://reviews.freebsd.org/D18611

Modified:
  head/lib/libc/regex/regcomp.c

Modified: head/lib/libc/regex/regcomp.c
==
--- head/lib/libc/regex/regcomp.c   Wed Dec 19 23:28:29 2018
(r342264)
+++ head/lib/libc/regex/regcomp.c   Wed Dec 19 23:28:56 2018
(r342265)
@@ -1841,29 +1841,21 @@ computejumps(struct parse *p, struct re_guts *g)
 {
int ch;
int mindex;
-   int cmin, cmax;
 
-   /*
-* For UTF-8 we process only the first 128 characters corresponding to
-* the POSIX locale.
-*/
-   cmin = MB_CUR_MAX == 1 ? CHAR_MIN : 0;
-   cmax = MB_CUR_MAX == 1 ? CHAR_MAX : 127;
-
/* Avoid making errors worse */
if (p->error != 0)
return;
 
-   g->charjump = (int *)malloc((cmax - cmin + 1) * sizeof(int));
+   g->charjump = (int *)malloc((NC_MAX + 1) * sizeof(int));
if (g->charjump == NULL)/* Not a fatal error */
return;
/* Adjust for signed chars, if necessary */
-   g->charjump = >charjump[-(cmin)];
+   g->charjump = >charjump[-(CHAR_MIN)];
 
/* If the character does not exist in the pattern, the jump
 * is equal to the number of characters in the pattern.
 */
-   for (ch = cmin; ch < cmax + 1; ch++)
+   for (ch = CHAR_MIN; ch < (CHAR_MAX + 1); ch++)
g->charjump[ch] = g->mlen;
 
/* If the character does exist, compute the jump that would
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r342009 - head/secure/lib/libcrypto

2018-12-12 Thread Yuri Pankov

Jung-uk Kim wrote:

Author: jkim
Date: Wed Dec 12 21:56:47 2018
New Revision: 342009
URL: https://svnweb.freebsd.org/changeset/base/342009

Log:
   Enable devcryptoeng for OpenSSL.
   
   Since OpenSSL 1.1.1, the good old BSD-specific cryptodev engine has been

   deprecated in favor of this new engine.  However, this engine is not
   throughly tested on FreeBSD because it was originally written for Linux.
   
   http://cryptodev-linux.org/
   
   Also, the author actually meant to enable it by default on BSD platforms but

   he failed to do so because there was a bug in the Configure script.
   
   https://github.com/openssl/openssl/pull/7882
   
   Now they found that it was more generic issue.
   
   https://github.com/openssl/openssl/pull/7885
   
   Therefore, we need to enable this engine on head to give it more exposure.


Modified:
   head/secure/lib/libcrypto/Makefile
   head/secure/lib/libcrypto/opensslconf.h.in

Modified: head/secure/lib/libcrypto/Makefile
==
--- head/secure/lib/libcrypto/Makefile  Wed Dec 12 21:56:45 2018
(r342008)
+++ head/secure/lib/libcrypto/Makefile  Wed Dec 12 21:56:47 2018
(r342009)
@@ -192,8 +192,8 @@ SRCS+=  ecp_nistz256-x86.S ecp_nistz256.c
  .endif
  
  # engine

-SRCS+= eng_all.c eng_cnf.c eng_ctrl.c eng_dyn.c eng_err.c eng_fat.c
-SRCS+= eng_init.c eng_lib.c eng_list.c eng_openssl.c eng_pkey.c
+SRCS+= eng_all.c eng_cnf.c eng_ctrl.c eng_devcrypto.c eng_dyn.c eng_err.c
+SRCS+= eng_fat.c eng_init.c eng_lib.c eng_list.c eng_openssl.c eng_pkey.c
  SRCS+=eng_rdrand.c eng_table.c tb_asnmth.c tb_cipher.c tb_dh.c 
tb_digest.c
  SRCS+=tb_dsa.c tb_eckey.c tb_pkmeth.c tb_rand.c tb_rsa.c
  


Modified: head/secure/lib/libcrypto/opensslconf.h.in
==
--- head/secure/lib/libcrypto/opensslconf.h.in  Wed Dec 12 21:56:45 2018
(r342008)
+++ head/secure/lib/libcrypto/opensslconf.h.in  Wed Dec 12 21:56:47 2018
(r342009)
@@ -46,9 +46,6 @@ extern "C" {
  #ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
  # define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
  #endif
-#ifndef OPENSSL_NO_DEVCRYPTOENG
-# define OPENSSL_NO_DEVCRYPTOENG
-#endif
  #ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
  # define OPENSSL_NO_EC_NISTP_64_GCC_128
  #endif


I'm now getting "Could not open /dev/crypto: No such file or directory" 
from every other utility unless cryptodev is loaded; given that it's not 
in GENERIC, this is somewhat unexpected change in behavior.

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r341838 - in head/lib/libc: regex tests/regex

2018-12-11 Thread Yuri Pankov
Author: yuripv
Date: Wed Dec 12 04:23:00 2018
New Revision: 341838
URL: https://svnweb.freebsd.org/changeset/base/341838

Log:
  regcomp: reduce size of bitmap for multibyte locales
  
  This fixes the obscure endless loop seen with case-insensitive
  patterns containing characters in 128-255 range;  originally
  found running GNU grep test suite.
  
  Our regex implementation being kludgy translates the characters
  in case-insensitive pattern to bracket expression containing both
  cases for the character and doesn't correctly handle the case when
  original character is in bitmap and the other case is not, falling
  into the endless loop going through in p_bracket(), ordinary(),
  and bothcases().
  
  Reducing the bitmap to 0-127 range for multibyte locales solves this
  as none of these characters have other case mapping outside of bitmap.
  We are also safe in the case when the original character outside of
  bitmap has other case mapping in the bitmap (there are several of those
  in our current ctype maps having unidirectional mapping into bitmap).
  
  Reviewed by:  bapt, kevans, pfg
  Differential revision:https://reviews.freebsd.org/D18302

Modified:
  head/lib/libc/regex/regcomp.c
  head/lib/libc/regex/regex2.h
  head/lib/libc/regex/utils.h
  head/lib/libc/tests/regex/multibyte.sh

Modified: head/lib/libc/regex/regcomp.c
==
--- head/lib/libc/regex/regcomp.c   Wed Dec 12 02:33:01 2018
(r341837)
+++ head/lib/libc/regex/regcomp.c   Wed Dec 12 04:23:00 2018
(r341838)
@@ -1841,21 +1841,29 @@ computejumps(struct parse *p, struct re_guts *g)
 {
int ch;
int mindex;
+   int cmin, cmax;
 
+   /*
+* For UTF-8 we process only the first 128 characters corresponding to
+* the POSIX locale.
+*/
+   cmin = MB_CUR_MAX == 1 ? CHAR_MIN : 0;
+   cmax = MB_CUR_MAX == 1 ? CHAR_MAX : 127;
+
/* Avoid making errors worse */
if (p->error != 0)
return;
 
-   g->charjump = (int*) malloc((NC + 1) * sizeof(int));
+   g->charjump = (int *)malloc((cmax - cmin + 1) * sizeof(int));
if (g->charjump == NULL)/* Not a fatal error */
return;
/* Adjust for signed chars, if necessary */
-   g->charjump = >charjump[-(CHAR_MIN)];
+   g->charjump = >charjump[-(cmin)];
 
/* If the character does not exist in the pattern, the jump
 * is equal to the number of characters in the pattern.
 */
-   for (ch = CHAR_MIN; ch < (CHAR_MAX + 1); ch++)
+   for (ch = cmin; ch < cmax + 1; ch++)
g->charjump[ch] = g->mlen;
 
/* If the character does exist, compute the jump that would

Modified: head/lib/libc/regex/regex2.h
==
--- head/lib/libc/regex/regex2.hWed Dec 12 02:33:01 2018
(r341837)
+++ head/lib/libc/regex/regex2.hWed Dec 12 04:23:00 2018
(r341838)
@@ -113,7 +113,7 @@ typedef struct {
wint_t  max;
 } crange;
 typedef struct {
-   unsigned char   bmp[NC / 8];
+   unsigned char   bmp[NC_MAX / 8];
wctype_t*types;
unsigned intntypes;
wint_t  *wides;
@@ -133,9 +133,14 @@ CHIN1(cset *cs, wint_t ch)
if (ch < NC)
return (((cs->bmp[ch >> 3] & (1 << (ch & 7))) != 0) ^
cs->invert);
-   for (i = 0; i < cs->nwides; i++)
-   if (ch == cs->wides[i])
+   for (i = 0; i < cs->nwides; i++) {
+   if (cs->icase) {
+   if (ch == towlower(cs->wides[i]) ||
+   ch == towupper(cs->wides[i]))
+   return (!cs->invert);
+   } else if (ch == cs->wides[i])
return (!cs->invert);
+   }
for (i = 0; i < cs->nranges; i++)
if (cs->ranges[i].min <= ch && ch <= cs->ranges[i].max)
return (!cs->invert);

Modified: head/lib/libc/regex/utils.h
==
--- head/lib/libc/regex/utils.h Wed Dec 12 02:33:01 2018(r341837)
+++ head/lib/libc/regex/utils.h Wed Dec 12 04:23:00 2018(r341838)
@@ -39,7 +39,9 @@
 /* utility definitions */
 #defineDUPMAX  _POSIX2_RE_DUP_MAX  /* xxx is this right? */
 #defineINFINITY(DUPMAX + 1)
-#defineNC  (CHAR_MAX - CHAR_MIN + 1)
+
+#defineNC_MAX  (CHAR_MAX - CHAR_MIN + 1)
+#defineNC  ((MB_CUR_MAX) == 1 ? (NC_MAX) : (128))
 typedef unsigned char uch;
 
 /* switch off assertions (if not already off) if no REDEBUG */

Modified: head/lib/libc/tests/regex/multibyte.sh
==
--- head/lib/libc/tests/regex/multibyte.sh

svn commit: r341639 - head/lib/libc/gen

2018-12-06 Thread Yuri Pankov
Author: yuripv
Date: Thu Dec  6 18:03:18 2018
New Revision: 341639
URL: https://svnweb.freebsd.org/changeset/base/341639

Log:
  syslog(3): stdarg.h is needed only for vsyslog()
  
  Reported by:  Brian Wood 
  Reviewed by:  asomers, ngie
  Differential revision:https://reviews.freebsd.org/D18334

Modified:
  head/lib/libc/gen/syslog.3

Modified: head/lib/libc/gen/syslog.3
==
--- head/lib/libc/gen/syslog.3  Thu Dec  6 17:29:37 2018(r341638)
+++ head/lib/libc/gen/syslog.3  Thu Dec  6 18:03:18 2018(r341639)
@@ -28,7 +28,7 @@
 .\" @(#)syslog.3   8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd April 12, 2018
+.Dd November 25, 2018
 .Dt SYSLOG 3
 .Os
 .Sh NAME
@@ -42,17 +42,18 @@
 .Lb libc
 .Sh SYNOPSIS
 .In syslog.h
-.In stdarg.h
 .Ft void
 .Fn syslog "int priority" "const char *message" "..."
 .Ft void
-.Fn vsyslog "int priority" "const char *message" "va_list args"
-.Ft void
 .Fn openlog "const char *ident" "int logopt" "int facility"
 .Ft void
 .Fn closelog void
 .Ft int
 .Fn setlogmask "int maskpri"
+.In syslog.h
+.In stdarg.h
+.Ft void
+.Fn vsyslog "int priority" "const char *message" "va_list args"
 .Sh DESCRIPTION
 The
 .Fn syslog
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r341634 - head/share/termcap

2018-12-06 Thread Yuri Pankov
Author: yuripv
Date: Thu Dec  6 13:46:18 2018
New Revision: 341634
URL: https://svnweb.freebsd.org/changeset/base/341634

Log:
  termcap: add italics and tmux entries
  
  - add "ecma+italics" cap
  - use it in "xterm-basic"
  - add "tmux"/"tmux-256color" caps, fixing "so" and "se" caps,
and sourcing "ecma+italics" and "screen"/"screen-256color"
  
  Reviewed by:  bapt
  Differential revision:https://reviews.freebsd.org/D18363

Modified:
  head/share/termcap/termcap

Modified: head/share/termcap/termcap
==
--- head/share/termcap/termcap  Thu Dec  6 13:32:51 2018(r341633)
+++ head/share/termcap/termcap  Thu Dec  6 13:46:18 2018(r341634)
@@ -2787,6 +2787,17 @@ SW|screen-w|VT 100/ANSI X3.64 virtual terminal with 13
 screen-256color|VT 100/ANSI X3.64 terminal with 256 colors:\
:Co#256:pa#32767:\
:AB=\E[48;5;%dm:AF=\E[38;5;%dm:tc=screen:
+
+ecma+italics|ECMA-48 italics:\
+   :ZH=\E[3m:ZR=\E[23m:
+
+tmux|tmux terminal multiplexer:\
+   :so=\E[7m:se=\E[27m:\
+   :tc=ecma+italics:tc=screen:
+tmux-256color|tmux with 256 colors:\
+   :so=\E[7m:se=\E[27m:\
+   :tc=ecma+italics:tc=screen-256color:
+
 # $XTermId: termcap,v 1.78 2009/11/09 00:24:26 tom Exp $
 #
 # Note:
@@ -2829,7 +2840,8 @@ xterm-basic|modern xterm common:\
:me=\E[m:ml=\El:mr=\E[7m:mu=\Em:nd=\E[C:op=\E[39;49m:\
:rc=\E8:rs=\E[!p\E[?3;4l\E[4l\E>:sc=\E7:se=\E[27m:sf=^J:\
:so=\E[7m:sr=\EM:st=\EH:\
-   :ue=\E[24m:up=\E[A:us=\E[4m:ve=\E[?12l\E[?25h:vi=\E[?25l:vs=\E[?12;25h:
+   :ue=\E[24m:up=\E[A:us=\E[4m:ve=\E[?12l\E[?25h:vi=\E[?25l:vs=\E[?12;25h:\
+   :tc=ecma+italics:
 
 # The xterm-new description has all of the features, but is not completely
 # compatible with vt220.  If you are using a Sun or PC keyboard, set the
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r341446 - head/release/amd64

2018-12-04 Thread Yuri Pankov
Alexey Dokuchaev wrote:
> On Mon, Dec 03, 2018 at 10:31:57PM +0000, Yuri Pankov wrote:
>> New Revision: 341446
>> URL: https://svnweb.freebsd.org/changeset/base/341446
>>
>> Log:
>>   mkisoimages.sh: don't use -p flag when copying loader.efi to msdosfs.
>>   
>>   This fixes 'cdrom' target in the case when world was built by user,
>>   and not root.
> 
> Could you please explain why -p should not have been used here?  I fail
> to understand this from the commit log.  I've always considered preserving
> various file metadata as a good thing to do, and this commit puzzles me.

Because the target is on msdosfs, and the only metadata that can be
preserved is modification time which isn't that useful with the file
being hidden in ESP.  OTOH, 'cp -p' fails trying to preserve owner/group
if source is not owned by root (as commit message says).  Additional
'chmod' call done in HBSD doesn't do much as well -- it seems we can
only set/unset owner's 'write' flag which corresponds to DOS 'readonly'
attribute.



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r341446 - head/release/amd64

2018-12-03 Thread Yuri Pankov
Oliver Pinter wrote:
> 
> 
> On Monday, December 3, 2018, Yuri Pankov  <mailto:yur...@freebsd.org>> wrote:
> 
> Author: yuripv
> Date: Mon Dec  3 22:31:57 2018
> New Revision: 341446
> URL: https://svnweb.freebsd.org/changeset/base/341446
> <https://svnweb.freebsd.org/changeset/base/341446>
> 
> Log:
>   mkisoimages.sh: don't use -p flag when copying loader.efi to msdosfs.
> 
>   This fixes 'cdrom' target in the case when world was built by user,
>   and not root.
> 
>   Reviewed by:  imp
>   Differential revision:        https://reviews.freebsd.org/D18414
> <https://reviews.freebsd.org/D18414>
> 
> 
> This was a known issue
> : https://lists.freebsd.org/pipermail/svn-src-head/2018-November/119689.html

Sorry, I missed that.

Looking at the HBSD change, does chmod step have any significance?

> Modified:
>   head/release/amd64/mkisoimages.sh
> 
> Modified: head/release/amd64/mkisoimages.sh
> 
> ==
> --- head/release/amd64/mkisoimages.sh   Mon Dec  3 22:09:23 2018   
>     (r341445)
> +++ head/release/amd64/mkisoimages.sh   Mon Dec  3 22:31:57 2018   
>     (r341446)
> @@ -49,7 +49,7 @@ if [ "$1" = "-b" ]; then
>         mkdir efi
>         mount -t msdosfs /dev/$device efi
>         mkdir -p efi/efi/boot
> -       cp -p "$BASEBITSDIR/boot/loader.efi" efi/efi/boot/bootx64.efi
> +       cp "$BASEBITSDIR/boot/loader.efi" efi/efi/boot/bootx64.efi
>         umount efi
>         rmdir efi
>         mdconfig -d -u $device
> ___
> svn-src-head@freebsd.org <mailto:svn-src-head@freebsd.org> mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> <https://lists.freebsd.org/mailman/listinfo/svn-src-head>
> To unsubscribe, send any mail to
> "svn-src-head-unsubscr...@freebsd.org
> <mailto:svn-src-head-unsubscr...@freebsd.org>"
> 




signature.asc
Description: OpenPGP digital signature


svn commit: r341446 - head/release/amd64

2018-12-03 Thread Yuri Pankov
Author: yuripv
Date: Mon Dec  3 22:31:57 2018
New Revision: 341446
URL: https://svnweb.freebsd.org/changeset/base/341446

Log:
  mkisoimages.sh: don't use -p flag when copying loader.efi to msdosfs.
  
  This fixes 'cdrom' target in the case when world was built by user,
  and not root.
  
  Reviewed by:  imp
  Differential revision:https://reviews.freebsd.org/D18414

Modified:
  head/release/amd64/mkisoimages.sh

Modified: head/release/amd64/mkisoimages.sh
==
--- head/release/amd64/mkisoimages.sh   Mon Dec  3 22:09:23 2018
(r341445)
+++ head/release/amd64/mkisoimages.sh   Mon Dec  3 22:31:57 2018
(r341446)
@@ -49,7 +49,7 @@ if [ "$1" = "-b" ]; then
mkdir efi
mount -t msdosfs /dev/$device efi
mkdir -p efi/efi/boot
-   cp -p "$BASEBITSDIR/boot/loader.efi" efi/efi/boot/bootx64.efi
+   cp "$BASEBITSDIR/boot/loader.efi" efi/efi/boot/bootx64.efi
umount efi
rmdir efi
mdconfig -d -u $device
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r340992 - in head: etc/mtree share/colldef share/ctypedef share/monetdef share/msgdef share/numericdef share/timedef tools/tools/locale tools/tools/locale/etc

2018-11-26 Thread Yuri Pankov
Author: yuripv
Date: Mon Nov 26 19:39:49 2018
New Revision: 340992
URL: https://svnweb.freebsd.org/changeset/base/340992

Log:
  Add ga_IE.UTF-8 locale.
  
  PR:   228587
  Submitted by: Micil  (LC_TIME)
  Reviewed by:  bapt
  Approved by:  kib (mentor, implicit)
  MFC after:3 days
  Differential revision:https://reviews.freebsd.org/D17997

Added:
  head/share/monetdef/ga_IE.UTF-8.src
 - copied unchanged from r340991, head/share/monetdef/en_IE.UTF-8.src
  head/share/msgdef/ga_IE.UTF-8.src   (contents, props changed)
  head/share/timedef/ga_IE.UTF-8.src   (contents, props changed)
Deleted:
  head/share/monetdef/en_IE.UTF-8.src
Modified:
  head/etc/mtree/BSD.usr.dist
  head/share/colldef/Makefile
  head/share/ctypedef/Makefile
  head/share/monetdef/Makefile
  head/share/msgdef/Makefile
  head/share/numericdef/Makefile
  head/share/timedef/Makefile
  head/tools/tools/locale/Makefile
  head/tools/tools/locale/etc/charmaps.xml

Modified: head/etc/mtree/BSD.usr.dist
==
--- head/etc/mtree/BSD.usr.dist Mon Nov 26 19:29:18 2018(r340991)
+++ head/etc/mtree/BSD.usr.dist Mon Nov 26 19:39:49 2018(r340992)
@@ -635,6 +635,8 @@
 ..
 fr_FR.UTF-8
 ..
+ga_IE.UTF-8
+..
 he_IL.UTF-8
 ..
 hi_IN.ISCII-DEV

Modified: head/share/colldef/Makefile
==
--- head/share/colldef/Makefile Mon Nov 26 19:29:18 2018(r340991)
+++ head/share/colldef/Makefile Mon Nov 26 19:39:49 2018(r340992)
@@ -184,6 +184,7 @@ SAME+=  en_US.UTF-8 nl_NL.UTF-8
 SAME+= en_US.UTF-8 nl_BE.UTF-8
 SAME+= en_US.UTF-8 it_IT.UTF-8
 SAME+= en_US.UTF-8 it_CH.UTF-8
+SAME+= en_US.UTF-8 ga_IE.UTF-8
 SAME+= en_US.UTF-8 fr_FR.UTF-8
 SAME+= en_US.UTF-8 fr_CH.UTF-8
 SAME+= en_US.UTF-8 fr_BE.UTF-8

Modified: head/share/ctypedef/Makefile
==
--- head/share/ctypedef/MakefileMon Nov 26 19:29:18 2018
(r340991)
+++ head/share/ctypedef/MakefileMon Nov 26 19:39:49 2018
(r340992)
@@ -82,6 +82,7 @@ SAME+=C.UTF-8 hu_HU.UTF-8
 SAME+= C.UTF-8 hr_HR.UTF-8
 SAME+= C.UTF-8 hi_IN.UTF-8
 SAME+= C.UTF-8 he_IL.UTF-8
+SAME+= C.UTF-8 ga_IE.UTF-8
 SAME+= C.UTF-8 fr_FR.UTF-8
 SAME+= C.UTF-8 fr_CH.UTF-8
 SAME+= C.UTF-8 fr_CA.UTF-8

Modified: head/share/monetdef/Makefile
==
--- head/share/monetdef/MakefileMon Nov 26 19:29:18 2018
(r340991)
+++ head/share/monetdef/MakefileMon Nov 26 19:39:49 2018
(r340992)
@@ -31,7 +31,6 @@ LOCALES+= en_GB.US-ASCII
 LOCALES+=  en_GB.UTF-8
 LOCALES+=  en_IE.ISO8859-1
 LOCALES+=  en_IE.ISO8859-15
-LOCALES+=  en_IE.UTF-8
 LOCALES+=  en_NZ.UTF-8
 LOCALES+=  en_PH.UTF-8
 LOCALES+=  en_SG.UTF-8
@@ -47,6 +46,7 @@ LOCALES+= fr_CA.UTF-8
 LOCALES+=  fr_CH.ISO8859-15
 LOCALES+=  fr_CH.UTF-8
 LOCALES+=  fr_FR.UTF-8
+LOCALES+=  ga_IE.UTF-8
 LOCALES+=  he_IL.UTF-8
 LOCALES+=  hi_IN.ISCII-DEV
 LOCALES+=  hi_IN.UTF-8
@@ -156,6 +156,7 @@ SAME+=  en_CA.UTF-8 en_CA.ISO8859-1
 SAME+= en_GB.ISO8859-15 en_GB.ISO8859-1
 SAME+= zh_HK.UTF-8 en_HK.UTF-8
 SAME+= zh_HK.UTF-8 en_HK.ISO8859-1
+SAME+= ga_IE.UTF-8 en_IE.UTF-8
 SAME+= en_NZ.UTF-8 en_NZ.US-ASCII
 SAME+= en_NZ.UTF-8 en_NZ.ISO8859-15
 SAME+= en_NZ.UTF-8 en_NZ.ISO8859-1

Copied: head/share/monetdef/ga_IE.UTF-8.src (from r340991, 
head/share/monetdef/en_IE.UTF-8.src)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/monetdef/ga_IE.UTF-8.src Mon Nov 26 19:39:49 2018
(r340992, copy of r340991, head/share/monetdef/en_IE.UTF-8.src)
@@ -0,0 +1,50 @@
+# Warning: Do not edit. This file is automatically generated from the
+# tools in /usr/src/tools/tools/locale. The data is obtained from the
+# CLDR project, obtained from http://cldr.unicode.org/
+# -
+#
+# int_curr_symbol (last character always SPACE)
+EUR 
+#
+# currency_symbol
+€
+#
+# mon_decimal_point
+.
+#
+# mon_thousands_sep
+,
+#
+# mon_grouping
+3
+#
+# positive_sign
+
+#
+# negative_sign
+-
+#
+# int_frac_digits
+2
+#
+# frac_digits
+2
+#
+# p_cs_precedes
+1
+#
+# p_sep_by_space
+0
+#
+# n_cs_precedes
+1
+#
+# n_sep_by_space
+0
+#
+# p_sign_posn
+1
+#
+# n_sign_posn
+1
+# EOF

Modified: head/share/msgdef/Makefile
==
--- 

svn commit: r340976 - head/contrib/nvi/common

2018-11-26 Thread Yuri Pankov
Author: yuripv
Date: Mon Nov 26 15:33:55 2018
New Revision: 340976
URL: https://svnweb.freebsd.org/changeset/base/340976

Log:
  vi: fix UTF-8 detection.
  
  PR:   202290
  Submitted by: la...@fit.vutbr.cz
  Reviewed by:  bapt
  Approved by:  kib (mentor, implicit)
  MFC after:3 days
  Differential Revision:https://reviews.freebsd.org/D17950

Modified:
  head/contrib/nvi/common/encoding.c

Modified: head/contrib/nvi/common/encoding.c
==
--- head/contrib/nvi/common/encoding.c  Mon Nov 26 15:12:58 2018
(r340975)
+++ head/contrib/nvi/common/encoding.c  Mon Nov 26 15:33:55 2018
(r340976)
@@ -96,7 +96,7 @@ looks_utf8(const char *ibuf, size_t nbytes)
if (i >= nbytes)
goto done;
 
-   if (buf[i] & 0x40)  /* 10xx */
+   if ((buf[i] & 0xc0) != 0x80)/* 10xx */
return -1;
}
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r340974 - head/sbin/bectl

2018-11-26 Thread Yuri Pankov
Author: yuripv
Date: Mon Nov 26 15:11:32 2018
New Revision: 340974
URL: https://svnweb.freebsd.org/changeset/base/340974

Log:
  bectl: sync usage with man page, removing stray multibyte characters
  in the process.
  
  PR:   233526
  Submitted by: tigersha...@gmail.com (original version)
  Reviewed by:  kevans
  Approved by:  kib (mentor, implicit)
  MFC after:3 days
  Differential revision:https://reviews.freebsd.org/D18335

Modified:
  head/sbin/bectl/bectl.c

Modified: head/sbin/bectl/bectl.c
==
--- head/sbin/bectl/bectl.c Mon Nov 26 14:45:58 2018(r340973)
+++ head/sbin/bectl/bectl.c Mon Nov 26 15:11:32 2018(r340974)
@@ -66,22 +66,24 @@ usage(bool explicit)
FILE *fp;
 
fp =  explicit ? stdout : stderr;
-   fprintf(fp,
+   fprintf(fp, "%s",
"usage:\tbectl {-h | -? | subcommand [args...]}\n"
+#if SOON
+   "\tbectl add (path)*\n"
+#endif
"\tbectl activate [-t] beName\n"
-   "\tbectl create [-e {nonActiveBe | -e beName@snapshot}] beName\n"
-   "\tbectl create beName@snapshot\n"
+   "\tbectl create [-r] [-e {nonActiveBe | beName@snapshot}] beName\n"
+   "\tbectl create [-r] beName@snapshot\n"
"\tbectl destroy [-F] {beName | beName@snapshot}\n"
"\tbectl export sourceBe\n"
"\tbectl import targetBe\n"
-#if SOON
-   "\tbectl add (path)*\n"
-#endif
-   "\tbectl jail [{-b | -U}] [{-o key=value | -u key}]... bootenv 
[utility [argument ...]]\n"
-   "\tbectl list [-a] [-D] [-H] [-s]\n"
+   "\tbectl jail {-b | -U} [{-o key=value | -u key}]... "
+   "{jailID | jailName}\n"
+   "\t  bootenv [utility [argument ...]]\n"
+   "\tbectl list [-DHas]\n"
"\tbectl mount beName [mountpoint]\n"
"\tbectl rename origBeName newBeName\n"
-   "\tbectl {ujail | unjail} ⟨jailID | jailName | bootenv)\n"
+   "\tbectl {ujail | unjail} {jailID | jailName} bootenv\n"
"\tbectl {umount | unmount} [-f] beName\n");
 
return (explicit ? 0 : EX_USAGE);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r340835 - in head/lib/libc: regex tests/regex

2018-11-23 Thread Yuri Pankov
Author: yuripv
Date: Fri Nov 23 15:49:18 2018
New Revision: 340835
URL: https://svnweb.freebsd.org/changeset/base/340835

Log:
  regexec: fix processing multibyte strings.
  
  Matcher function incorrectly assumed that moffset that we get from
  findmust is in bytes. Fix this by introducing a stepback function,
  taking short path if MB_CUR_MAX is 1, and going back byte-by-byte,
  checking if we have a legal character sequence otherwise.
  
  PR:   153502
  Reviewed by:  pfg, kevans
  Approved by:  kib (mentor, implicit)
  Differential revision:https://reviews.freebsd.org/D18297

Added:
  head/lib/libc/tests/regex/multibyte.sh   (contents, props changed)
Modified:
  head/lib/libc/regex/engine.c
  head/lib/libc/tests/regex/Makefile

Modified: head/lib/libc/regex/engine.c
==
--- head/lib/libc/regex/engine.cFri Nov 23 13:50:18 2018
(r340834)
+++ head/lib/libc/regex/engine.cFri Nov 23 15:49:18 2018
(r340835)
@@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$");
  */
 
 #ifdef SNAMES
+#definestepback sstepback
 #definematcher smatcher
 #definewalkswalk
 #definedissect sdissect
@@ -58,6 +59,7 @@ __FBSDID("$FreeBSD$");
 #definematch   smat
 #endif
 #ifdef LNAMES
+#definestepback lstepback
 #definematcher lmatcher
 #definewalklwalk
 #definedissect ldissect
@@ -68,6 +70,7 @@ __FBSDID("$FreeBSD$");
 #definematch   lmat
 #endif
 #ifdef MNAMES
+#definestepback mstepback
 #definematcher mmatcher
 #definewalkmwalk
 #definedissect mdissect
@@ -142,6 +145,39 @@ static const char *pchar(int ch);
 #endif
 
 /*
+ * Given a multibyte string pointed to by start, step back nchar characters
+ * from current position pointed to by cur.
+ */
+static const char *
+stepback(const char *start, const char *cur, int nchar)
+{
+   const char *ret;
+   int wc, mbc;
+   mbstate_t mbs;
+   size_t clen;
+
+   if (MB_CUR_MAX == 1)
+   return ((cur - nchar) > start ? cur - nchar : NULL);
+
+   ret = cur;
+   for (wc = nchar; wc > 0; wc--) {
+   for (mbc = 1; mbc <= MB_CUR_MAX; mbc++) {
+   if ((ret - mbc) < start)
+   return (NULL);
+   memset(, 0, sizeof(mbs));
+   clen = mbrtowc(NULL, ret - mbc, mbc, );
+   if (clen != (size_t)-1 && clen != (size_t)-2)
+   break;
+   }
+   if (mbc > MB_CUR_MAX)
+   return (NULL);
+   ret -= mbc;
+   }
+
+   return (ret);
+}
+
+/*
  - matcher - the actual matching engine
  == static int matcher(struct re_guts *g, const char *string, \
  ==size_t nmatch, regmatch_t pmatch[], int eflags);
@@ -244,9 +280,14 @@ matcher(struct re_guts *g,
ZAPSTATE(>mbs);
 
/* Adjust start according to moffset, to speed things up */
-   if (dp != NULL && g->moffset > -1)
-   start = ((dp - g->moffset) < start) ? start : dp - g->moffset;
+   if (dp != NULL && g->moffset > -1) {
+   const char *nstart;
 
+   nstart = stepback(start, dp, g->moffset);
+   if (nstart != NULL)
+   start = nstart;
+   }
+
SP("mloop", m->st, *start);
 
/* this loop does only one repetition except for backrefs */
@@ -1083,6 +1124,7 @@ pchar(int ch)
 #endif
 #endif
 
+#undef stepback
 #undef matcher
 #undef walk
 #undef dissect

Modified: head/lib/libc/tests/regex/Makefile
==
--- head/lib/libc/tests/regex/Makefile  Fri Nov 23 13:50:18 2018
(r340834)
+++ head/lib/libc/tests/regex/Makefile  Fri Nov 23 15:49:18 2018
(r340835)
@@ -2,6 +2,9 @@
 
 PACKAGE=   tests
 
+# local test cases
+ATF_TESTS_SH+= multibyte
+
 .include "Makefile.inc"
 .include "${.CURDIR:H}/Makefile.netbsd-tests"
 .include 

Added: head/lib/libc/tests/regex/multibyte.sh
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libc/tests/regex/multibyte.sh  Fri Nov 23 15:49:18 2018
(r340835)
@@ -0,0 +1,35 @@
+# $FreeBSD$
+
+atf_test_case multibyte
+multibyte_head()
+{
+   atf_set "descr" "Check matching multibyte characters (PR153502)"
+}
+multibyte_body()
+{
+   export LC_CTYPE="C.UTF-8"
+
+   printf 'é' | atf_check -o "inline:é" \
+   sed -ne '/^.$/p'
+   printf 'éé' | atf_check -o "inline:éé" \
+   sed -ne '/^..$/p'
+   printf 'aéa' | atf_check -o "inline:aéa" \
+   sed -ne '/a.a/p'
+   printf 'aéa'| atf_check -o "inline:aéa" \
+   sed -ne '/a.*a/p'
+   printf 'aaéaa' | atf_check -o "inline:aaéaa" \
+   sed -ne '/aa.aa/p'
+ 

svn commit: r340492 - head/contrib/netbsd-tests/lib/libc/locale

2018-11-17 Thread Yuri Pankov
Author: yuripv
Date: Sat Nov 17 12:59:59 2018
New Revision: 340492
URL: https://svnweb.freebsd.org/changeset/base/340492

Log:
  Make mbstowcs_basic test pass, now that we have more ctype definitions.
  
  Reported by:  jenkins
  Approved by:  kib (mentor, implicit)

Modified:
  head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c

Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c
==
--- head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c  Sat Nov 17 
10:36:00 2018(r340491)
+++ head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c  Sat Nov 17 
12:59:59 2018(r340492)
@@ -88,7 +88,7 @@ static struct test {
0x, 0x5D, 0x5B, 0x1, 0x10, 0x5D, 0x0A
},
 #ifdef __FreeBSD__
-   {1, -1, -1,  1,  1, -1, -1,  1,  1, 1, -1,  1,  1, -1, -1,
+   {1, -1, -1,  1,  1, -1,  1,  1,  1,  1, -1,  1,  1,  1, -1,
 #else
{1, -1, -1,  1,  1, -1, -1,  1,  1, -1, -1,  1,  1, -1, -1,
 #endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r340491 - in head: share/ctypedef tools/tools/locale tools/tools/locale/etc tools/tools/locale/tools

2018-11-17 Thread Yuri Pankov
Author: yuripv
Date: Sat Nov 17 10:36:00 2018
New Revision: 340491
URL: https://svnweb.freebsd.org/changeset/base/340491

Log:
  Use UnicodeData.txt to create UTF-8 ctype map.
  
  This should provide more complete coverage of currently defined Unicode
  characters as compared to manually assembled one we use currently.
  
  Comparison of original and new UTF-8 ctype maps by character class:
  
  TYPEORIGNEW
  alnum   94229   126029
  alpha   93557   125419
  blank   4   2
  cntrl   73  137685
  digit   469 622
  graph   109615  137203
  lower   14782145
  print   109641  137222
  punct   3428797
  rune110481  274907
  space   33  24
  upper   983 1781
  xdigit  469 622
  
  Large number of added cntrl definitions is due to the fact that private-use
  planes are currently defined as such, this can change in the future.
  
  Discussed with:   bapt
  Approved by:  kib (mentor, implicit)
  MFC after:1 month
  Differential revision:https://reviews.freebsd.org/D17842

Deleted:
  head/tools/tools/locale/etc/common.UTF-8.src
  head/tools/tools/locale/etc/manual-input.UTF-8
Modified:
  head/share/ctypedef/C.UTF-8.src
  head/tools/tools/locale/Makefile
  head/tools/tools/locale/tools/utf8-rollup.pl

Modified: head/share/ctypedef/C.UTF-8.src
==
--- head/share/ctypedef/C.UTF-8.src Sat Nov 17 00:03:04 2018
(r340490)
+++ head/share/ctypedef/C.UTF-8.src Sat Nov 17 10:36:00 2018
(r340491)
@@ -7,386 +7,27606 @@ comment_char *
 escape_char /
 
 LC_CTYPE
-
-**
-* 0x - 0x007F Basic Latin
-* 0x0080 - 0x00FF Latin-1 Supplement
-* 0x0100 - 0x017F Latin Extended-A
-* 0x0180 - 0x024F Latin Extended-B
-* 0x0250 - 0x02AF IPA Extensions
-* 0x1D00 - 0x1D7F Phonetic Extensions
-* 0x1D80 - 0x1DBF Phonetic Extensions Supplement
-* 0x1E00 - 0x1EFF Latin Extended Additional
-* 0x2150 - 0x218F Number Forms (partial - Roman Numerals)
-* 0x2C60 - 0x2C7F Latin Extended-C
-* 0xA720 - 0xA7FF Latin Extended-D
-* 0xAB30 - 0xAB6F Latin Extended-E
-* 0xFB00 - 0xFF4F Alphabetic Presentation Forms (partial)
-* 0xFF00 - 0xFFEF Halfwidth and Fullwidth Forms (partial)
-**
-upper  ;...;;/
-   
;...;;/
-   ;...;;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   
;...;;/
-   
;...;;/
-   ;/
-   ;/
-   ;...;;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;...;;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;...;;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   
;...;;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   

svn commit: r340429 - head/lib/libc/locale

2018-11-14 Thread Yuri Pankov
Author: yuripv
Date: Wed Nov 14 09:06:15 2018
New Revision: 340429
URL: https://svnweb.freebsd.org/changeset/base/340429

Log:
  Fix WITHOUT_ICONV build after r340276.
  
  Reported by:  olivier
  Approved by:  kib (mentor, implicit)

Modified:
  head/lib/libc/locale/c16rtomb.c
  head/lib/libc/locale/c32rtomb.c
  head/lib/libc/locale/mbrtoc16.c
  head/lib/libc/locale/mbrtoc32.c

Modified: head/lib/libc/locale/c16rtomb.c
==
--- head/lib/libc/locale/c16rtomb.c Wed Nov 14 08:45:48 2018
(r340428)
+++ head/lib/libc/locale/c16rtomb.c Wed Nov 14 09:06:15 2018
(r340429)
@@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include "xlocale_private.h"
+#include "mblocal.h"
 
 typedef struct {
char16_tlead_surrogate;
@@ -47,7 +47,7 @@ c16rtomb_l(char * __restrict s, char16_t c16, mbstate_
 
FIX_LOCALE(locale);
if (ps == NULL)
-   ps = >c16rtomb;
+   ps = &(XLOCALE_CTYPE(locale)->c16rtomb);
cs = (_Char16State *)ps;
 
/* If s is a null pointer, the value of parameter c16 is ignored. */

Modified: head/lib/libc/locale/c32rtomb.c
==
--- head/lib/libc/locale/c32rtomb.c Wed Nov 14 08:45:48 2018
(r340428)
+++ head/lib/libc/locale/c32rtomb.c Wed Nov 14 09:06:15 2018
(r340429)
@@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include "xlocale_private.h"
+#include "mblocal.h"
 
 size_t
 c32rtomb_l(char * __restrict s, char32_t c32, mbstate_t * __restrict ps,
@@ -47,7 +47,7 @@ c32rtomb_l(char * __restrict s, char32_t c32, mbstate_
 
FIX_LOCALE(locale);
if (ps == NULL)
-   ps = >c32rtomb;
+   ps = &(XLOCALE_CTYPE(locale)->c32rtomb);
 
/* Assume wchar_t uses UTF-32. */
return (wcrtomb_l(s, c32, ps, locale));

Modified: head/lib/libc/locale/mbrtoc16.c
==
--- head/lib/libc/locale/mbrtoc16.c Wed Nov 14 08:45:48 2018
(r340428)
+++ head/lib/libc/locale/mbrtoc16.c Wed Nov 14 09:06:15 2018
(r340429)
@@ -30,7 +30,7 @@
 __FBSDID("$FreeBSD$");
 
 #include 
-#include "xlocale_private.h"
+#include "mblocal.h"
 
 typedef struct {
char16_ttrail_surrogate;
@@ -47,7 +47,7 @@ mbrtoc16_l(char16_t * __restrict pc16, const char * __
 
FIX_LOCALE(locale);
if (ps == NULL)
-   ps = >mbrtoc16;
+   ps = &(XLOCALE_CTYPE(locale)->mbrtoc16);
cs = (_Char16State *)ps;
 
/*

Modified: head/lib/libc/locale/mbrtoc32.c
==
--- head/lib/libc/locale/mbrtoc32.c Wed Nov 14 08:45:48 2018
(r340428)
+++ head/lib/libc/locale/mbrtoc32.c Wed Nov 14 09:06:15 2018
(r340429)
@@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include "xlocale_private.h"
+#include "mblocal.h"
 
 size_t
 mbrtoc32_l(char32_t * __restrict pc32, const char * __restrict s, size_t n,
@@ -40,7 +40,7 @@ mbrtoc32_l(char32_t * __restrict pc32, const char * __
 
FIX_LOCALE(locale);
if (ps == NULL)
-   ps = >mbrtoc32;
+   ps = &(XLOCALE_CTYPE(locale)->mbrtoc32);
 
/* Assume wchar_t uses UTF-32. */
return (mbrtowc_l(pc32, s, n, ps, locale));
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r340276 - in head: contrib/netbsd-tests/lib/libc/locale lib/libc/locale

2018-11-08 Thread Yuri Pankov
Author: yuripv
Date: Fri Nov  9 03:32:53 2018
New Revision: 340276
URL: https://svnweb.freebsd.org/changeset/base/340276

Log:
  Reset persistent mbstates when rune locale encoding changes.
  
  This was shown to be a problem by side effect of now-enabled test case,
  which was going through C, en_US.UTF-8, ja_JP.SJIS, and ja_JP.eucJP,
  and failing eventually as data in mbrtowc's mbstate, that was
  perfectly correct for en_US.UTF-8 was treated as incorrect for
  ja_JP.SJIS, failing the entire test case.
  
  This makes the persistent mbstates to be per ctype-component,
  and not per-locale so we could easily reset the mbstates when
  only LC_CTYPE is changed.
  
  Reviewed by:  bapt, pfg
  Approved by:  kib (mentor, implicit)
  Differential Revision:https://reviews.freebsd.org/D17796

Modified:
  head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c
  head/lib/libc/locale/cXXrtomb_iconv.h
  head/lib/libc/locale/mblen.c
  head/lib/libc/locale/mblocal.h
  head/lib/libc/locale/mbrlen.c
  head/lib/libc/locale/mbrtocXX_iconv.h
  head/lib/libc/locale/mbrtowc.c
  head/lib/libc/locale/mbsnrtowcs.c
  head/lib/libc/locale/mbsrtowcs.c
  head/lib/libc/locale/mbtowc.c
  head/lib/libc/locale/setrunelocale.c
  head/lib/libc/locale/wcrtomb.c
  head/lib/libc/locale/wcsnrtombs.c
  head/lib/libc/locale/wcsrtombs.c
  head/lib/libc/locale/wctomb.c
  head/lib/libc/locale/xlocale_private.h

Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c
==
--- head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c   Fri Nov  9 
00:46:50 2018(r340275)
+++ head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c   Fri Nov  9 
03:32:53 2018(r340276)
@@ -243,9 +243,6 @@ ATF_TC_BODY(mbrtowc_internal, tc)
 {
struct test *t;
 
-#ifdef __FreeBSD__
-   atf_tc_expect_fail("ja_* locale fails");
-#endif
for (t = [0]; t->data != NULL; ++t)
h_ctype2(t, false);
 }

Modified: head/lib/libc/locale/cXXrtomb_iconv.h
==
--- head/lib/libc/locale/cXXrtomb_iconv.h   Fri Nov  9 00:46:50 2018
(r340275)
+++ head/lib/libc/locale/cXXrtomb_iconv.h   Fri Nov  9 03:32:53 2018
(r340276)
@@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
 #include "../iconv/citrus_hash.h"
 #include "../iconv/citrus_module.h"
 #include "../iconv/citrus_iconv.h"
-#include "xlocale_private.h"
+#include "mblocal.h"
 
 typedef struct {
boolinitialized;
@@ -65,7 +65,7 @@ cXXrtomb_l(char * __restrict s, charXX_t c, mbstate_t 
 
FIX_LOCALE(locale);
if (ps == NULL)
-   ps = >cXXrtomb;
+   ps = &(XLOCALE_CTYPE(locale)->cXXrtomb);
cs = (_ConversionState *)ps;
handle = >iconv;
 

Modified: head/lib/libc/locale/mblen.c
==
--- head/lib/libc/locale/mblen.cFri Nov  9 00:46:50 2018
(r340275)
+++ head/lib/libc/locale/mblen.cFri Nov  9 03:32:53 2018
(r340276)
@@ -47,10 +47,11 @@ mblen_l(const char *s, size_t n, locale_t locale)
 
if (s == NULL) {
/* No support for state dependent encodings. */
-   locale->mblen = initial;
+   XLOCALE_CTYPE(locale)->mblen = initial;
return (0);
}
-   rval = XLOCALE_CTYPE(locale)->__mbrtowc(NULL, s, n, >mblen);
+   rval = XLOCALE_CTYPE(locale)->__mbrtowc(NULL, s, n,
+   &(XLOCALE_CTYPE(locale)->mblen));
if (rval == (size_t)-1 || rval == (size_t)-2)
return (-1);
return ((int)rval);

Modified: head/lib/libc/locale/mblocal.h
==
--- head/lib/libc/locale/mblocal.h  Fri Nov  9 00:46:50 2018
(r340275)
+++ head/lib/libc/locale/mblocal.h  Fri Nov  9 03:32:53 2018
(r340276)
@@ -60,6 +60,34 @@ struct xlocale_ctype {
size_t, size_t, mbstate_t * __restrict);
int __mb_cur_max;
int __mb_sb_limit;
+   /** Persistent state used by mblen() calls. */
+   __mbstate_t mblen;
+   /** Persistent state used by mbrlen() calls. */
+   __mbstate_t mbrlen;
+   /** Persistent state used by mbrtoc16() calls. */
+   __mbstate_t mbrtoc16;
+   /** Persistent state used by mbrtoc32() calls. */
+   __mbstate_t mbrtoc32;
+   /** Persistent state used by mbrtowc() calls. */
+   __mbstate_t mbrtowc;
+   /** Persistent state used by mbsnrtowcs() calls. */
+   __mbstate_t mbsnrtowcs;
+   /** Persistent state used by mbsrtowcs() calls. */
+   __mbstate_t mbsrtowcs;
+   /** Persistent state used by mbtowc() calls. */
+   __mbstate_t mbtowc;
+   /** Persistent state used by c16rtomb() calls. */
+   __mbstate_t c16rtomb;
+   /** Persistent state used by c32rtomb() 

svn commit: r340204 - in head/tools/tools/locale: . etc tools

2018-11-06 Thread Yuri Pankov
Author: yuripv
Date: Tue Nov  6 21:49:50 2018
New Revision: 340204
URL: https://svnweb.freebsd.org/changeset/base/340204

Log:
  Cleanup locale tools:
  
  - Simplify the source dir specification, and update README
appropriately
  - Drop the LC (doonly) processing, it's broken, and even if fixed, not
really useful
  - Don't remove the target directories while installing new data as it
removes Makefile.depend which we don't manage; only rm the files we
are going to add/replace/delete instead
  - Restrict adding bsd.endian.mk to colldef and ctypedef Makefiles, it's
not needed in other (text-only) categories
  - GC unused scripts; they don't seem to be particularly helpful standalone
as well
  
  Reviewed by:  bapt
  Approved by:  kib (mentor, implicit)
  Differential Revision:https://reviews.freebsd.org/D17858

Deleted:
  head/tools/tools/locale/etc/unicode.conf
  head/tools/tools/locale/tools/UTF82encoding.pl
  head/tools/tools/locale/tools/changeoffset.pl
  head/tools/tools/locale/tools/unicode2src.pl
  head/tools/tools/locale/tools/whatis.pl
Modified:
  head/tools/tools/locale/Makefile
  head/tools/tools/locale/README
  head/tools/tools/locale/tools/cldr2def.pl
  head/tools/tools/locale/tools/finalize
  head/tools/tools/locale/tools/utf8-rollup.pl

Modified: head/tools/tools/locale/Makefile
==
--- head/tools/tools/locale/MakefileTue Nov  6 21:47:22 2018
(r340203)
+++ head/tools/tools/locale/MakefileTue Nov  6 21:49:50 2018
(r340204)
@@ -10,13 +10,10 @@
 
 .OBJDIR:   .
 
-.if !defined(CLDRDIR)
-CLDRDIR!=  grep ^cldr etc/unicode.conf | cut -f 2 -d " "
+.if !defined(UNIDIR)
+.error UNIDIR is not set
 .endif
-.if !defined(UNIDATADIR)
-UNIDATADIR!=   grep ^unidata etc/unicode.conf | cut -f 2 -d " "
-.endif
-PASSON=CLDRDIR="${CLDRDIR}" UNIDATADIR="${UNIDATADIR}"
+PASSON=UNIDIR="${UNIDIR}"
 
 ETCDIR=${.CURDIR}/etc
 
@@ -49,12 +46,8 @@ COLLATIONS_SPECIAL_ENV+= ${area}.${enc}
 .endfor
 PASSON+=   COLLATIONS_SPECIAL="${COLLATIONS_SPECIAL_ENV}"
 
-.if defined(LC)
-LC:=   --lc=${LC}
-.endif
-
 all:
-   cp ${ETCDIR}/common.UTF-8.src ${CLDRDIR}/posix/xx_Comm_C.UTF-8.src
+   cp ${ETCDIR}/common.UTF-8.src ${UNIDIR}/posix/xx_Comm_C.UTF-8.src
 .for t in ${TYPES}
 .  if ${KNOWN:M${t}}
test -d ${t} || mkdir ${t}
@@ -69,8 +62,9 @@ install: install-${t}
 install-${t}:
 .  if ${KNOWN:M${t}}
rm -rf ${.CURDIR}/${t}.draft
-   rm -rf ${.CURDIR}/../../../share/${t}
-   mv ${.CURDIR}/${t} ${.CURDIR}/../../../share/${t}
+   rm -f ${.CURDIR}/../../../share/${t}/Makefile
+   rm -f ${.CURDIR}/../../../share/${t}/*.src
+   mv ${.CURDIR}/${t}/* ${.CURDIR}/../../../share/${t}/
 .  endif
 .endfor
 
@@ -86,10 +80,9 @@ post-install:
 gen-${t}:
mkdir -p ${t} ${t}.draft
perl -I tools tools/cldr2def.pl \
-   --cldr=$$(realpath ${CLDRDIR}) \
-   --unidata=$$(realpath ${UNIDATADIR}) \
+   --unidir=$$(realpath ${UNIDIR}) \
--etc=$$(realpath ${ETCDIR}) \
-   --type=${t} ${LC}
+   --type=${t}
 
 build-${t}: gen-${t}
env ${PASSON} tools/finalize ${t}
@@ -101,15 +94,16 @@ build-colldef: static-colldef
 
 static-colldef:
 .for area enc in ${COLLATION_SPECIAL}
-   awk -f tools/extract-colldef.awk ${CLDRDIR}/posix/${area}.${enc}.src > 
colldef.draft/${area}.${enc}.src
+   awk -f tools/extract-colldef.awk ${UNIDIR}/posix/${area}.${enc}.src > \
+   colldef.draft/${area}.${enc}.src
 .endfor
 
 transfer-rollup:
-   cp ${ETCDIR}/common.UTF-8.src ${CLDRDIR}/posix/xx_Comm_C.UTF-8.src
+   cp ${ETCDIR}/common.UTF-8.src ${UNIDIR}/posix/xx_Comm_C.UTF-8.src
 
 rollup:
perl -I tools tools/utf8-rollup.pl \
-   --cldr=$$(realpath ${CLDRDIR}) \
+   --unidir=$$(realpath ${UNIDIR}) \
--etc=$$(realpath ${ETCDIR})
 
 clean:
@@ -159,33 +153,33 @@ ENCODINGS=Big5 \
 
 
 POSIX:
-.if exists (${CLDRDIR}/tools/java/cldr.jar)
-   mkdir -p ${CLDRDIR}/posix
+.if exists (${UNIDIR}/tools/java/cldr.jar)
+   mkdir -p ${UNIDIR}/posix
 .  for area in ${BASE_LOCALES_OF_INTEREST}
-.if !exists(${CLDRDIR}/posix/${area}.UTF-8.src)
-   java -DCLDR_DIR=${CLDRDIR:Q} -jar ${CLDRDIR}/tools/java/cldr.jar \
+.if !exists(${UNIDIR}/posix/${area}.UTF-8.src)
+   java -DCLDR_DIR=${UNIDIR:Q} -jar ${UNIDIR}/tools/java/cldr.jar \
org.unicode.cldr.posix.GeneratePOSIX \
-   -d ${CLDRDIR}/posix -m ${area} -c UTF-8
+   -d ${UNIDIR}/posix -m ${area} -c UTF-8
 .endif
 .  endfor
 .  for area encoding in ${COLLATION_SPECIAL}
-.if !exists(${CLDRDIR}/posix/${area}.${encoding}.src)
-   java -DCLDR_DIR=${CLDRDIR:Q} -jar ${CLDRDIR}/tools/java/cldr.jar \
+.if !exists(${UNIDIR}/posix/${area}.${encoding}.src)
+   java 

Re: svn commit: r340144 - in head: lib/libc/locale share/ctypedef tools/tools/locale tools/tools/locale/tools

2018-11-05 Thread Yuri Pankov
Baptiste Daroussin wrote:
> On Sun, Nov 04, 2018 at 10:13:22PM +0000, Yuri Pankov wrote:
>> Author: yuripv
>> Date: Sun Nov  4 22:13:22 2018
>> New Revision: 340144
>> URL: https://svnweb.freebsd.org/changeset/base/340144
>>
>> Log:
>>   Add hybrid C.UTF-8 locale being identical to default C locale except
>>   that it uses the same ctype maps and functions as other UTF-8 locales.
>>   
>>   Reviewed by:   bapt, cem, eadler
>>   Approved by:   kib (mentor, implicit)
>>   Differential Revision: https://reviews.freebsd.org/D17833
>>
> Excellent, do you plan to MFC that so freebsd 12.1 and freebsd 11.3 can 
> benefit
> it?

Yes, will do along with CLDR 34 data (MFC period specified as 1 month
there).



signature.asc
Description: OpenPGP digital signature


svn commit: r340144 - in head: lib/libc/locale share/ctypedef tools/tools/locale tools/tools/locale/tools

2018-11-04 Thread Yuri Pankov
Author: yuripv
Date: Sun Nov  4 22:13:22 2018
New Revision: 340144
URL: https://svnweb.freebsd.org/changeset/base/340144

Log:
  Add hybrid C.UTF-8 locale being identical to default C locale except
  that it uses the same ctype maps and functions as other UTF-8 locales.
  
  Reviewed by:  bapt, cem, eadler
  Approved by:  kib (mentor, implicit)
  Differential Revision:https://reviews.freebsd.org/D17833

Added:
  head/share/ctypedef/C.UTF-8.src
 - copied unchanged from r340143, head/share/ctypedef/en_US.UTF-8.src
Deleted:
  head/share/ctypedef/en_US.UTF-8.src
Modified:
  head/lib/libc/locale/collate.c
  head/lib/libc/locale/ldpart.c
  head/share/ctypedef/Makefile
  head/tools/tools/locale/Makefile
  head/tools/tools/locale/tools/cldr2def.pl

Modified: head/lib/libc/locale/collate.c
==
--- head/lib/libc/locale/collate.c  Sun Nov  4 20:26:29 2018
(r340143)
+++ head/lib/libc/locale/collate.c  Sun Nov  4 22:13:22 2018
(r340144)
@@ -84,7 +84,8 @@ destruct_collate(void *t)
 void *
 __collate_load(const char *encoding, __unused locale_t unused)
 {
-   if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) {
+   if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0 ||
+   strncmp(encoding, "C.", 2) == 0) {
return &__xlocale_C_collate;
}
struct xlocale_collate *table = calloc(sizeof(struct xlocale_collate), 
1);
@@ -122,7 +123,8 @@ __collate_load_tables_l(const char *encoding, struct x
table->__collate_load_error = 1;
 
/* 'encoding' must be already checked. */
-   if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) {
+   if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0 ||
+   strncmp(encoding, "C.", 2) == 0) {
return (_LDP_CACHE);
}
 

Modified: head/lib/libc/locale/ldpart.c
==
--- head/lib/libc/locale/ldpart.c   Sun Nov  4 20:26:29 2018
(r340143)
+++ head/lib/libc/locale/ldpart.c   Sun Nov  4 22:13:22 2018
(r340144)
@@ -63,7 +63,8 @@ __part_load_locale(const char *name,
size_t  namesize, bufsize;
 
/* 'name' must be already checked. */
-   if (strcmp(name, "C") == 0 || strcmp(name, "POSIX") == 0) {
+   if (strcmp(name, "C") == 0 || strcmp(name, "POSIX") == 0 ||
+   strncmp(name, "C.", 2) == 0) {
*using_locale = 0;
return (_LDP_CACHE);
}

Copied: head/share/ctypedef/C.UTF-8.src (from r340143, 
head/share/ctypedef/en_US.UTF-8.src)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/ctypedef/C.UTF-8.src Sun Nov  4 22:13:22 2018
(r340144, copy of r340143, head/share/ctypedef/en_US.UTF-8.src)
@@ -0,0 +1,6372 @@
+# Warning: Do not edit. This file is automatically generated from the
+# tools in /usr/src/tools/tools/locale. The data is obtained from the
+# CLDR project, obtained from http://cldr.unicode.org/
+# -
+
+comment_char *
+escape_char /
+
+LC_CTYPE
+
+**
+* 0x - 0x007F Basic Latin
+* 0x0080 - 0x00FF Latin-1 Supplement
+* 0x0100 - 0x017F Latin Extended-A
+* 0x0180 - 0x024F Latin Extended-B
+* 0x0250 - 0x02AF IPA Extensions
+* 0x1D00 - 0x1D7F Phonetic Extensions
+* 0x1D80 - 0x1DBF Phonetic Extensions Supplement
+* 0x1E00 - 0x1EFF Latin Extended Additional
+* 0x2150 - 0x218F Number Forms (partial - Roman Numerals)
+* 0x2C60 - 0x2C7F Latin Extended-C
+* 0xA720 - 0xA7FF Latin Extended-D
+* 0xAB30 - 0xAB6F Latin Extended-E
+* 0xFB00 - 0xFF4F Alphabetic Presentation Forms (partial)
+* 0xFF00 - 0xFFEF Halfwidth and Fullwidth Forms (partial)
+**
+upper  ;...;;/
+   
;...;;/
+   ;...;;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   
;...;;/
+   
;...;;/
+   ;/
+   ;/
+   ;...;;/
+   ;/
+   ;/
+   ;/
+   ;/
+   

svn commit: r340128 - head/usr.bin/man

2018-11-04 Thread Yuri Pankov
Author: yuripv
Date: Sun Nov  4 16:58:55 2018
New Revision: 340128
URL: https://svnweb.freebsd.org/changeset/base/340128

Log:
  Teach man(1) about C.UTF-8.
  
  While here, use LANG as the proper source to select man pages 
language/encoding,
  falling back to LC_CTYPE.
  
  Reviewed by:  bapt
  Approved by:  kib (mentor, implicit)
  Differential Revision:https://reviews.freebsd.org/D17835

Modified:
  head/usr.bin/man/man.sh

Modified: head/usr.bin/man/man.sh
==
--- head/usr.bin/man/man.sh Sun Nov  4 16:08:59 2018(r340127)
+++ head/usr.bin/man/man.sh Sun Nov  4 16:58:55 2018(r340128)
@@ -662,6 +662,7 @@ man_setup_width() {
 # Setup necessary locale variables.
 man_setup_locale() {
local lang_cc
+   local locstr
 
locpaths='.'
man_charset='US-ASCII'
@@ -670,18 +671,25 @@ man_setup_locale() {
if [ -n "$oflag" ]; then
decho 'Using non-localized manpages'
else
-   # Use the locale tool to give us the proper LC_CTYPE
+   # Use the locale tool to give us proper locale information
eval $( $LOCALE )
 
-   case "$LC_CTYPE" in
+   if [ -n "$LANG" ]; then
+   locstr=$LANG
+   else
+   locstr=$LC_CTYPE
+   fi
+
+   case "$locstr" in
C)  ;;
+   C.UTF-8);;
POSIX)  ;;
[a-z][a-z]_[A-Z][A-Z]\.*)
-   lang_cc="${LC_CTYPE%.*}"
-   man_lang="${LC_CTYPE%_*}"
+   lang_cc="${locstr%.*}"
+   man_lang="${locstr%_*}"
man_country="${lang_cc#*_}"
-   man_charset="${LC_CTYPE#*.}"
-   locpaths="$LC_CTYPE"
+   man_charset="${locstr#*.}"
+   locpaths="$locstr"
locpaths="$locpaths:$man_lang.$man_charset"
if [ "$man_lang" != "en" ]; then
locpaths="$locpaths:en.$man_charset"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r340106 - in head: contrib/netbsd-tests/lib/libc/time lib/libc/stdtime

2018-11-03 Thread Yuri Pankov
Author: yuripv
Date: Sat Nov  3 23:37:13 2018
New Revision: 340106
URL: https://svnweb.freebsd.org/changeset/base/340106

Log:
  strptime: make %k and %l specifiers match their description in
  strftime(3), and allow them to process space-padded input.
  
  PR:   230720
  Submitted by: rlit...@inetco.com (original version)
  Approved by:  kib (mentor, implicit)
  Differential Revision:https://reviews.freebsd.org/D17761

Modified:
  head/contrib/netbsd-tests/lib/libc/time/t_strptime.c
  head/lib/libc/stdtime/strptime.c

Modified: head/contrib/netbsd-tests/lib/libc/time/t_strptime.c
==
--- head/contrib/netbsd-tests/lib/libc/time/t_strptime.cSat Nov  3 
22:12:21 2018(r340105)
+++ head/contrib/netbsd-tests/lib/libc/time/t_strptime.cSat Nov  3 
23:37:13 2018(r340106)
@@ -331,8 +331,19 @@ ATF_TC_BODY(hour, tc)
 
h_fail("00", "%I");
h_fail("13", "%I");
+
 #ifdef __FreeBSD__
-   h_fail("00", "%l");
+   h_pass("0", "%k", 1, -1, -1, 0, -1, -1, -1, -1, -1);
+   h_pass("04", "%k", 2, -1, -1, 4, -1, -1, -1, -1, -1);
+   h_pass(" 8", "%k", 2, -1, -1, 8, -1, -1, -1, -1, -1);
+   h_pass("23", "%k", 2, -1, -1, 23, -1, -1, -1, -1, -1);
+   h_fail("24", "%k");
+
+   h_fail("0", "%l");
+   h_pass("1", "%l", 1, -1, -1, 1, -1, -1, -1, -1, -1);
+   h_pass("05", "%l", 2, -1, -1, 5, -1, -1, -1, -1, -1);
+   h_pass(" 9", "%l", 2, -1, -1, 9, -1, -1, -1, -1, -1);
+   h_pass("12", "%l", 2, -1, -1, 12, -1, -1, -1, -1, -1);
h_fail("13", "%l");
 #endif
 

Modified: head/lib/libc/stdtime/strptime.c
==
--- head/lib/libc/stdtime/strptime.cSat Nov  3 22:12:21 2018
(r340105)
+++ head/lib/libc/stdtime/strptime.cSat Nov  3 23:37:13 2018
(r340106)
@@ -272,17 +272,24 @@ label:
case 'k':
case 'l':
/*
-* Of these, %l is the only specifier explicitly
-* documented as not being zero-padded.  However,
-* there is no harm in allowing zero-padding.
+* %k and %l specifiers are documented as being
+* blank-padded.  However, there is no harm in
+* allowing zero-padding.
 *
-* XXX The %l specifier may gobble one too many
+* XXX %k and %l specifiers may gobble one too many
 * digits if used incorrectly.
 */
+
+   len = 2;
+   if ((c == 'k' || c == 'l') &&
+   isblank_l((unsigned char)*buf, locale)) {
+   buf++;
+   len = 1;
+   }
+
if (!isdigit_l((unsigned char)*buf, locale))
return (NULL);
 
-   len = 2;
for (i = 0; len && *buf != 0 &&
 isdigit_l((unsigned char)*buf, locale); buf++) {
i *= 10;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r340104 - in head: share/colldef share/ctypedef share/monetdef share/numericdef tools/tools/locale tools/tools/locale/etc tools/tools/locale/etc/final-maps

2018-11-03 Thread Yuri Pankov
Author: yuripv
Date: Sat Nov  3 22:02:10 2018
New Revision: 340104
URL: https://svnweb.freebsd.org/changeset/base/340104

Log:
  Update to CLDR 34 and UNICODE 11.
  
  Discussed with:   bapt
  Approved by:  kib (mentor)
  MFC after:1 month

Added:
  head/share/monetdef/fr_FR.UTF-8.src   (contents, props changed)
  head/share/monetdef/it_IT.ISO8859-15.src
 - copied, changed from r340103, head/share/monetdef/de_AT.ISO8859-15.src
  head/share/monetdef/it_IT.UTF-8.src
 - copied, changed from r340103, head/share/monetdef/de_AT.UTF-8.src
  head/share/monetdef/nl_BE.ISO8859-1.src
 - copied unchanged from r340103, head/share/monetdef/de_AT.ISO8859-1.src
  head/share/numericdef/fr_FR.UTF-8.src   (contents, props changed)
Deleted:
  head/share/monetdef/de_AT.ISO8859-1.src
  head/share/monetdef/de_AT.ISO8859-15.src
  head/share/monetdef/de_AT.UTF-8.src
Modified:
  head/share/colldef/af_ZA.UTF-8.src
  head/share/colldef/am_ET.UTF-8.src
  head/share/colldef/ar_SA.UTF-8.src
  head/share/colldef/be_BY.UTF-8.src
  head/share/colldef/ca_AD.UTF-8.src
  head/share/colldef/cs_CZ.ISO8859-2.src
  head/share/colldef/cs_CZ.UTF-8.src
  head/share/colldef/da_DK.ISO8859-1.src
  head/share/colldef/da_DK.ISO8859-15.src
  head/share/colldef/da_DK.UTF-8.src
  head/share/colldef/el_GR.UTF-8.src
  head/share/colldef/en_US.UTF-8.src
  head/share/colldef/es_MX.UTF-8.src
  head/share/colldef/et_EE.UTF-8.src
  head/share/colldef/fi_FI.UTF-8.src
  head/share/colldef/fr_CA.UTF-8.src
  head/share/colldef/he_IL.UTF-8.src
  head/share/colldef/hi_IN.UTF-8.src
  head/share/colldef/hr_HR.ISO8859-2.src
  head/share/colldef/hu_HU.ISO8859-2.src
  head/share/colldef/hu_HU.UTF-8.src
  head/share/colldef/hy_AM.UTF-8.src
  head/share/colldef/is_IS.UTF-8.src
  head/share/colldef/ja_JP.UTF-8.src
  head/share/colldef/ja_JP.eucJP.src
  head/share/colldef/kk_KZ.UTF-8.src
  head/share/colldef/ko_KR.UTF-8.src
  head/share/colldef/lt_LT.UTF-8.src
  head/share/colldef/lv_LV.UTF-8.src
  head/share/colldef/nb_NO.ISO8859-1.src
  head/share/colldef/nb_NO.ISO8859-15.src
  head/share/colldef/nn_NO.ISO8859-1.src
  head/share/colldef/nn_NO.ISO8859-15.src
  head/share/colldef/nn_NO.UTF-8.src
  head/share/colldef/pl_PL.UTF-8.src
  head/share/colldef/ro_RO.UTF-8.src
  head/share/colldef/ru_RU.UTF-8.src
  head/share/colldef/se_NO.UTF-8.src
  head/share/colldef/sk_SK.ISO8859-2.src
  head/share/colldef/sk_SK.UTF-8.src
  head/share/colldef/sl_SI.UTF-8.src
  head/share/colldef/sr_RS.ISO8859-2.src
  head/share/colldef/sr_RS.ISO8859-5.src
  head/share/colldef/sr_RS.UTF-8.src
  head/share/colldef/sr_rs.ut...@latin.src
  head/share/colldef/sv_SE.UTF-8.src
  head/share/colldef/tr_TR.UTF-8.src
  head/share/colldef/uk_UA.UTF-8.src
  head/share/colldef/zh_CN.GB18030.src
  head/share/colldef/zh_CN.GB2312.src
  head/share/colldef/zh_CN.GBK.src
  head/share/colldef/zh_CN.UTF-8.src
  head/share/colldef/zh_CN.eucCN.src
  head/share/colldef/zh_TW.Big5.src
  head/share/colldef/zh_TW.UTF-8.src
  head/share/ctypedef/Makefile
  head/share/ctypedef/ca_IT.ISO8859-1.src
  head/share/ctypedef/en_US.ISO8859-1.src
  head/share/ctypedef/hi_IN.ISCII-DEV.src
  head/share/ctypedef/hy_AM.ARMSCII-8.src
  head/share/ctypedef/ja_JP.eucJP.src
  head/share/ctypedef/zh_CN.eucCN.src
  head/share/monetdef/Makefile
  head/share/monetdef/fr_CH.UTF-8.src
  head/share/monetdef/hy_AM.ARMSCII-8.src
  head/share/monetdef/hy_AM.UTF-8.src
  head/share/monetdef/mn_MN.UTF-8.src
  head/share/monetdef/nl_BE.ISO8859-15.src
  head/share/monetdef/nl_BE.UTF-8.src
  head/share/numericdef/Makefile
  head/tools/tools/locale/Makefile
  head/tools/tools/locale/etc/charmaps.xml
  head/tools/tools/locale/etc/final-maps/map.UTF-8

Modified: head/share/colldef/af_ZA.UTF-8.src
==
--- head/share/colldef/af_ZA.UTF-8.src  Sat Nov  3 21:59:52 2018
(r340103)
+++ head/share/colldef/af_ZA.UTF-8.src  Sat Nov  3 22:02:10 2018
(r340104)
@@ -60,6 +60,7 @@ collating-symbol 
 collating-symbol 
 collating-symbol 
 collating-symbol 
+collating-symbol 
 collating-symbol 
 collating-symbol 
 collating-symbol 
@@ -70,431 +71,433 @@ collating-symbol 
 collating-symbol 
 collating-symbol 
 collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
 collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
 collating-symbol 
 

svn commit: r339956 - head/cddl/contrib/opensolaris/cmd/dtrace

2018-10-31 Thread Yuri Pankov
Author: yuripv
Date: Wed Oct 31 15:29:26 2018
New Revision: 339956
URL: https://svnweb.freebsd.org/changeset/base/339956

Log:
  dtrace(1): remove reference to dtruss that was removed from base
  system in r300226.
  
  PR:   211618
  Reviewed by:  gnn, markj, 0mp
  Approved by:  kib (mentor, implicit)
  Differential Revision:https://reviews.freebsd.org/D17762

Modified:
  head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1
==
--- head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1   Wed Oct 31 15:04:41 
2018(r339955)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1   Wed Oct 31 15:29:26 
2018(r339956)
@@ -20,7 +20,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 16, 2018
+.Dd October 30, 2018
 .Dt DTRACE 1
 .Os
 .Sh NAME
@@ -778,7 +778,6 @@ Invalid command line options or arguments were specifi
 .El
 .Sh SEE ALSO
 .Xr cpp 1 ,
-.Xr dtruss 1 ,
 .Xr elf 5 ,
 .Xr SDT 9
 .Rs
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r339955 - head/usr.bin/sed/tests/regress.multitest.out

2018-10-31 Thread Yuri Pankov
Author: yuripv
Date: Wed Oct 31 15:04:41 2018
New Revision: 339955
URL: https://svnweb.freebsd.org/changeset/base/339955

Log:
  usr.bin/sed/tests: fix one of the regression test cases by adding its
  results file to the build.
  
  Reviewed by:  kevans
  Approved by:  kib (mentor, implicit)
  Differential Revision:https://reviews.freebsd.org/D17776

Modified:
  head/usr.bin/sed/tests/regress.multitest.out/Makefile

Modified: head/usr.bin/sed/tests/regress.multitest.out/Makefile
==
--- head/usr.bin/sed/tests/regress.multitest.out/Makefile   Wed Oct 31 
14:19:58 2018(r339954)
+++ head/usr.bin/sed/tests/regress.multitest.out/Makefile   Wed Oct 31 
15:04:41 2018(r339955)
@@ -38,6 +38,7 @@ ${PACKAGE}FILES+= 2.2
 ${PACKAGE}FILES+=  2.20
 ${PACKAGE}FILES+=  2.21
 ${PACKAGE}FILES+=  2.22
+${PACKAGE}FILES+=  2.23
 ${PACKAGE}FILES+=  2.3
 ${PACKAGE}FILES+=  2.4
 ${PACKAGE}FILES+=  2.5
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r339904 - in head: contrib/netbsd-tests/lib/libc/time lib/libc/tests

2018-10-29 Thread Yuri Pankov
Author: yuripv
Date: Tue Oct 30 02:37:23 2018
New Revision: 339904
URL: https://svnweb.freebsd.org/changeset/base/339904

Log:
  Connect libc/tests/time to the build, adding test cases for strptime()
  issues fixed recently, and disabling the failing ones (mostly due to TZ
  parsing differences with NetBSD).
  
  Reviewed by:  ngie
  Approved by:  kib (mentor)
  Differential Revision:https://reviews.freebsd.org/D17546

Modified:
  head/contrib/netbsd-tests/lib/libc/time/t_mktime.c
  head/contrib/netbsd-tests/lib/libc/time/t_strptime.c
  head/lib/libc/tests/Makefile

Modified: head/contrib/netbsd-tests/lib/libc/time/t_mktime.c
==
--- head/contrib/netbsd-tests/lib/libc/time/t_mktime.c  Tue Oct 30 01:39:22 
2018(r339903)
+++ head/contrib/netbsd-tests/lib/libc/time/t_mktime.c  Tue Oct 30 02:37:23 
2018(r339904)
@@ -64,6 +64,9 @@ ATF_TC_HEAD(mktime_negyear, tc)
 
 ATF_TC_BODY(mktime_negyear, tc)
 {
+#ifdef __FreeBSD__
+   atf_tc_expect_fail("needs work");
+#endif
struct tm tms;
time_t t;
 

Modified: head/contrib/netbsd-tests/lib/libc/time/t_strptime.c
==
--- head/contrib/netbsd-tests/lib/libc/time/t_strptime.cTue Oct 30 
01:39:22 2018(r339903)
+++ head/contrib/netbsd-tests/lib/libc/time/t_strptime.cTue Oct 30 
02:37:23 2018(r339904)
@@ -103,6 +103,7 @@ static struct {
const char *name;
long offs;
 } zt[] = {
+#ifndef __FreeBSD__
{ "Z",  0 },
{ "UT", 0 },
{ "UTC",0 },
@@ -173,6 +174,7 @@ static struct {
{ "EST4EDT",-14400 },
 
{ "Bogus",  -1 },
+#endif
 };
 
 static void
@@ -188,9 +190,11 @@ ztest1(const char *name, const char *fmt, long value)
value = 0;
 
switch (value) {
+#ifndef __FreeBSD__
case -2:
value = -timezone;
break;
+#endif
case -1:
if (fmt[1] == 'Z')
value = 0;
@@ -210,9 +214,11 @@ static void
 ztest(const char *fmt)
 {
setenv("TZ", "US/Eastern", 1);
+#ifndef __FreeBSD__
ztest1("GMT", fmt, 0);
ztest1("UTC", fmt, 0);
ztest1("US/Eastern", fmt, -18000);
+#endif
for (size_t i = 0; i < __arraycount(zt); i++)
ztest1(zt[i].name, fmt, zt[i].offs);
 }
@@ -228,10 +234,6 @@ ATF_TC_HEAD(common, tc)
 ATF_TC_BODY(common, tc)
 {
 
-#ifdef __FreeBSD__
-   atf_tc_expect_fail("There are various issues with strptime on FreeBSD");
-#endif
-
h_pass("Tue Jan 20 23:27:46 1998", "%a %b %d %T %Y",
24, 46, 27, 23, 20, 0, 98, 2, 19);
h_pass("Tue Jan 20 23:27:46 1998", "%a %b %d %H:%M:%S %Y",
@@ -305,6 +307,10 @@ ATF_TC_BODY(day, tc)
 #else
h_pass("SaturDay", "%OA", 8, -1, -1, -1, -1, -1, -1, 6, -1);
 #endif
+
+#ifdef __FreeBSD__
+   h_fail("00", "%d");
+#endif
 }
 
 ATF_TC(hour);
@@ -313,7 +319,11 @@ ATF_TC_HEAD(hour, tc)
 {
 
atf_tc_set_md_var(tc, "descr",
+#ifdef __FreeBSD__
+ "Checks strptime(3) hour conversions [HIkl]");
+#else
  "Checks strptime(3) hour conversions [IH]");
+#endif
 }
 
 ATF_TC_BODY(hour, tc)
@@ -321,6 +331,10 @@ ATF_TC_BODY(hour, tc)
 
h_fail("00", "%I");
h_fail("13", "%I");
+#ifdef __FreeBSD__
+   h_fail("00", "%l");
+   h_fail("13", "%l");
+#endif
 
h_pass("00", "%H", 2, -1, -1, 0, -1, -1, -1, -1, -1);
h_pass("12", "%H", 2, -1, -1, 12, -1, -1, -1, -1, -1);
@@ -413,7 +427,18 @@ ATF_TC_BODY(seconds, tc)
h_pass("0", "%S", 1, 0, -1, -1, -1, -1, -1, -1, -1);
h_pass("59", "%S", 2, 59, -1, -1, -1, -1, -1, -1, -1);
h_pass("60", "%S", 2, 60, -1, -1, -1, -1, -1, -1, -1);
+#ifdef __FreeBSD__
+   /*
+* (Much) older versions of the standard (up to the Issue 6) allowed for
+* [0;61] range in %S conversion for double-leap seconds, and it's
+* apparently what NetBSD and glibc are expecting, however current
+* version defines allowed values to be [0;60], and that is what our
+* strptime() implementation expects.
+*/
+   h_fail("61", "%S");
+#else
h_pass("61", "%S", 2, 61, -1, -1, -1, -1, -1, -1, -1);
+#endif
h_fail("62", "%S");
 }
 
@@ -434,7 +459,9 @@ ATF_TC_BODY(year, tc)
h_pass("x2084y", "x%C%yy", 6, -1, -1, -1, -1, -1, 184, -1, -1);
h_pass("x8420y", "x%y%Cy", 6, -1, -1, -1, -1, -1, 184, -1, -1);
h_pass("%20845", "%%%C%y5", 6, -1, -1, -1, -1, -1, 184, -1, -1);
+#ifndef __FreeBSD__
h_fail("%", "%E%");
+#endif
 
h_pass("1980", "%Y", 4, -1, -1, -1, -1, -1, 80, -1, -1);
h_pass("1980", "%EY", 4, -1, -1, -1, -1, -1, 80, -1, -1);
@@ -467,7 +494,7 @@ ATF_TC_HEAD(Zone, tc)
 
 

Re: svn commit: r339826 - in head: sys/amd64/vmm/intel usr.sbin/bhyve

2018-10-29 Thread Yuri Pankov
John Baldwin wrote:
> On 10/27/18 2:24 PM, Yuri Pankov wrote:
>> Author: yuripv
>> Date: Sat Oct 27 21:24:28 2018
>> New Revision: 339826
>> URL: https://svnweb.freebsd.org/changeset/base/339826
>>
>> Log:
>>   Provide basic descriptions for VMX exit reason (from "Intel 64 and IA-32
>>   Architectures Software Developer’s Manual Volume 3").  Add the document
>>   to SEE ALSO in bhyve.8 (and pet manlint here a bit).
>>   
>>   Reviewed by:   jhb, rgrimes, 0mp
>>   Approved by:   kib (mentor)
>>   Differential Revision: https://reviews.freebsd.org/D17531
> 
> I did ask you to commit the bhyve.8 style fixes separately from the content
> changes in the review.  While it is true we don't currently have active
> translations of manpages, it is still a good practice to follow to not mix
> style changes with content changes even in code commits as it obfuscates
> the content changes.

Understood, will do.  I just (incorrectly) assumed your review approval
to be "go ahead with this one, but next time don't mix content changes
and cleanups", sorry about that.



signature.asc
Description: OpenPGP digital signature


svn commit: r339827 - head/usr.bin/localedef

2018-10-27 Thread Yuri Pankov
Author: yuripv
Date: Sat Oct 27 23:31:42 2018
New Revision: 339827
URL: https://svnweb.freebsd.org/changeset/base/339827

Log:
  localedef: define characters in "space" class also as "print", except
  for the known conflicts ("control" characters can't be "print"able).
  POSIX doesn't explicitly forbid this, and actually includes 
  character in "print".
  
  PR:   225692
  Reviewed by:  bapt, cem (previous version), pfg (previous version)
  Approved by:  kib (mentor)
  Differential Revision:https://reviews.freebsd.org/D17467

Modified:
  head/usr.bin/localedef/ctype.c

Modified: head/usr.bin/localedef/ctype.c
==
--- head/usr.bin/localedef/ctype.c  Sat Oct 27 21:24:28 2018
(r339826)
+++ head/usr.bin/localedef/ctype.c  Sat Oct 27 23:31:42 2018
(r339827)
@@ -120,7 +120,13 @@ add_ctype_impl(ctype_node_t *ctn)
ctn->ctype |= (_ISDIGIT | _ISGRAPH | _ISPRINT | _ISXDIGIT | 
_E4);
break;
case T_ISSPACE:
-   ctn->ctype |= _ISSPACE;
+   /*
+* This can be troublesome as , ,
+* , , and  are defined both
+* as space and cntrl, and POSIX doesn't allow cntrl/print
+* combination.  We will take care of this in dump_ctype().
+*/
+   ctn->ctype |= (_ISSPACE | _ISPRINT);
break;
case T_ISCNTRL:
ctn->ctype |= _ISCNTRL;
@@ -378,9 +384,15 @@ dump_ctype(void)
ctn->ctype |= _ISPRINT;
 
/*
-* Finally, POSIX requires that certain combinations
-* are invalid.  We don't flag this as a fatal error,
-* but we will warn about.
+* POSIX requires that certain combinations are invalid.
+* Try fixing the cases we know about (see add_ctype_impl()).
+*/
+   if ((ctn->ctype & (_ISSPACE|_ISCNTRL)) == (_ISSPACE|_ISCNTRL))
+   ctn->ctype &= ~_ISPRINT;
+
+   /*
+* Finally, don't flag remaining cases as a fatal error,
+* and just warn about them.
 */
if ((ctn->ctype & _ISALPHA) &&
(ctn->ctype & (_ISPUNCT|_ISDIGIT)))
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r339826 - in head: sys/amd64/vmm/intel usr.sbin/bhyve

2018-10-27 Thread Yuri Pankov
Author: yuripv
Date: Sat Oct 27 21:24:28 2018
New Revision: 339826
URL: https://svnweb.freebsd.org/changeset/base/339826

Log:
  Provide basic descriptions for VMX exit reason (from "Intel 64 and IA-32
  Architectures Software Developer’s Manual Volume 3").  Add the document
  to SEE ALSO in bhyve.8 (and pet manlint here a bit).
  
  Reviewed by:  jhb, rgrimes, 0mp
  Approved by:  kib (mentor)
  Differential Revision:https://reviews.freebsd.org/D17531

Modified:
  head/sys/amd64/vmm/intel/vmcs.h
  head/usr.sbin/bhyve/bhyve.8
  head/usr.sbin/bhyve/bhyverun.c

Modified: head/sys/amd64/vmm/intel/vmcs.h
==
--- head/sys/amd64/vmm/intel/vmcs.h Sat Oct 27 21:17:01 2018
(r339825)
+++ head/sys/amd64/vmm/intel/vmcs.h Sat Oct 27 21:24:28 2018
(r339826)
@@ -338,6 +338,14 @@ vmcs_write(uint32_t encoding, uint64_t val)
 #define EXIT_REASON_WBINVD 54
 #define EXIT_REASON_XSETBV 55
 #defineEXIT_REASON_APIC_WRITE  56
+#defineEXIT_REASON_RDRAND  57
+#defineEXIT_REASON_INVPCID 58
+#defineEXIT_REASON_VMFUNC  59
+#defineEXIT_REASON_ENCLS   60
+#defineEXIT_REASON_RDSEED  61
+#defineEXIT_REASON_PM_LOG_FULL 62
+#defineEXIT_REASON_XSAVES  63
+#defineEXIT_REASON_XRSTORS 64
 
 /*
  * NMI unblocking due to IRET.

Modified: head/usr.sbin/bhyve/bhyve.8
==
--- head/usr.sbin/bhyve/bhyve.8 Sat Oct 27 21:17:01 2018(r339825)
+++ head/usr.sbin/bhyve/bhyve.8 Sat Oct 27 21:24:28 2018(r339826)
@@ -367,7 +367,11 @@ Emergency write is advertised, but no-op at present.
 .Pp
 Framebuffer devices:
 .Bl -tag -width 10n
-.It Oo rfb= Ns Oo Ar IP: Oc Ns Ar port Oc Ns Oo ,w= Ns Ar width Oc Ns Oo ,h= 
Ns Ar height Oc Ns Oo ,vga= Ns Ar vgaconf Oc Ns Oo Ns ,wait Oc Ns Oo ,password= 
Ns Ar password Oc
+.It Xo
+.Oo rfb= Ns Oo Ar IP\&: Oc Ns Ar port Oc Ns Oo ,w= Ns Ar width Oc Ns Oo ,h= Ns
+.Ar height Oc Ns Oo ,vga= Ns Ar vgaconf Oc Ns Oo Ns ,wait Oc Ns Oo ,password= 
Ns
+.Ar password Oc
+.Xc
 .Bl -tag -width 8n
 .It Ar IPv4:port No or Ar [IPv6%zone]:port
 An
@@ -398,8 +402,8 @@ and memory space
 .Pq 64KB at Ad 0xA .
 The default
 .Dq io
-option should be used for guests that attempt to issue BIOS
-calls which result in I/O port queries, and fail to boot if I/O decode is 
disabled.
+option should be used for guests that attempt to issue BIOS calls which result
+in I/O port queries, and fail to boot if I/O decode is disabled.
 .Pp
 The
 .Dq on
@@ -424,8 +428,8 @@ for configuration notes of particular guests.
 .It wait
 Instruct
 .Nm
-to only boot upon the initiation of a VNC connection, simplifying the 
installation
-of operating systems that require immediate keyboard input.
+to only boot upon the initiation of a VNC connection, simplifying the
+installation of operating systems that require immediate keyboard input.
 This can be removed for post-installation use.
 .It password
 This type of authentication is known to be cryptographically weak and is not
@@ -497,8 +501,9 @@ General purpose registers can be queried for each virt
 registers such as floating-point and system registers cannot be queried.
 .Ss Memory
 Memory (including memory mapped I/O regions) can be read by the debugger,
-but not written.  Memory operations use virtual addresses that are resolved
-to physical addresses via the current virtual CPU's active address translation.
+but not written.
+Memory operations use virtual addresses that are resolved to physical addresses
+via the current virtual CPU's active address translation.
 .Ss Control
 The running guest can be interrupted by the debugger at any time
 .Pq for example, by pressing Ctrl-C in the debugger .
@@ -609,6 +614,12 @@ bhyve -c 2 -m 4G -w -H \\
 .Xr ethers 5 ,
 .Xr bhyvectl 8 ,
 .Xr bhyveload 8
+.Pp
+.Rs
+.%A Intel
+.%B 64 and IA-32 Architectures Software Developer’s Manual
+.%V Volume 3
+.Re
 .Sh HISTORY
 .Nm
 first appeared in

Modified: head/usr.sbin/bhyve/bhyverun.c
==
--- head/usr.sbin/bhyve/bhyverun.c  Sat Oct 27 21:17:01 2018
(r339825)
+++ head/usr.sbin/bhyve/bhyverun.c  Sat Oct 27 21:24:28 2018
(r339826)
@@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 
@@ -89,6 +91,73 @@ __FBSDID("$FreeBSD$");
 #define MB (1024UL * 1024)
 #define GB (1024UL * MB)
 
+static const char * const vmx_exit_reason_desc[] = {
+   [EXIT_REASON_EXCEPTION] = "Exception or non-maskable interrupt (NMI)",
+   [EXIT_REASON_EXT_INTR] = "External interrupt",
+   [EXIT_REASON_TRIPLE_FAULT] = "Triple fault",
+   [EXIT_REASON_INIT] = "INIT signal",
+   [EXIT_REASON_SIPI] = 

svn commit: r339534 - in head/usr.sbin/pw: . tests

2018-10-21 Thread Yuri Pankov
Author: yuripv
Date: Sun Oct 21 14:23:56 2018
New Revision: 339534
URL: https://svnweb.freebsd.org/changeset/base/339534

Log:
  pw: fix the checks in boolean_str() after r326738.  Add related test
  cases for `pw useradd -D -w`.
  
  PR:   231649
  Reviewed by:  eugen
  Approved by:  kib (mentor)
  Differential Revision:https://reviews.freebsd.org/D17299

Modified:
  head/usr.sbin/pw/pw_conf.c
  head/usr.sbin/pw/tests/pw_useradd_test.sh

Modified: head/usr.sbin/pw/pw_conf.c
==
--- head/usr.sbin/pw/pw_conf.c  Sun Oct 21 14:19:16 2018(r339533)
+++ head/usr.sbin/pw/pw_conf.c  Sun Oct 21 14:23:56 2018(r339534)
@@ -221,12 +221,14 @@ passwd_val(char const * str, int dflt)
 char const *
 boolean_str(int val)
 {
-   if (val == -1)
-   return "random";
-   else if (val == -2)
-   return "none";
+   if (val == P_NO)
+   return (boolfalse[0]);
+   else if (val == P_RANDOM)
+   return ("random");
+   else if (val == P_NONE)
+   return ("none");
else
-   return val ? booltrue[0] : boolfalse[0];
+   return (booltrue[0]);
 }
 
 char   *

Modified: head/usr.sbin/pw/tests/pw_useradd_test.sh
==
--- head/usr.sbin/pw/tests/pw_useradd_test.sh   Sun Oct 21 14:19:16 2018
(r339533)
+++ head/usr.sbin/pw/tests/pw_useradd_test.sh   Sun Oct 21 14:23:56 2018
(r339534)
@@ -421,6 +421,7 @@ user_add_with_pw_conf_body()
atf_check -s exit:0 \
${PW} useradd foo -C ${HOME}/pw.conf
 }
+
 atf_test_case user_add_defaultgroup
 user_add_defaultgroup_body()
 {
@@ -435,6 +436,25 @@ user_add_defaultgroup_body()
${PW} usershow foo
 }
 
+atf_test_case user_add_conf_defaultpasswd
+user_add_conf_defaultpasswd_body()
+{
+   populate_etc_skel
+
+   atf_check -s exit:0 ${PW} useradd -D -w no
+   atf_check -o inline:"defaultpasswd = \"no\"\n" \
+   grep defaultpasswd ${HOME}/pw.conf
+   atf_check -s exit:0 ${PW} useradd -D -w none
+   atf_check -o inline:"defaultpasswd = \"none\"\n" \
+   grep defaultpasswd ${HOME}/pw.conf
+   atf_check -s exit:0 ${PW} useradd -D -w random
+   atf_check -o inline:"defaultpasswd = \"random\"\n" \
+   grep defaultpasswd ${HOME}/pw.conf
+   atf_check -s exit:0 ${PW} useradd -D -w yes
+   atf_check -o inline:"defaultpasswd = \"yes\"\n" \
+   grep defaultpasswd ${HOME}/pw.conf
+}
+
 atf_init_test_cases() {
atf_add_test_case user_add
atf_add_test_case user_add_noupdate
@@ -472,4 +492,6 @@ atf_init_test_cases() {
atf_add_test_case user_add_w_yes
atf_add_test_case user_add_with_pw_conf
atf_add_test_case user_add_defaultgroup
+
+   atf_add_test_case user_add_conf_defaultpasswd
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r339489 - in head: lib/libc/locale share/colldef share/ctypedef share/mk targets/pseudo/userland tools/tools/locale/tools usr.bin/localedef

2018-10-20 Thread Yuri Pankov
Author: yuripv
Date: Sat Oct 20 20:51:05 2018
New Revision: 339489
URL: https://svnweb.freebsd.org/changeset/base/339489

Log:
  Add -b/-l options to localedef(1) to specify output endianness and use
  it appropriately when building share/ctypedef and share/colldef.
  
  This makes the resulting locale data in EL->EB (amd64->powerpc64) cross
  build and in the native EB build match.  Revert the changes done to libc
  in r308170 as they are no longer needed.
  
  PR:   231965
  Reviewed by:  bapt, emaste, sbruno, 0mp
  Approved by:  kib (mentor)
  Differential Revision:https://reviews.freebsd.org/D17603

Deleted:
  head/lib/libc/locale/endian.h
Modified:
  head/lib/libc/locale/collate.c
  head/lib/libc/locale/rune.c
  head/share/colldef/Makefile
  head/share/ctypedef/Makefile
  head/share/mk/bsd.endian.mk
  head/targets/pseudo/userland/Makefile.depend
  head/tools/tools/locale/tools/cldr2def.pl
  head/usr.bin/localedef/collate.c
  head/usr.bin/localedef/ctype.c
  head/usr.bin/localedef/localedef.1
  head/usr.bin/localedef/localedef.c
  head/usr.bin/localedef/localedef.h

Modified: head/lib/libc/locale/collate.c
==
--- head/lib/libc/locale/collate.c  Sat Oct 20 20:49:46 2018
(r339488)
+++ head/lib/libc/locale/collate.c  Sat Oct 20 20:51:05 2018
(r339489)
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include "un-namespace.h"
 
-#include "endian.h"
 #include "collate.h"
 #include "setlocale.h"
 #include "ldpart.h"
@@ -162,7 +161,7 @@ __collate_load_tables_l(const char *encoding, struct x
 
if ((info->directive_count < 1) ||
(info->directive_count >= COLL_WEIGHTS_MAX) ||
-   ((chains = BSWAP(info->chain_count)) < 0)) {
+   ((chains = info->chain_count) < 0)) {
(void) munmap(map, sbuf.st_size);
errno = EINVAL;
return (_LDP_ERROR);
@@ -170,9 +169,9 @@ __collate_load_tables_l(const char *encoding, struct x
 
i = (sizeof (collate_char_t) * (UCHAR_MAX + 1)) +
(sizeof (collate_chain_t) * chains) +
-   (sizeof (collate_large_t) * BSWAP(info->large_count));
+   (sizeof (collate_large_t) * info->large_count);
for (z = 0; z < info->directive_count; z++) {
-   i += sizeof (collate_subst_t) * BSWAP(info->subst_count[z]);
+   i += sizeof (collate_subst_t) * info->subst_count[z];
}
if (i != (sbuf.st_size - (TMP - map))) {
(void) munmap(map, sbuf.st_size);
@@ -185,9 +184,9 @@ __collate_load_tables_l(const char *encoding, struct x
TMP += sizeof (collate_char_t) * (UCHAR_MAX + 1);
 
for (z = 0; z < info->directive_count; z++) {
-   if (BSWAP(info->subst_count[z]) > 0) {
+   if (info->subst_count[z] > 0) {
table->subst_table[z] = (void *)TMP;
-   TMP += BSWAP(info->subst_count[z]) * sizeof 
(collate_subst_t);
+   TMP += info->subst_count[z] * sizeof (collate_subst_t);
} else {
table->subst_table[z] = NULL;
}
@@ -198,7 +197,7 @@ __collate_load_tables_l(const char *encoding, struct x
TMP += chains * sizeof (collate_chain_t);
} else
table->chain_pri_table = NULL;
-   if (BSWAP(info->large_count) > 0)
+   if (info->large_count > 0)
table->large_pri_table = (void *)TMP;
else
table->large_pri_table = NULL;
@@ -211,7 +210,7 @@ static const int32_t *
 substsearch(struct xlocale_collate *table, const wchar_t key, int pass)
 {
const collate_subst_t *p;
-   int n = BSWAP(table->info->subst_count[pass]);
+   int n = table->info->subst_count[pass];
 
if (n == 0)
return (NULL);
@@ -223,7 +222,7 @@ substsearch(struct xlocale_collate *table, const wchar
return (NULL);
 
p = table->subst_table[pass] + (key & ~COLLATE_SUBST_PRIORITY);
-   assert(BSWAP(p->key) == key);
+   assert(p->key == key);
 
return (p->pri);
 }
@@ -232,7 +231,7 @@ static collate_chain_t *
 chainsearch(struct xlocale_collate *table, const wchar_t *key, int *len)
 {
int low = 0;
-   int high = BSWAP(table->info->chain_count) - 1;
+   int high = table->info->chain_count - 1;
int next, compar, l;
collate_chain_t *p;
collate_chain_t *tab = table->chain_pri_table;
@@ -243,7 +242,7 @@ chainsearch(struct xlocale_collate *table, const wchar
while (low <= high) {
next = (low + high) / 2;
p = tab + next;
-   compar = *key - le16toh(*p->str);
+   compar = *key - *p->str;
if (compar == 0) {
l = wcsnlen(p->str, COLLATE_STR_LEN);
compar = wcsncmp(key, p->str, l);
@@ -264,7 +263,7 @@ static 

svn commit: r339412 - head/share/timedef

2018-10-17 Thread Yuri Pankov
Author: yuripv
Date: Wed Oct 17 16:38:44 2018
New Revision: 339412
URL: https://svnweb.freebsd.org/changeset/base/339412

Log:
  Revert r315571 for share/timedef/ca_IT.ISO8859-15.src, ca_IT is Catalan
  in Italy, and is not related to Canada.
  
  While here, remove the header as we do NOT currently use CLDR data to
  generate timedef, and it's misleading.
  
  PR:   225855
  Reviewed by:  bapt
  Approved by:  re (gjb), kib (mentor)
  Differential Revision:https://reviews.freebsd.org/D17551

Modified:
  head/share/timedef/ca_IT.ISO8859-15.src

Modified: head/share/timedef/ca_IT.ISO8859-15.src
==
--- head/share/timedef/ca_IT.ISO8859-15.src Wed Oct 17 16:17:57 2018
(r339411)
+++ head/share/timedef/ca_IT.ISO8859-15.src Wed Oct 17 16:38:44 2018
(r339412)
@@ -1,7 +1,3 @@
-# Warning: Do not edit. This file is automatically generated from the
-# tools in /usr/src/tools/tools/locale. The data is obtained from the
-# CLDR project, obtained from http://cldr.unicode.org/
-# -
 #
 # Short month names
 gen.
@@ -53,7 +49,7 @@ dissabte
 %H:%M:%S
 #
 # x_fmt
-%Y-%m-%d
+%d/%m/%Y
 #
 # c_fmt
 %a %e %b %X %Y
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r339408 - head/lib/libc/stdtime

2018-10-17 Thread Yuri Pankov
Author: yuripv
Date: Wed Oct 17 14:51:43 2018
New Revision: 339408
URL: https://svnweb.freebsd.org/changeset/base/339408

Log:
  strptime: fix parsing of tm_year when both %C and %y appear in the
  format string in arbitrary order.  This makes the related test cases in
  lib/libc/tests/time (not yet connected to the build) pass.
  
  While here, don't error on negative tm_year value based on the
  APPLICATION USAGE in
  http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html
  (glibc does the same):
  
  tm_year is a signed value; therefore, years before 1900 may be represented.
  
  Approved by:  re (gjb), kib (mentor)
  Differential Revision:https://reviews.freebsd.org/D17550

Modified:
  head/lib/libc/stdtime/strptime.c

Modified: head/lib/libc/stdtime/strptime.c
==
--- head/lib/libc/stdtime/strptime.cWed Oct 17 10:31:08 2018
(r339407)
+++ head/lib/libc/stdtime/strptime.cWed Oct 17 14:51:43 2018
(r339408)
@@ -95,6 +95,7 @@ _strptime(const char *buf, const char *fmt, struct tm 
int i, len;
int flags;
int Ealternative, Oalternative;
+   int century, year;
const struct lc_time_T *tptr = __get_current_time_locale(locale);
static int start_of_month[2][13] = {
{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365},
@@ -102,6 +103,8 @@ _strptime(const char *buf, const char *fmt, struct tm 
};
 
flags = FLAG_NONE;
+   century = -1;
+   year = -1;
 
ptr = fmt;
while (*ptr != 0) {
@@ -146,10 +149,8 @@ label:
i += *buf - '0';
len--;
}
-   if (i < 19)
-   return (NULL);
 
-   tm->tm_year = i * 100 - TM_YEAR_BASE;
+   century = i;
flags |= FLAG_YEAR;
 
break;
@@ -527,13 +528,9 @@ label:
len--;
}
if (c == 'Y')
-   i -= TM_YEAR_BASE;
-   if (c == 'y' && i < 69)
-   i += 100;
-   if (i < 0)
-   return (NULL);
+   century = i / 100;
+   year = i % 100;
 
-   tm->tm_year = i;
flags |= FLAG_YEAR;
 
break;
@@ -609,6 +606,17 @@ label:
default:
return (NULL);
}
+   }
+
+   if (century != -1 || year != -1) {
+   if (year == -1)
+   year = 0;
+   if (century == -1) {
+   if (year < 69)
+   year += 100;
+   } else
+   year += century * 100 - TM_YEAR_BASE;
+   tm->tm_year = year;
}
 
if (!(flags & FLAG_YDAY) && (flags & FLAG_YEAR)) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r339385 - head/contrib/mandoc

2018-10-16 Thread Yuri Pankov
Author: yuripv
Date: Tue Oct 16 17:17:11 2018
New Revision: 339385
URL: https://svnweb.freebsd.org/changeset/base/339385

Log:
  apropos/whatis: use output of manpath(1) to set defpaths if -M is not
  specified.  This fixes searching the paths specified in
  /usr/local/etc/man.d/*.conf, as currently apropos/whatis from mandoc
  suite aren't aware about them.
  
  PR:   227922
  Reviewed by:  bapt
  Approved by:  re (gjb), kib (mentor)
  Differential Revision:https://reviews.freebsd.org/D17454

Modified:
  head/contrib/mandoc/main.c

Modified: head/contrib/mandoc/main.c
==
--- head/contrib/mandoc/main.c  Tue Oct 16 17:00:42 2018(r339384)
+++ head/contrib/mandoc/main.c  Tue Oct 16 17:17:11 2018(r339385)
@@ -248,7 +248,13 @@ main(int argc, char *argv[])
outmode = OUTMODE_ALL;
break;
case 'M':
+#ifdef __FreeBSD__
+   defpaths = strdup(optarg);
+   if (defpaths == NULL)
+   err(1, "strdup");
+#else
defpaths = optarg;
+#endif
break;
case 'm':
auxpaths = optarg;
@@ -380,9 +386,34 @@ main(int argc, char *argv[])
outmode == OUTMODE_ONE)
search.firstmatch = 1;
 
+#ifdef __FreeBSD__
+   /*
+* Use manpath(1) to populate defpaths if -M is not specified.
+* Don't treat any failures as fatal.
+*/
+   if (defpaths == NULL) {
+   FILE *fp;
+   size_t linecap = 0;
+   ssize_t linelen;
+
+   if ((fp = popen("/usr/bin/manpath -q", "r")) != NULL) {
+   if ((linelen = getline(,
+   , fp)) > 0) {
+   /* Strip trailing newline */
+   defpaths[linelen - 1] = '\0';
+   }
+   pclose(fp);
+   }
+   }
+#endif
+
/* Access the mandoc database. */
 
manconf_parse(, conf_file, defpaths, auxpaths);
+#ifdef __FreeBSD__
+   free(defpaths);
+#endif
+
if ( ! mansearch(, ,
argc, argv, , ))
usage(search.argmode);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r339380 - head/usr.sbin/pw

2018-10-16 Thread Yuri Pankov
Author: yuripv
Date: Tue Oct 16 16:00:41 2018
New Revision: 339380
URL: https://svnweb.freebsd.org/changeset/base/339380

Log:
  pw: (file == NULL) check is always false in read_userconfig(), remove
  it.  Drop the now unused _PATH_PW_CONF definition. [1]
  
  While here, change the last remaining hardcoded "/etc" to _PATH_PWD.
  
  Noted by: glebius [1]
  Reviewed by:  eugen
  Approved by:  re (gjb), kib (mentor)
  Differential Revision:https://reviews.freebsd.org/D17575

Modified:
  head/usr.sbin/pw/pw.c
  head/usr.sbin/pw/pw.h
  head/usr.sbin/pw/pw_conf.c

Modified: head/usr.sbin/pw/pw.c
==
--- head/usr.sbin/pw/pw.c   Tue Oct 16 15:57:16 2018(r339379)
+++ head/usr.sbin/pw/pw.c   Tue Oct 16 16:00:41 2018(r339380)
@@ -162,7 +162,8 @@ main(int argc, char *argv[])
PWF._altdir = PWF_ROOTDIR;
}
snprintf(conf.etcpath, sizeof(conf.etcpath),
-   "%s%s", optarg, arg == 'R' ? "/etc" : "");
+   "%s%s", optarg, arg == 'R' ?
+   _PATH_PWD : "");
} else
break;
}

Modified: head/usr.sbin/pw/pw.h
==
--- head/usr.sbin/pw/pw.h   Tue Oct 16 15:57:16 2018(r339379)
+++ head/usr.sbin/pw/pw.h   Tue Oct 16 16:00:41 2018(r339380)
@@ -65,7 +65,6 @@ enum _which
 
 #define_DEF_DIRMODE(S_IRWXU | S_IRWXG | S_IRWXO)
 #define_PW_CONF"pw.conf"
-#define _PATH_PW_CONF  "/etc/pw.conf"
 #define _UC_MAXLINE1024
 #define _UC_MAXSHELLS  32
 

Modified: head/usr.sbin/pw/pw_conf.c
==
--- head/usr.sbin/pw/pw_conf.c  Tue Oct 16 15:57:16 2018(r339379)
+++ head/usr.sbin/pw/pw_conf.c  Tue Oct 16 16:00:41 2018(r339380)
@@ -255,9 +255,6 @@ read_userconfig(char const * file)
buf = NULL;
linecap = 0;
 
-   if (file == NULL)
-   file = _PATH_PW_CONF;
-
if ((fp = fopen(file, "r")) == NULL)
return ();
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r339369 - head/usr.sbin/pw

2018-10-15 Thread Yuri Pankov
Author: yuripv
Date: Mon Oct 15 20:11:53 2018
New Revision: 339369
URL: https://svnweb.freebsd.org/changeset/base/339369

Log:
  pw: respect path specified using -V when writing pw.conf, and -C is not
  explicitly specified.  -V path is already used to determine which file
  to read default values from, so it's only logical to write them to the
  same file.
  
  PR:   231653
  Reviewed by:  eugen, bapt
  Approved by:  re (gjb), kib (mentor)
  Differential Revision:https://reviews.freebsd.org/D17566

Modified:
  head/usr.sbin/pw/pw.h
  head/usr.sbin/pw/pw_conf.c
  head/usr.sbin/pw/pw_utils.c

Modified: head/usr.sbin/pw/pw.h
==
--- head/usr.sbin/pw/pw.h   Mon Oct 15 19:48:36 2018(r339368)
+++ head/usr.sbin/pw/pw.h   Mon Oct 15 20:11:53 2018(r339369)
@@ -64,6 +64,7 @@ enum _which
 };
 
 #define_DEF_DIRMODE(S_IRWXU | S_IRWXG | S_IRWXO)
+#define_PW_CONF"pw.conf"
 #define _PATH_PW_CONF  "/etc/pw.conf"
 #define _UC_MAXLINE1024
 #define _UC_MAXSHELLS  32

Modified: head/usr.sbin/pw/pw_conf.c
==
--- head/usr.sbin/pw/pw_conf.c  Mon Oct 15 19:48:36 2018(r339368)
+++ head/usr.sbin/pw/pw_conf.c  Mon Oct 15 20:11:53 2018(r339369)
@@ -417,9 +417,13 @@ write_userconfig(struct userconf *cnf, const char *fil
int i, j;
struct sbuf *buf;
FILE   *fp;
+   charcfgfile[MAXPATHLEN];
 
-   if (file == NULL)
-   file = _PATH_PW_CONF;
+   if (file == NULL) {
+   snprintf(cfgfile, sizeof(cfgfile), "%s/" _PW_CONF,
+   conf.etcpath);
+   file = cfgfile;
+   }
 
if ((fd = open(file, O_CREAT|O_RDWR|O_TRUNC|O_EXLOCK, 0644)) == -1)
return (0);

Modified: head/usr.sbin/pw/pw_utils.c
==
--- head/usr.sbin/pw/pw_utils.c Mon Oct 15 19:48:36 2018(r339368)
+++ head/usr.sbin/pw/pw_utils.c Mon Oct 15 20:11:53 2018(r339369)
@@ -71,7 +71,7 @@ get_userconfig(const char *config)
 
if (config != NULL)
return (read_userconfig(config));
-   snprintf(defaultcfg, sizeof(defaultcfg), "%s/pw.conf", conf.etcpath);
+   snprintf(defaultcfg, sizeof(defaultcfg), "%s/" _PW_CONF, conf.etcpath);
return (read_userconfig(defaultcfg));
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r339346 - head/lib/libc/stdtime

2018-10-13 Thread Yuri Pankov
Author: yuripv
Date: Sat Oct 13 16:25:28 2018
New Revision: 339346
URL: https://svnweb.freebsd.org/changeset/base/339346

Log:
  strptime: disallow zero hour for %I (defined by POSIX as [01,12]) and %l
  (extension, defined in strftime(3) as 1-12).
  
  Approved by:  re (gjb), kib (mentor)
  Differential Revision:https://reviews.freebsd.org/D17543

Modified:
  head/lib/libc/stdtime/strptime.c

Modified: head/lib/libc/stdtime/strptime.c
==
--- head/lib/libc/stdtime/strptime.cSat Oct 13 03:12:57 2018
(r339345)
+++ head/lib/libc/stdtime/strptime.cSat Oct 13 16:25:28 2018
(r339346)
@@ -291,7 +291,7 @@ label:
if (c == 'H' || c == 'k') {
if (i > 23)
return (NULL);
-   } else if (i > 12)
+   } else if (i == 0 || i > 12)
return (NULL);
 
tm->tm_hour = i;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r339319 - head/sys/dev/ixgbe

2018-10-11 Thread Yuri Pankov
Author: yuripv
Date: Thu Oct 11 22:27:12 2018
New Revision: 339319
URL: https://svnweb.freebsd.org/changeset/base/339319

Log:
  Fix PNP entries for if_ix and if_ixv properly using the IFLIB_PNP_INFO()
  macro.
  
  Reviewed by:  imp, sbruno
  Approved by:  re (gjb), kib (mentor)
  Differential Revision:https://reviews.freebsd.org/D17473

Modified:
  head/sys/dev/ixgbe/if_ix.c
  head/sys/dev/ixgbe/if_ixv.c

Modified: head/sys/dev/ixgbe/if_ix.c
==
--- head/sys/dev/ixgbe/if_ix.c  Thu Oct 11 21:18:51 2018(r339318)
+++ head/sys/dev/ixgbe/if_ix.c  Thu Oct 11 22:27:12 2018(r339319)
@@ -237,9 +237,7 @@ static driver_t ix_driver = {
 
 devclass_t ix_devclass;
 DRIVER_MODULE(ix, pci, ix_driver, ix_devclass, 0, 0);
-MODULE_PNP_INFO("U16:vendor;U16:device", pci, ix, ixgbe_vendor_info_array,
-nitems(ixgbe_vendor_info_array) - 1);
-
+IFLIB_PNP_INFO(pci, ix_driver, ixgbe_vendor_info_array);
 MODULE_DEPEND(ix, pci, 1, 1, 1);
 MODULE_DEPEND(ix, ether, 1, 1, 1);
 MODULE_DEPEND(ix, iflib, 1, 1, 1);

Modified: head/sys/dev/ixgbe/if_ixv.c
==
--- head/sys/dev/ixgbe/if_ixv.c Thu Oct 11 21:18:51 2018(r339318)
+++ head/sys/dev/ixgbe/if_ixv.c Thu Oct 11 22:27:12 2018(r339319)
@@ -143,8 +143,7 @@ static driver_t ixv_driver = {
 
 devclass_t ixv_devclass;
 DRIVER_MODULE(ixv, pci, ixv_driver, ixv_devclass, 0, 0);
-MODULE_PNP_INFO("U16:vendor;U16:device", pci, ixv, ixv_vendor_info_array,
-nitems(ixv_vendor_info_array) - 1);
+IFLIB_PNP_INFO(pci, ixv_driver, ixv_vendor_info_array);
 MODULE_DEPEND(ixv, pci, 1, 1, 1);
 MODULE_DEPEND(ixv, ether, 1, 1, 1);
 #ifdef DEV_NETMAP
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r339318 - head/share/man/man9

2018-10-11 Thread Yuri Pankov
Author: yuripv
Date: Thu Oct 11 21:18:51 2018
New Revision: 339318
URL: https://svnweb.freebsd.org/changeset/base/339318

Log:
  MODULE_PNP_INFO(9): catch up with r338948, and remove the element size
  parameter from the man page.
  
  Reviewed by:  cem, imp
  Approved by:  re (gjb), kib (mentor)
  Differential Revision:https://reviews.freebsd.org/D17436

Modified:
  head/share/man/man9/MODULE_PNP_INFO.9

Modified: head/share/man/man9/MODULE_PNP_INFO.9
==
--- head/share/man/man9/MODULE_PNP_INFO.9   Thu Oct 11 20:44:25 2018
(r339317)
+++ head/share/man/man9/MODULE_PNP_INFO.9   Thu Oct 11 21:18:51 2018
(r339318)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 2, 2018
+.Dd October 5, 2018
 .Dt MODULE_PNP_INFO 9
 .Os
 .Sh NAME
@@ -38,7 +38,6 @@
 .Fa "bus"
 .Fa "module"
 .Fa "void *table"
-.Fa "size_t entry_len"
 .Fa "size_t num_entries"
 .Fc
 .\"
@@ -143,11 +142,6 @@ parameter points to the device matching data with entr
 .Fa descriptor_string .
 .Pp
 The
-.Fa entry_len
-parameter is the size of each table entry, i.e.,
-.Ql sizeof(table[0]) .
-.Pp
-The
 .Fa num_entries
 parameter is the number of entries in the table, i.e.,
 .Ql nitems(table) .
@@ -178,7 +172,7 @@ static struct my_pciids {
 };
 
 MODULE_PNP_INFO("W32:vendor/device;D:#", pci, my_driver, my_ids,
-sizeof(my_ids[0]), nitems(my_ids));
+nitems(my_ids));
 .Ed
 .It Sy Example 2\&: No Using T for common vendor value
 .Pp
@@ -198,7 +192,7 @@ static struct my_pciids {
 };
 
 MODULE_PNP_INFO("U16:device;D:#;T:vendor=0x1234", pci, my_driver,
-my_ids, sizeof(my_ids[0]), nitems(my_ids));
+my_ids, nitems(my_ids));
 .Ed
 .El
 .\"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r339313 - in head: share/ctypedef tools/tools/locale tools/tools/locale/etc

2018-10-11 Thread Yuri Pankov
Author: yuripv
Date: Thu Oct 11 18:30:12 2018
New Revision: 339313
URL: https://svnweb.freebsd.org/changeset/base/339313

Log:
  Restore some of the ctype definitions reported in the PR from pre-CLDR
  data, namely 0xE000-0xF8FF private use area, and 0xFF00-0xFFF half- and
  fullwidth punctuation.
  
  While here, update tools/tools/locale/README based on my experience
  rebuilding the locale data.
  
  PR:   225692
  Reviewed by:  bapt, cem (previous version)
  Approved by:  re (gjb), kib (mentor)
  Differential Revision:https://reviews.freebsd.org/D17471

Modified:
  head/share/ctypedef/en_US.UTF-8.src
  head/tools/tools/locale/README
  head/tools/tools/locale/etc/common.UTF-8.src
  head/tools/tools/locale/etc/manual-input.UTF-8

Modified: head/share/ctypedef/en_US.UTF-8.src
==
--- head/share/ctypedef/en_US.UTF-8.src Thu Oct 11 18:27:19 2018
(r339312)
+++ head/share/ctypedef/en_US.UTF-8.src Thu Oct 11 18:30:12 2018
(r339313)
@@ -6241,6 +6241,12 @@ graph;...;;...;
 
 **
+* 0xE000 - 0xF8FF Private Use Area (from pre-CLDR data)
+**
+
+graph  ;...;
+
+**
 * 0xFB50 - 0xFDFF Arabic Presentation Forms (differential)
 **
 
@@ -6277,6 +6283,17 @@ punct;...;
 **
 
 blank  
+
+**
+* 0xFF00 - 0x Half- and Fullwidth Punctuation (from pre-CLDR data)
+**
+
+punct  ;...;;/
+   ;...;;/
+   ;...;;/
+   ;...;;/
+   ;...;;/
+   ;...;
 
 **
 * 0x10300 - 0x1032F Old Italic

Modified: head/tools/tools/locale/README
==
--- head/tools/tools/locale/README  Thu Oct 11 18:27:19 2018
(r339312)
+++ head/tools/tools/locale/README  Thu Oct 11 18:30:12 2018
(r339313)
@@ -2,23 +2,37 @@
 
 To generate the locales:
 
-Tools needed: java, perl, devel/p5-Tie-IxHash, converters/p5-Text-Iconv and
-textproc/p5-XML-Parser
+Tools needed:
+   java (openjdk >= 8)
+   perl
+   converters/p5-Text-Iconv
+   devel/p5-Tie-IxHash
+   textproc/p5-XML-Parser
 
-fetch cldr data from: http://cldr.unicode.org
-extract in a directory ~/unicode/cldr/v30.0.3 for example
-fetch unidata from http://www.unicode.org/Public/zipped/ (latest version)
-extract in a directory ~/unicode/UNIDATA/9.0.0 for example
+Fetch CLDR data from: http://unicode.org/Public/cldr/.  You need all of the
+core.zip, keyboards.zip, and tools.zip.
 
-Note that the prebuilt cldr tools are not working on freebsd, it needs to
-be rebuilt:
-cd $CLDRDIR/tools/java
-ant build
+Extract:
+   mkdir -p ~/unicode/cldr/v33.0
+   cd ~/unicode/cldr/v33.0
+   unzip ~/core.zip ~/keyboards.zip ~/tools.zip
 
-either modify tools/tools/locales/etc/unicode.conf or export variables:
-CLDRDIR="~/unicode/cldr/v30.0.3"
-UNIDATADIR="~/unicode/UNIDATA/9.0.0"
+Fetch unidata (UCD.zip) from http://www.unicode.org/Public/zipped/latest.
 
-run:
-make POSIX
-make install
+Extract:
+   mkdir -p ~/unicode/UNIDATA/11.0.0
+   cd ~/unicode/UNIDATA/11.0.0
+   unzip ~/UCD.zip
+
+Either modify tools/tools/locales/etc/unicode.conf or export variables:
+   CLDRDIR=~/unicode/cldr/v33.0; export CLDRDIR
+   UNIDATADIR=~/unicode/UNIDATA/9.0.0; export UNIDATADIR
+
+Build the CLDR tools:
+   cd $CLDRDIR/tools/java
+   ant jar
+
+Run:
+   make POSIX
+   make
+   make install

Modified: head/tools/tools/locale/etc/common.UTF-8.src
==
--- head/tools/tools/locale/etc/common.UTF-8.srcThu Oct 11 18:27:19 
2018(r339312)
+++ head/tools/tools/locale/etc/common.UTF-8.srcThu Oct 11 18:30:12 
2018(r339313)
@@ -6241,6 +6241,12 @@ graph;...;;...;
 
 **
+* 0xE000 - 0xF8FF Private Use Area (from pre-CLDR data)
+**
+
+graph  ;...;
+
+**
 * 0xFB50 - 0xFDFF Arabic Presentation Forms (differential)
 **
 
@@ -6277,6 +6283,17 @@ punct;...;
 **
 
 blank  
+
+**
+* 0xFF00 - 0x Half- and Fullwidth 

svn commit: r339311 - head/tools/tools/locale/etc

2018-10-11 Thread Yuri Pankov
Author: yuripv
Date: Thu Oct 11 18:26:18 2018
New Revision: 339311
URL: https://svnweb.freebsd.org/changeset/base/339311

Log:
  Add fbsd:nokeywords to tools/tools/locale/etc/manual-input.UTF-8.
  
  Approved by:  re (gjb), kib (mentor)

Modified:
Directory Properties:
  head/tools/tools/locale/etc/manual-input.UTF-8   (props changed)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r339274 - in head: share/misc usr.bin/calendar/calendars

2018-10-09 Thread Yuri Pankov
Author: yuripv
Date: Wed Oct 10 00:20:40 2018
New Revision: 339274
URL: https://svnweb.freebsd.org/changeset/base/339274

Log:
  Add myself to committers-src.dot and calendar.freebsd.
  
  Approved by:  re (gjb), kib (mentor)

Modified:
  head/share/misc/committers-src.dot
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/share/misc/committers-src.dot
==
--- head/share/misc/committers-src.dot  Tue Oct  9 22:35:43 2018
(r339273)
+++ head/share/misc/committers-src.dot  Wed Oct 10 00:20:40 2018
(r339274)
@@ -358,6 +358,7 @@ wollman [label="Garrett Wollman\nwoll...@freebsd.org\n
 wsalamon [label="Wayne Salamon\nwsala...@freebsd.org\n2005/06/25"]
 wulf [label="Vladimir Kondratyev\nw...@freebsd.org\n2017/04/27"]
 yongari [label="Pyun YongHyeon\nyong...@freebsd.org\n2004/08/01"]
+yuripv [label="Yuri Pankov\nyur...@freebsd.org\n2018/10/09"]
 zbb [label="Zbigniew Bodek\n...@freebsd.org\n2013/09/02"]
 zec [label="Marko Zec\n...@freebsd.org\n2008/06/22"]
 zml [label="Zachary Loafman\n...@freebsd.org\n2009/05/27"]
@@ -674,6 +675,7 @@ kib -> stas
 kib -> tijl
 kib -> trociny
 kib -> vangyzen
+kib -> yuripv
 kib -> zont
 
 kmacy -> lstewart

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==
--- head/usr.bin/calendar/calendars/calendar.freebsdTue Oct  9 22:35:43 
2018(r339273)
+++ head/usr.bin/calendar/calendars/calendar.freebsdWed Oct 10 00:20:40 
2018(r339274)
@@ -331,6 +331,7 @@
 08/28  Norikatsu Shigemura  born in Fujisawa, Kanagawa, 
Japan, 1974
 08/29  Thomas Gellekum  born in Moenchengladbach, 
Nordrhein-Westfalen, Germany, 1967
 08/29  Max Laier  born in Karlsruhe, Germany, 1981
+08/30  Yuri Pankov  born in Krasnodar, USSR, 1979
 09/01  Pyun YongHyeon  born in Kimcheon, Korea, 1968
 09/01  William Grzybowski  born in Parana, Brazil, 1988
 09/03  Max Khon  born in Novosibirsk, USSR, 1976
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r338375 - in head/usr.bin/sed: . tests

2018-08-29 Thread Yuri Pankov

Mark Johnston wrote:

Author: markj
Date: Wed Aug 29 17:09:03 2018
New Revision: 338375
URL: https://svnweb.freebsd.org/changeset/base/338375

Log:
   sed: Fix -i option behavior with 'q' command.
   
   Don't just exit when encountering the 'q' command if we edit file

   inplace, and give mf_fgets() a chance to actually handle the
   inplace case.
   
   Also add a regression test.
   
   Submitted by:	Yuri Pankov 

   Approved by: re (kib)
   MFC after:   1 week
   Differential Revision:   https://reviews.freebsd.org/D16798


This is also:

PR: 230507
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r338239 - head

2018-08-28 Thread Yuri Pankov

Piotr P. Stefaniak wrote:

On 2018-08-23 05:06:32, Warner Losh wrote:

Author: imp
Date: Thu Aug 23 05:06:31 2018
New Revision: 338239
URL: https://svnweb.freebsd.org/changeset/base/338239

Log:
 Add a special note to UPDATING for the devmatch stuff. While tested,
 there's an elevated risk of trouble, and you must update kernel,
 userland and rc scripts for the best experience.

Modified:
 head/UPDATING

Modified: head/UPDATING
== 


--- head/UPDATING    Thu Aug 23 05:06:27 2018    (r338238)
+++ head/UPDATING    Thu Aug 23 05:06:31 2018    (r338239)
@@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)

+20170822:


Shouldn't that be 20180822?


Both issues still not fixed.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r338212 - in head: etc usr.sbin/services_mkdb

2018-08-22 Thread Yuri Pankov

Brad Davis wrote:

Author: brd
Date: Wed Aug 22 21:22:40 2018
New Revision: 338212
URL: https://svnweb.freebsd.org/changeset/base/338212

Log:
   Move services to usr.sbin/services_mkdb/
   
   This is pkgbase related as it switches to CONFS to properly tag this as a

   config file.
   
   Approved by:	will (mentor)

   Differential Revision:   https://reviews.freebsd.org/D16848

Added:
   head/usr.sbin/services_mkdb/services
  - copied unchanged from r338211, head/etc/services
Deleted:
   head/etc/services
Modified:
   head/etc/Makefile
   head/usr.sbin/services_mkdb/Makefile


This one is interesting.  Strictly speaking, /etc/services existence did 
not rely on SERVICESDB option, and only database in /var/db/services.db 
did -- are there really no consumers for /etc/services as is?

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


  1   2   >