svn commit: r361902 - head
Author: kevans Date: Mon Jun 8 02:42:41 2020 New Revision: 361902 URL: https://svnweb.freebsd.org/changeset/base/361902 Log: RELNOTES: Post-portem note about sed(1) \x support Requested by: Oliver Pinter Modified: head/RELNOTES Modified: head/RELNOTES == --- head/RELNOTES Mon Jun 8 02:28:00 2020(r361901) +++ head/RELNOTES Mon Jun 8 02:42:41 2020(r361902) @@ -10,6 +10,11 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +r361884: + sed(1) has learned about hex escapes (e.g. \x27) and will now do the + right thing with them, removing the need for printf magic or obnoxious + escaping in many scenarios. + r361238, r361798, r361799: ZFS will now unconditionally reject read(2) of a directory with EISDIR. Additionally, read(2) of a directory is now rejected with EISDIR by ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361901 - head/sys/powerpc/powernv
Author: jhibbits Date: Mon Jun 8 02:28:00 2020 New Revision: 361901 URL: https://svnweb.freebsd.org/changeset/base/361901 Log: powerpc/powernv: Don't configure disabled CPUs If the POWER firmware detects a bad CPU core, it will "GUARD" it out, marking it disabled. Any attempt to spin up a bad CPU will trigger a panic later on when waiting for threads on said core to wake up. Support limping along on fewer cores instead. Modified: head/sys/powerpc/powernv/platform_powernv.c Modified: head/sys/powerpc/powernv/platform_powernv.c == --- head/sys/powerpc/powernv/platform_powernv.c Mon Jun 8 00:46:19 2020 (r361900) +++ head/sys/powerpc/powernv/platform_powernv.c Mon Jun 8 02:28:00 2020 (r361901) @@ -49,6 +49,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include @@ -332,6 +334,8 @@ powernv_cpuref_init(void) for (cpu = OF_child(dev); cpu != 0; cpu = OF_peer(cpu)) { res = OF_getprop(cpu, "device_type", buf, sizeof(buf)); if (res > 0 && strcmp(buf, "cpu") == 0) { + if (!ofw_bus_node_status_okay(cpu)) + continue; res = OF_getproplen(cpu, "ibm,ppc-interrupt-server#s"); if (res > 0) { OF_getencprop(cpu, "ibm,ppc-interrupt-server#s", ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361900 - head/sbin/reboot
Author: cem Date: Mon Jun 8 00:46:19 2020 New Revision: 361900 URL: https://svnweb.freebsd.org/changeset/base/361900 Log: x86 boot.8: Remove obsolescent non-loader x86 boot documentation x86 boot uses loader(8) and the boot2-direct-to-kernel process is not supported. Remove the documentation, which doesn't document a working process and leads to confusion. PR: 247074 Reported by: Alex K. Modified: head/sbin/reboot/boot_i386.8 Modified: head/sbin/reboot/boot_i386.8 == --- head/sbin/reboot/boot_i386.8Mon Jun 8 00:20:15 2020 (r361899) +++ head/sbin/reboot/boot_i386.8Mon Jun 8 00:46:19 2020 (r361900) @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 19, 2019 +.Dd June 7, 2020 .Dt BOOT 8 i386 .Os .Sh NAME @@ -61,31 +61,13 @@ That process is described in .Xr uefi 8 . .Pp -By default, a three-stage bootstrap is employed, and control is -automatically passed from the boot blocks (bootstrap stages one and -two) to a separate third-stage bootstrap program, +A three-stage bootstrap is employed. +Control is passed from the boot blocks (bootstrap stages one and two) to a +third-stage bootstrap program, .Xr loader 8 . This third stage provides more sophisticated control over the booting process than it is possible to achieve in the boot blocks, which are constrained by occupying limited fixed space on a given disk or slice. -.Pp -However, it is possible to dispense with the third stage altogether, -either by specifying a kernel name in the boot block parameter -file, -.Pa /boot.config , -or, unless option -.Fl n -is set, by hitting a key during a brief pause (while one of the characters -.Sy - , -.Sy \e , -.Sy \&| , -or -.Sy / -is displayed) before -.Xr loader 8 -is invoked. -Booting will also be attempted at stage two, if the -third stage cannot be loaded. .Pp The remainder of this subsection deals only with the boot blocks. The ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361899 - stable/12/sys/arm/broadcom/bcm2835
Author: gonzo Date: Mon Jun 8 00:20:15 2020 New Revision: 361899 URL: https://svnweb.freebsd.org/changeset/base/361899 Log: MFC r352028: [rpi] Inherit framebuffer BPP value from the VideoCore firmware Instead of using hardcoded bpp of 24, obtain current/configured value from VideoCore. This solves certain problems with Xorg/Qt apps that require bpp of 32 to work properly. The mode can be forced by setting framebuffer_depth value in config.txt PR: 235363 Submitted by: Steve Peurifoy Tested by:Johnathan Chen (stabe/12 patch) Modified: stable/12/sys/arm/broadcom/bcm2835/bcm2835_fbd.c stable/12/sys/arm/broadcom/bcm2835/bcm2835_mbox.c stable/12/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/broadcom/bcm2835/bcm2835_fbd.c == --- stable/12/sys/arm/broadcom/bcm2835/bcm2835_fbd.cSun Jun 7 19:56:17 2020(r361898) +++ stable/12/sys/arm/broadcom/bcm2835/bcm2835_fbd.cMon Jun 8 00:20:15 2020(r361899) @@ -85,7 +85,13 @@ bcm_fb_init(struct bcmsc_softc *sc, struct bcm2835_fb_ memset(fb, 0, sizeof(*fb)); if (bcm2835_mbox_fb_get_w_h(fb) != 0) return (ENXIO); - fb->bpp = FB_DEPTH; + if (bcm2835_mbox_fb_get_bpp(fb) != 0) + return (ENXIO); + if (fb->bpp < FB_DEPTH) { + device_printf(sc->dev, "changing fb bpp from %d to %d\n", fb->bpp, FB_DEPTH); + fb->bpp = FB_DEPTH; + } else + device_printf(sc->dev, "keeping existing fb bpp of %d\n", fb->bpp); fb->vxres = fb->xres; fb->vyres = fb->yres; Modified: stable/12/sys/arm/broadcom/bcm2835/bcm2835_mbox.c == --- stable/12/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sun Jun 7 19:56:17 2020(r361898) +++ stable/12/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Mon Jun 8 00:20:15 2020(r361899) @@ -499,6 +499,26 @@ bcm2835_mbox_fb_get_w_h(struct bcm2835_fb_config *fb) } int +bcm2835_mbox_fb_get_bpp(struct bcm2835_fb_config *fb) +{ + int err; + struct msg_fb_get_bpp msg; + + memset(, 0, sizeof(msg)); + msg.hdr.buf_size = sizeof(msg); + msg.hdr.code = BCM2835_MBOX_CODE_REQ; + BCM2835_MBOX_INIT_TAG(, GET_DEPTH); + msg.bpp.tag_hdr.val_len = 0; + msg.end_tag = 0; + + err = bcm2835_mbox_property(, sizeof(msg)); + if (err == 0) + fb->bpp = msg.bpp.body.resp.bpp; + + return (err); +} + +int bcm2835_mbox_fb_init(struct bcm2835_fb_config *fb) { int err; Modified: stable/12/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h == --- stable/12/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Sun Jun 7 19:56:17 2020(r361898) +++ stable/12/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Mon Jun 8 00:20:15 2020(r361899) @@ -475,6 +475,14 @@ struct msg_fb_get_w_h { int bcm2835_mbox_fb_get_w_h(struct bcm2835_fb_config *); +struct msg_fb_get_bpp { + struct bcm2835_mbox_hdr hdr; + struct bcm2835_mbox_tag_depth bpp; + uint32_t end_tag; +}; + +int bcm2835_mbox_fb_get_bpp(struct bcm2835_fb_config *); + struct msg_fb_setup { struct bcm2835_mbox_hdr hdr; struct bcm2835_mbox_tag_fb_w_h physical_w_h; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361898 - head/usr.sbin/services_mkdb
Author: pfg Date: Sun Jun 7 19:56:17 2020 New Revision: 361898 URL: https://svnweb.freebsd.org/changeset/base/361898 Log: services: Add SSDP to service database This is used for UPnP and is registered in the IANA database. MFC after:2 weeks PR: 241573 Modified: head/usr.sbin/services_mkdb/services Modified: head/usr.sbin/services_mkdb/services == --- head/usr.sbin/services_mkdb/servicesSun Jun 7 17:40:29 2020 (r361897) +++ head/usr.sbin/services_mkdb/servicesSun Jun 7 19:56:17 2020 (r361898) @@ -1602,6 +1602,8 @@ pptp 1723/tcp #Point-to-point tunnelling protocol # IMPORTANT NOTE: See comments for ports 1645/1646 when using older equipment radius 1812/udp #RADIUS authentication protocol (IANA sanctioned) radacct1813/udp #RADIUS accounting protocol (IANA sanctioned) +ssdp 1900/tcp #Selective Service Discovery Protocol (UPnP) +ssdp 1900/udp #Selective Service Discovery Protocol (UPnP) licensedaemon 1986/tcp #cisco license management licensedaemon 1986/udp #cisco license management tr-rsrb-p1 1987/tcp #cisco RSRB Priority 1 port ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r361884 - in head/usr.bin/sed: . tests
On Sunday, June 7, 2020, Kyle Evans wrote: > Author: kevans > Date: Sun Jun 7 04:32:38 2020 > New Revision: 361884 > URL: https://svnweb.freebsd.org/changeset/base/361884 > > Log: > sed: attempt to learn about hex escapes (e.g. \x27) > > Somewhat predictably, software often wants to use \x27/\x24 among others > so > that they can decline worrying about ugly escaping, if said escaping is > even > possible. Right now, this software is using these and getting the wrong > results, as we'll interpret those as x27 and x24 respectively. Some > examples > of this, when an exp-run was ran, were science/octopus and misc/vifm. > > Go ahead and process these at all times. We allow either one or two > digits, > and the tests account for both. If extra digits are specified, e.g. > \x2727, > then the third and fourth digits are interpreted literally as one might > expect. > > PR: 229925 > MFC after:2 weeks Could you please put an entry from this to release notes? :) > > 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 Jun 7 03:11:34 2020(r361883) > +++ head/usr.bin/sed/compile.c Sun Jun 7 04:32:38 2020(r361884) > @@ -49,6 +49,7 @@ static const char sccsid[] = "@(#)compile.c 8.1 (Berke > #include > #include > #include > +#include > #include > #include > #include > @@ -365,6 +366,51 @@ nonsel:/* Now parse the command */ > } > } > > +static int > +hex2char(const char *in, char *out, int len) > +{ > + long ord; > + char *endptr, hexbuf[3]; > + > + hexbuf[0] = in[0]; > + hexbuf[1] = len > 1 ? in[1] : '\0'; > + hexbuf[2] = '\0'; > + > + errno = 0; > + ord = strtol(hexbuf, , 16); > + if (*endptr != '\0' || errno != 0) > + return (ERANGE); > + *out = (char)ord; > + return (0); > +} > + > +static bool > +hexdigit(char c) > +{ > + int lc; > + > + lc = tolower(c); > + return isdigit(lc) || (lc >= 'a' && lc <= 'f'); > +} > + > +static bool > +dohex(const char *in, char *out, int *len) > +{ > + int tmplen; > + > + if (!hexdigit(in[0])) > + return (false); > + tmplen = 1; > + if (hexdigit(in[1])) > + ++tmplen; > + if (hex2char(in, out, tmplen) == 0) { > + *len = tmplen; > + return (true); > + } > + > + return (false); > +} > + > /* > * Get a delimited string. P points to the delimiter of the string; d > points > * to a buffer area. Newline and delimiter escapes are processed; other > @@ -377,6 +423,7 @@ nonsel: /* Now parse the command */ > static char * > compile_delimited(char *p, char *d, int is_tr) > { > + int hexlen; > char c; > > c = *p++; > @@ -412,6 +459,12 @@ compile_delimited(char *p, char *d, int is_tr) > } > p += 2; > continue; > + } else if (*p == '\\' && p[1] == 'x') { > + if (dohex([2], d, )) { > + ++d; > + p += hexlen + 2; > + continue; > + } > } else if (*p == '\\' && p[1] == '\\') { > if (is_tr) > p++; > @@ -431,7 +484,7 @@ compile_delimited(char *p, char *d, int is_tr) > static char * > compile_ccl(char **sp, char *t) > { > - int c, d; > + int c, d, hexlen; > char *s = *sp; > > *t++ = *s++; > @@ -459,6 +512,10 @@ compile_ccl(char **sp, char *t) > *t = '\t'; > s++; > break; > + case 'x': > + if (dohex([2], t, )) > + s += hexlen + 1; > + break; > } > } > } > @@ -499,7 +556,7 @@ static char * > compile_subst(char *p, struct s_subst *s) > { > static char lbuf[_POSIX2_LINE_MAX + 1]; > - int asize, size; > + int asize, hexlen, size; > u_char ref; > char c, *text, *op, *sp; > int more = 1, sawesc = 0; > @@ -562,6 +619,21 @@ compile_subst(char *p, struct s_subst *s) > break; > case 't': > *p = '\t'; > + break; > + case 'x': > +#defineADVANCE_N(s, n) \ > + do {\ > +
svn commit: r361897 - stable/12/sys/amd64/linux
Author: markj Date: Sun Jun 7 17:40:29 2020 New Revision: 361897 URL: https://svnweb.freebsd.org/changeset/base/361897 Log: MFC r361664: Handle getcpu() calls in vsyscall emulation on amd64. PR: 246339 Modified: stable/12/sys/amd64/linux/linux_sysvec.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_sysvec.c == --- stable/12/sys/amd64/linux/linux_sysvec.cSun Jun 7 16:42:03 2020 (r361896) +++ stable/12/sys/amd64/linux/linux_sysvec.cSun Jun 7 17:40:29 2020 (r361897) @@ -667,7 +667,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse const unsigned long linux_vsyscall_vector[] = { LINUX_SYS_gettimeofday, LINUX_SYS_linux_time, - /* getcpu not implemented */ + LINUX_SYS_linux_getcpu, }; static int ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361896 - stable/12/usr.bin/systat
Author: mr Date: Sun Jun 7 16:42:03 2020 New Revision: 361896 URL: https://svnweb.freebsd.org/changeset/base/361896 Log: MFC r360919,r360929,r361084: Patch systat -zarc to display cumulative rate and round down large numbers by SI units Introduce sysputpage() to display large page size with human readable format. Using UI units allows to fit larger numbers in columns. Stop calling v_page_size - this is a value that doesn't change at runtime. Renamed WINDOW *wnd to *wd to avoid conflict with global *wnd variable. Use bit-shift to convert page size to byte. PR: 237664, 246458 Submitted by: o...@j.email.ne.jp Added: stable/12/usr.bin/systat/sysput.c - copied, changed from r360929, head/usr.bin/systat/sysput.c Modified: stable/12/usr.bin/systat/Makefile stable/12/usr.bin/systat/extern.h stable/12/usr.bin/systat/fetch.c stable/12/usr.bin/systat/main.c stable/12/usr.bin/systat/vmstat.c stable/12/usr.bin/systat/zarc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/systat/Makefile == --- stable/12/usr.bin/systat/Makefile Sun Jun 7 14:39:20 2020 (r361895) +++ stable/12/usr.bin/systat/Makefile Sun Jun 7 16:42:03 2020 (r361896) @@ -4,7 +4,7 @@ .include PROG= systat -SRCS= cmds.c cmdtab.c devs.c fetch.c iostat.c keyboard.c main.c \ +SRCS= cmds.c cmdtab.c devs.c fetch.c iostat.c keyboard.c main.c sysput.c \ netcmds.c netstat.c pigs.c swap.c icmp.c \ mode.c ip.c sctp.c tcp.c zarc.c \ vmstat.c convtbl.c ifcmds.c ifstat.c Modified: stable/12/usr.bin/systat/extern.h == --- stable/12/usr.bin/systat/extern.h Sun Jun 7 14:39:20 2020 (r361895) +++ stable/12/usr.bin/systat/extern.h Sun Jun 7 16:42:03 2020 (r361896) @@ -165,6 +165,11 @@ voidshowtcp(void); voidstatus(void); voidsuspend(int); char *sysctl_dynread(const char *, size_t *); +voidsysputpage(WINDOW* , int, int, int, uint64_t, int); +voidsysputspaces(WINDOW* , int, int, int); +voidsysputstrs(WINDOW* , int, int, int); +voidsysputuint64(WINDOW* , int, int, int, uint64_t, int); +voidsysputwuint64(WINDOW* , int, int, int, uint64_t, int); #define SYSTAT_CMD(name) \ void close ## name(WINDOW *); \ @@ -176,4 +181,4 @@ char*sysctl_dynread(const char *, size_t *); void show ## name(void) SYSTAT_CMD( zarc ); -SYSTAT_CMD ( sctp ); +SYSTAT_CMD( sctp ); Modified: stable/12/usr.bin/systat/fetch.c == --- stable/12/usr.bin/systat/fetch.cSun Jun 7 14:39:20 2020 (r361895) +++ stable/12/usr.bin/systat/fetch.cSun Jun 7 16:42:03 2020 (r361896) @@ -60,9 +60,11 @@ kvm_ckread(void *a, void *b, int l) return (1); } -void getsysctl(const char *name, void *ptr, size_t len) +void +getsysctl(const char *name, void *ptr, size_t len) { size_t nlen = len; + if (sysctlbyname(name, ptr, , NULL, 0) != 0) { error("sysctl(%s...) failed: %s", name, strerror(errno)); Modified: stable/12/usr.bin/systat/main.c == --- stable/12/usr.bin/systat/main.c Sun Jun 7 14:39:20 2020 (r361895) +++ stable/12/usr.bin/systat/main.c Sun Jun 7 16:42:03 2020 (r361896) @@ -300,17 +300,8 @@ display(void) GETSYSCTL("kstat.zfs.misc.arcstats.dbuf_size", arc_stat); arc[6] += arc_stat; wmove(wload, 0, 0); wclrtoeol(wload); - for (i = 0 ; i < nitems(arc); i++) { - if (arc[i] > 10llu * 1024 * 1024 * 1024 ) { - wprintw(wload, "%7lluG", arc[i] >> 30); - } - else if (arc[i] > 10 * 1024 * 1024 ) { - wprintw(wload, "%7lluM", arc[i] >> 20); - } - else { - wprintw(wload, "%7lluK", arc[i] >> 10); - } - } + for (i = 0 ; i < nitems(arc); i++) + sysputuint64(wload, 0, i*8+2, 6, arc[i], 0); } } (*curcmd->c_refresh)(); Copied and modified: stable/12/usr.bin/systat/sysput.c (from r360929, head/usr.bin/systat/sysput.c) == --- head/usr.bin/systat/sysput.cMon May 11 21:22:16 2020 (r360929, copy source) +++ stable/12/usr.bin/systat/sysput.c Sun Jun 7 16:42:03 2020 (r361896) @@ -41,15 +41,23 @@ __FBSDID("$FreeBSD$"); #include "extern.h" void -sysputstrs(WINDOW *wnd, int row, int col, int
Re: svn commit: r361884 - in head/usr.bin/sed: . tests
On Sun, Jun 7, 2020, 8:04 AM Kyle Evans wrote: > On Sun, Jun 7, 2020 at 8:31 AM Rodney W. Grimes > wrote: > > > > > Author: kevans > > > Date: Sun Jun 7 04:32:38 2020 > > > New Revision: 361884 > > > URL: https://svnweb.freebsd.org/changeset/base/361884 > > > > > > Log: > > > sed: attempt to learn about hex escapes (e.g. \x27) > > > > > > Somewhat predictably, software often wants to use \x27/\x24 among > others so > > > that they can decline worrying about ugly escaping, if said escaping > is even > > > possible. Right now, this software is using these and getting the > wrong > > > results, as we'll interpret those as x27 and x24 respectively. Some > examples > > > of this, when an exp-run was ran, were science/octopus and misc/vifm. > > > > > > Go ahead and process these at all times. We allow either one or two > digits, > > > and the tests account for both. If extra digits are specified, e.g. > \x2727, > > > then the third and fourth digits are interpreted literally as one > might > > > expect. > > > > Does it work to do \\x27, ie I want it to NOT do \x27 so I can sed > > on files that contain sequences of escapes. > > I'm so glad you asked this. :-) For your immediate answer: yes, the > semantics there work as you expect. > > For the long answer, that's actually what you should have been doing > all along; raising awareness of that fact is what PR 229925 aims to > do, by switching our interpretation of the UB for escaping ordinary > characters to make them an error if it's not specially interpreted. > > Prior to this change, if you had: > > printf "x27\n" | sed -e 's/\x27//' > > What you end up with is actually *not* an empty string with a newline, > but just a single backslash! \x27 in the replacement pattern gets > passed through to the underlying regex(3) implementation, which then > happily interprets \x => x and replaces the literal 'x27', leaving \ > -- which is perhaps not what you might have expected if \x27 didn't > have special meaning and it almost certainly isn't what you wanted. > With the new sed, you can change 'x27' to 'b27' in both strings above > to see what I mean. > > In the New World Order, all regex(3) users will be forced to be > precise here so that we don't get it wrong. This is especially > important when I add GNU extensions to libregex, because some of those > escaped-ordinaries will now be granted special meaning, so \s will no > longer match a literal s but instead [[:space:]]; using the > unadulterated libc regex(3) interface instead will give you an error > and allow you to detect whether you're accidentally using libc > regex(3) rather than the GNU-extended libregex. > > This is going to be a large and potentially world-breaking change for > many, but I think we'll all be better for it in the end. The symbol > version of regcomp will get bumped, so that older binaries will > continue to operate with the old escaping behavior in case that was > actually pertinent to their functionality. > Thanks for taking this on. We are actually stuck between two POLAs here: existing behavior and what users of other systems expect on FreeBSD. Given how edge-Casey the breakage will be, I'm glad you've decided to try full new semantics. I've had *LOTS* of code I've downloaded that I had to hack sed to be gsed for exactly this reason. I think it is one area we've failed to keep up. It's an area where the anti linux bias of the project's early days is hurting us now. Thanks for seeing how feasible this is and retiring this technical debt. Warner Thanks, > > Kyle Evans > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361895 - in head/sys: netinet netinet6
Author: tuexen Date: Sun Jun 7 14:39:20 2020 New Revision: 361895 URL: https://svnweb.freebsd.org/changeset/base/361895 Log: Retire SCTP_SO_LOCK_TESTING. This was intended to test the locking used in the MacOS X kernel on a FreeBSD system, to make use of WITNESS and other debugging infrastructure. This hasn't been used for ages, to take it out to reduce the #ifdef complexity. MFC after:1 week Modified: head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_output.h head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_sysctl.h head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_auth.c == --- head/sys/netinet/sctp_auth.cSun Jun 7 13:53:23 2020 (r361894) +++ head/sys/netinet/sctp_auth.cSun Jun 7 14:39:20 2020 (r361895) @@ -566,9 +566,7 @@ sctp_auth_key_acquire(struct sctp_tcb *stcb, uint16_t void sctp_auth_key_release(struct sctp_tcb *stcb, uint16_t key_id, int so_locked -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ) { sctp_sharedkey_t *skey; @@ -1721,9 +1719,7 @@ sctp_handle_auth(struct sctp_tcb *stcb, struct sctp_au void sctp_notify_authentication(struct sctp_tcb *stcb, uint32_t indication, uint16_t keyid, uint16_t alt_keyid, int so_locked -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ) { struct mbuf *m_notify; Modified: head/sys/netinet/sctp_constants.h == --- head/sys/netinet/sctp_constants.h Sun Jun 7 13:53:23 2020 (r361894) +++ head/sys/netinet/sctp_constants.h Sun Jun 7 14:39:20 2020 (r361895) @@ -943,7 +943,7 @@ __FBSDID("$FreeBSD$"); /*- * defines for socket lock states. - * Used by __APPLE__ and SCTP_SO_LOCK_TESTING + * Used by __APPLE__ */ #define SCTP_SO_LOCKED 1 #define SCTP_SO_NOT_LOCKED 0 Modified: head/sys/netinet/sctp_indata.c == --- head/sys/netinet/sctp_indata.c Sun Jun 7 13:53:23 2020 (r361894) +++ head/sys/netinet/sctp_indata.c Sun Jun 7 14:39:20 2020 (r361895) @@ -555,20 +555,6 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb, sctp_ucount_incr(asoc->cnt_on_all_streams); nxt_todel = strm->last_mid_delivered + 1; if (SCTP_MID_EQ(asoc->idata_supported, nxt_todel, control->mid)) { -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; - - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(>asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(>asoc.refcnt, 1); - if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { - SCTP_SOCKET_UNLOCK(so, 1); - return; - } -#endif /* can be delivered right away? */ if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_STR_LOGGING_ENABLE) { sctp_log_strm_del(control, NULL, SCTP_STR_LOG_FROM_IMMED_DEL); @@ -638,9 +624,6 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb, } break; } -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif } if (queue_needed) { /* @@ -1956,25 +1939,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc */ if (stcb->sctp_socket->so_rcv.sb_cc) { /* some to read, wake-up */ -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; - - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(>asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(>asoc.refcnt, 1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - /* assoc was freed while we were unlocked */ - SCTP_SOCKET_UNLOCK(so, 1); - return (0); - } -#endif sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif }
Re: svn commit: r361884 - in head/usr.bin/sed: . tests
On Sun, Jun 7, 2020 at 8:31 AM Rodney W. Grimes wrote: > > > Author: kevans > > Date: Sun Jun 7 04:32:38 2020 > > New Revision: 361884 > > URL: https://svnweb.freebsd.org/changeset/base/361884 > > > > Log: > > sed: attempt to learn about hex escapes (e.g. \x27) > > > > Somewhat predictably, software often wants to use \x27/\x24 among others > > so > > that they can decline worrying about ugly escaping, if said escaping is > > even > > possible. Right now, this software is using these and getting the wrong > > results, as we'll interpret those as x27 and x24 respectively. Some > > examples > > of this, when an exp-run was ran, were science/octopus and misc/vifm. > > > > Go ahead and process these at all times. We allow either one or two > > digits, > > and the tests account for both. If extra digits are specified, e.g. > > \x2727, > > then the third and fourth digits are interpreted literally as one might > > expect. > > Does it work to do \\x27, ie I want it to NOT do \x27 so I can sed > on files that contain sequences of escapes. I'm so glad you asked this. :-) For your immediate answer: yes, the semantics there work as you expect. For the long answer, that's actually what you should have been doing all along; raising awareness of that fact is what PR 229925 aims to do, by switching our interpretation of the UB for escaping ordinary characters to make them an error if it's not specially interpreted. Prior to this change, if you had: printf "x27\n" | sed -e 's/\x27//' What you end up with is actually *not* an empty string with a newline, but just a single backslash! \x27 in the replacement pattern gets passed through to the underlying regex(3) implementation, which then happily interprets \x => x and replaces the literal 'x27', leaving \ -- which is perhaps not what you might have expected if \x27 didn't have special meaning and it almost certainly isn't what you wanted. With the new sed, you can change 'x27' to 'b27' in both strings above to see what I mean. In the New World Order, all regex(3) users will be forced to be precise here so that we don't get it wrong. This is especially important when I add GNU extensions to libregex, because some of those escaped-ordinaries will now be granted special meaning, so \s will no longer match a literal s but instead [[:space:]]; using the unadulterated libc regex(3) interface instead will give you an error and allow you to detect whether you're accidentally using libc regex(3) rather than the GNU-extended libregex. This is going to be a large and potentially world-breaking change for many, but I think we'll all be better for it in the end. The symbol version of regcomp will get bumped, so that older binaries will continue to operate with the old escaping behavior in case that was actually pertinent to their functionality. Thanks, Kyle Evans ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361894 - head/gnu/usr.bin/binutils/as
Author: emaste Date: Sun Jun 7 13:53:23 2020 New Revision: 361894 URL: https://svnweb.freebsd.org/changeset/base/361894 Log: Remove now-unused GNU as build infrastructure Deleted: head/gnu/usr.bin/binutils/as/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361893 - head/tests/sys/net
Author: kp Date: Sun Jun 7 13:53:02 2020 New Revision: 361893 URL: https://svnweb.freebsd.org/changeset/base/361893 Log: bridge tests: Re-enable STP test This test should no longer provoke large amounts of traffic, which can overwhelm single-core systems, preventing them from making progress in the tests. The test can now be re-enabled. PR: 246448 Modified: head/tests/sys/net/if_bridge_test.sh Modified: head/tests/sys/net/if_bridge_test.sh == --- head/tests/sys/net/if_bridge_test.shSun Jun 7 13:52:49 2020 (r361892) +++ head/tests/sys/net/if_bridge_test.shSun Jun 7 13:53:02 2020 (r361893) @@ -76,10 +76,6 @@ stp_head() stp_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/246448; - fi - vnet_init epair_one=$(vnet_mkepair) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361892 - head/share/man/man5
Author: emaste Date: Sun Jun 7 13:52:49 2020 New Revision: 361892 URL: https://svnweb.freebsd.org/changeset/base/361892 Log: src.conf.5: regen after BINUTILS options removal Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Sun Jun 7 13:21:47 2020 (r361891) +++ head/share/man/man5/src.conf.5 Sun Jun 7 13:52:49 2020 (r361892) @@ -182,15 +182,6 @@ Build all binaries with the .Dv DF_BIND_NOW flag set to indicate that the run-time loader should perform all relocation processing at process startup rather than on demand. -.It Va WITH_BINUTILS -Build and install GNU -.Xr as 1 -as part of the normal system build. -This option is not available as of -.Fx 13.0 . -.It Va WITH_BINUTILS_BOOTSTRAP -Build GNU binutils -as part of the bootstrap process. .It Va WITHOUT_BLACKLIST Set this if you do not want to build .Xr blacklistd 8 @@ -371,8 +362,6 @@ When set, it enforces these options: .Pp .Bl -item -compact .It -.Va WITHOUT_BINUTILS_BOOTSTRAP -.It .Va WITHOUT_CLANG_BOOTSTRAP .It .Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP @@ -1630,8 +1619,6 @@ compilers, debuggers etc. When set, it enforces these options: .Pp .Bl -item -compact -.It -.Va WITHOUT_BINUTILS .It .Va WITHOUT_CLANG .It ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r361884 - in head/usr.bin/sed: . tests
> Author: kevans > Date: Sun Jun 7 04:32:38 2020 > New Revision: 361884 > URL: https://svnweb.freebsd.org/changeset/base/361884 > > Log: > sed: attempt to learn about hex escapes (e.g. \x27) > > Somewhat predictably, software often wants to use \x27/\x24 among others so > that they can decline worrying about ugly escaping, if said escaping is even > possible. Right now, this software is using these and getting the wrong > results, as we'll interpret those as x27 and x24 respectively. Some examples > of this, when an exp-run was ran, were science/octopus and misc/vifm. > > Go ahead and process these at all times. We allow either one or two digits, > and the tests account for both. If extra digits are specified, e.g. \x2727, > then the third and fourth digits are interpreted literally as one might > expect. Does it work to do \\x27, ie I want it to NOT do \x27 so I can sed on files that contain sequences of escapes. > > PR: 229925 > MFC after: 2 weeks > > 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.cSun Jun 7 03:11:34 2020 > (r361883) > +++ head/usr.bin/sed/compile.cSun Jun 7 04:32:38 2020 > (r361884) > @@ -49,6 +49,7 @@ static const char sccsid[] = "@(#)compile.c 8.1 (Berke > #include > #include > #include > +#include > #include > #include > #include > @@ -365,6 +366,51 @@ nonsel: /* Now parse the command */ > } > } > > +static int > +hex2char(const char *in, char *out, int len) > +{ > + long ord; > + char *endptr, hexbuf[3]; > + > + hexbuf[0] = in[0]; > + hexbuf[1] = len > 1 ? in[1] : '\0'; > + hexbuf[2] = '\0'; > + > + errno = 0; > + ord = strtol(hexbuf, , 16); > + if (*endptr != '\0' || errno != 0) > + return (ERANGE); > + *out = (char)ord; > + return (0); > +} > + > +static bool > +hexdigit(char c) > +{ > + int lc; > + > + lc = tolower(c); > + return isdigit(lc) || (lc >= 'a' && lc <= 'f'); > +} > + > +static bool > +dohex(const char *in, char *out, int *len) > +{ > + int tmplen; > + > + if (!hexdigit(in[0])) > + return (false); > + tmplen = 1; > + if (hexdigit(in[1])) > + ++tmplen; > + if (hex2char(in, out, tmplen) == 0) { > + *len = tmplen; > + return (true); > + } > + > + return (false); > +} > + > /* > * Get a delimited string. P points to the delimiter of the string; d points > * to a buffer area. Newline and delimiter escapes are processed; other > @@ -377,6 +423,7 @@ nonsel: /* Now parse the command */ > static char * > compile_delimited(char *p, char *d, int is_tr) > { > + int hexlen; > char c; > > c = *p++; > @@ -412,6 +459,12 @@ compile_delimited(char *p, char *d, int is_tr) > } > p += 2; > continue; > + } else if (*p == '\\' && p[1] == 'x') { > + if (dohex([2], d, )) { > + ++d; > + p += hexlen + 2; > + continue; > + } > } else if (*p == '\\' && p[1] == '\\') { > if (is_tr) > p++; > @@ -431,7 +484,7 @@ compile_delimited(char *p, char *d, int is_tr) > static char * > compile_ccl(char **sp, char *t) > { > - int c, d; > + int c, d, hexlen; > char *s = *sp; > > *t++ = *s++; > @@ -459,6 +512,10 @@ compile_ccl(char **sp, char *t) > *t = '\t'; > s++; > break; > + case 'x': > + if (dohex([2], t, )) > + s += hexlen + 1; > + break; > } > } > } > @@ -499,7 +556,7 @@ static char * > compile_subst(char *p, struct s_subst *s) > { > static char lbuf[_POSIX2_LINE_MAX + 1]; > - int asize, size; > + int asize, hexlen, size; > u_char ref; > char c, *text, *op, *sp; > int more = 1, sawesc = 0; > @@ -562,6 +619,21 @@ compile_subst(char *p, struct s_subst *s) > break; > case 't': > *p = '\t'; > + break; > + case 'x': > +#define ADVANCE_N(s, n) \ > + do {\ > + char *adv = (s);\ > + while (*(adv + (n) - 1) != '\0') { \ > +
svn commit: r361891 - head/usr.bin/uniq
Author: bcr (doc committer) Date: Sun Jun 7 13:21:47 2020 New Revision: 361891 URL: https://svnweb.freebsd.org/changeset/base/361891 Log: Add EXAMPLES to cover all flags except -f since it is analogous to -s. An EXAMPLE section was adding with some basic examples that show the use of uniq(1) with various flags. Submitted by: fernape@ Approved by: bcr@ MFC after:4 days Relnotes: yes (EXAMPLE section for uniq(1)) Differential Revision:https://reviews.freebsd.org/D25149 Modified: head/usr.bin/uniq/uniq.1 Modified: head/usr.bin/uniq/uniq.1 == --- head/usr.bin/uniq/uniq.1Sun Jun 7 12:15:41 2020(r361890) +++ head/usr.bin/uniq/uniq.1Sun Jun 7 13:21:47 2020(r361891) @@ -31,7 +31,7 @@ .\" From: @(#)uniq.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 15, 2019 +.Dd June 7, 2020 .Dt UNIQ 1 .Os .Sh NAME @@ -147,6 +147,56 @@ as described in .Xr environ 7 . .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Assuming a file named cities.txt with the following content: +.Bd -literal -offset indent +Madrid +Lisbon +Madrid +.Ed +.Pp +The following command reports three different lines since identical elements +are not adjacent: +.Bd -literal -offset indent +$ uniq -u cities.txt +Madrid +Lisbon +Madrid +.Ed +.Pp +Sort the file and count the number of identical lines: +.Bd -literal -offset indent +$ sort cities.txt | uniq -c + 1 Lisbon + 2 Madrid +.Ed +.Pp +Assuming the following content for the file cities.txt: +.Bd -literal -offset indent +madrid +Madrid +Lisbon +.Ed +.Pp +Show repeated lines ignoring case sensitiveness: +.Bd -literal -offset indent +$ uniq -d -i cities.txt +madrid +.Ed +.Pp +Same as above but showing the whole group of repeated lines: +.Bd -literal -offset indent +$ uniq -D -i cities.txt +madrid +Madrid +.Ed +.Pp +Report the number of identical lines ignoring the first character of every line: +.Bd -literal -offset indent +$ uniq -s 1 -c cities.txt + 2 madrid + 1 Lisbon +.Ed .Sh COMPATIBILITY The historic .Cm \&\(pl Ns Ar number ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361889 - stable/11/libexec/rtld-elf
Author: kib Date: Sun Jun 7 09:38:45 2020 New Revision: 361889 URL: https://svnweb.freebsd.org/changeset/base/361889 Log: MFC r360201: Fix ldd for PIE binaries with static TLS segment. PR: 245677 Modified: stable/11/libexec/rtld-elf/rtld.c stable/11/libexec/rtld-elf/rtld.h Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c == --- stable/11/libexec/rtld-elf/rtld.c Sun Jun 7 09:17:57 2020 (r361888) +++ stable/11/libexec/rtld-elf/rtld.c Sun Jun 7 09:38:45 2020 (r361889) @@ -3303,7 +3303,7 @@ rtld_dlopen(const char *name, int fd, int mode) if (mode & RTLD_DEEPBIND) lo_flags |= RTLD_LO_DEEPBIND; if (ld_tracing != NULL) - lo_flags |= RTLD_LO_TRACE; + lo_flags |= RTLD_LO_TRACE | RTLD_LO_IGNSTLS; return (dlopen_object(name, fd, obj_main, lo_flags, mode & (RTLD_MODEMASK | RTLD_GLOBAL), NULL)); @@ -3356,15 +3356,15 @@ dlopen_object(const char *name, int fd, Obj_Entry *ref if ((lo_flags & RTLD_LO_DEEPBIND) != 0) obj->symbolic = true; result = 0; - if ((lo_flags & RTLD_LO_EARLY) == 0 && obj->static_tls && - !allocate_tls_offset(obj)) { + if ((lo_flags & (RTLD_LO_EARLY | RTLD_LO_IGNSTLS)) == 0 && + obj->static_tls && !allocate_tls_offset(obj)) { _rtld_error("%s: No space available " "for static Thread Local Storage", obj->path); result = -1; } if (result != -1) result = load_needed_objects(obj, lo_flags & (RTLD_LO_DLOPEN | - RTLD_LO_EARLY)); + RTLD_LO_EARLY | RTLD_LO_IGNSTLS)); init_dag(obj); ref_dag(obj); if (result != -1) Modified: stable/11/libexec/rtld-elf/rtld.h == --- stable/11/libexec/rtld-elf/rtld.h Sun Jun 7 09:17:57 2020 (r361888) +++ stable/11/libexec/rtld-elf/rtld.h Sun Jun 7 09:38:45 2020 (r361889) @@ -303,6 +303,7 @@ TAILQ_HEAD(obj_entry_q, Struct_Obj_Entry); #defineRTLD_LO_FILTEES 0x10/* Loading filtee. */ #defineRTLD_LO_EARLY 0x20/* Do not call ctors, postpone it to the initialization during the image start. */ +#defineRTLD_LO_IGNSTLS 0x40/* Do not allocate static TLS */ #defineRTLD_LO_DEEPBIND 0x80 /* Force symbolic for this object */ /* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361888 - head/share/man/man9
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-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361887 - head/bin/ps
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-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"