svn commit: r367945 - head
Author: eadler Date: Mon Nov 23 04:39:29 2020 New Revision: 367945 URL: https://svnweb.freebsd.org/changeset/base/367945 Log: arcconfig: add callsign again Problem When using git-svn or other non-pure-svn tooling the original subversion URL is not present. This causes arcanist/phabricator to be unable to determine which repository is being modified. Solution Restore callsign to .arcconfig to enable exact repository matching even with git-svn. Reported By: jhb Modified: head/.arcconfig Modified: head/.arcconfig == --- head/.arcconfig Mon Nov 23 02:49:53 2020(r367944) +++ head/.arcconfig Mon Nov 23 04:39:29 2020(r367945) @@ -1,4 +1,5 @@ { + "repository.callsign" : "S", "phabricator.uri" : "https://reviews.freebsd.org/";, "history.immutable" : true } ___ 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: r357683 - head/lib/libc/string
Author: eadler Date: Sat Feb 8 21:17:48 2020 New Revision: 357683 URL: https://svnweb.freebsd.org/changeset/base/357683 Log: memset.3: better fix previous typo Upon re-reading the whole sentence this is a better fix. MFC with: r357681 Modified: head/lib/libc/string/memset.3 Modified: head/lib/libc/string/memset.3 == --- head/lib/libc/string/memset.3 Sat Feb 8 21:02:20 2020 (r357682) +++ head/lib/libc/string/memset.3 Sat Feb 8 21:17:48 2020 (r357683) @@ -63,8 +63,9 @@ Undefined behaviour from .Fn memset , resulting from storage overflow, will occur if .Fa len -is greater than the length of buffer -.Fa dest . +is greater than the length of the +.Fa dest +buffer. The behaviour is also undefined if .Fa dest is an invalid pointer. ___ 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: r357681 - head/lib/libc/string
Author: eadler Date: Sat Feb 8 20:56:38 2020 New Revision: 357681 URL: https://svnweb.freebsd.org/changeset/base/357681 Log: memset.3: fix a a duplicate word Modified: head/lib/libc/string/memset.3 Modified: head/lib/libc/string/memset.3 == --- head/lib/libc/string/memset.3 Sat Feb 8 15:52:20 2020 (r357680) +++ head/lib/libc/string/memset.3 Sat Feb 8 20:56:38 2020 (r357681) @@ -63,7 +63,7 @@ Undefined behaviour from .Fn memset , resulting from storage overflow, will occur if .Fa len -is greater than the the length of buffer +is greater than the length of buffer .Fa dest . The behaviour is also undefined if .Fa dest ___ 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: r355647 - head/usr.bin/showmount
Author: eadler Date: Thu Dec 12 05:11:53 2019 New Revision: 355647 URL: https://svnweb.freebsd.org/changeset/base/355647 Log: [showmount] implement long options add long options support to showmount. Where mappings exist use the GNU names for said options. Differential Revision:https://reviews.freebsd.org/D22543 Reviewed by: kevans (earlier version) Modified: head/usr.bin/showmount/showmount.8 head/usr.bin/showmount/showmount.c Modified: head/usr.bin/showmount/showmount.8 == --- head/usr.bin/showmount/showmount.8 Thu Dec 12 04:47:02 2019 (r355646) +++ head/usr.bin/showmount/showmount.8 Thu Dec 12 05:11:53 2019 (r355647) @@ -67,20 +67,20 @@ for a detailed description of the protocol. .Pp The following options are available: .Bl -tag -width indent -.It Fl a +.It Fl a , Fl -all List all mount points in the form: .Bd -ragged -offset indent -compact .Ar host : Ns Ar dirpath . .Ed -.It Fl d +.It Fl d , Fl -directories List directory paths of mount points instead of hosts. -.It Fl E +.It Fl E , Fl -exports-script Show the .Ar host Ns 's exports list in a script-friendly format. Client addresses and the header are not shown, and special characters are escaped. -.It Fl e +.It Fl e , Fl -exports Show the .Ar host Ns 's exports list. Modified: head/usr.bin/showmount/showmount.c == --- head/usr.bin/showmount/showmount.c Thu Dec 12 04:47:02 2019 (r355646) +++ head/usr.bin/showmount/showmount.c Thu Dec 12 05:11:53 2019 (r355647) @@ -53,6 +53,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -102,6 +103,14 @@ int xdr_exportslist(XDR *, struct exportslist **); int tcp_callrpc(const char *host, int prognum, int versnum, int procnum, xdrproc_t inproc, char *in, xdrproc_t outproc, char *out); +static const struct option long_opts[] = { + { "all",no_argument,NULL, 'a' }, + { "directories",no_argument,NULL, 'd' }, + { "exports-script", no_argument,NULL, 'E' }, + { "exports",no_argument,NULL, 'e' }, + { NULL, 0, NULL, 0 }, +}; + /* * This command queries the NFS mount daemon for it's mount list and/or * it's exports list and prints them out. @@ -119,7 +128,7 @@ main(int argc, char **argv) const char *host; int ch, estat, nbytes; - while ((ch = getopt(argc, argv, "adEe13")) != -1) + while ((ch = getopt_long(argc, argv, "+adEe13", long_opts, NULL)) != -1) switch (ch) { case 'a': if (type == 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: r355063 - head/share/misc
Author: eadler Date: Sun Nov 24 19:16:57 2019 New Revision: 355063 URL: https://svnweb.freebsd.org/changeset/base/355063 Log: bsd-family-tree: correct macOS release date Reported by: Herbert J. Skuhra Reported by: Maxim Konovalov Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Sun Nov 24 19:12:23 2019 (r355062) +++ head/share/misc/bsd-family-tree Sun Nov 24 19:16:57 2019 (r355063) @@ -795,7 +795,7 @@ DragonFly 5.6.1 2019-06-19 [DFB] FreeBSD 11.3 2019-07-09 [FBD] DragonFly 5.6.22019-08-11 [DFB] OpenBSD 6.62019-10-17 [OBD] -macOS 10.152019-10.29 [APL] +macOS 10.152019-10-07 [APL] macOS 10.15.1 2019-10-29 [APL] (security/critical release) FreeBSD 12.1 2019-11-04 [FBD] ___ 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: r355050 - head/share/misc
Author: eadler Date: Sun Nov 24 07:52:35 2019 New Revision: 355050 URL: https://svnweb.freebsd.org/changeset/base/355050 Log: bsd-family-tree: add several new entries Reviewed by: imp, scottl Differential Revision:https://reviews.freebsd.org/D22529 Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Sun Nov 24 06:54:17 2019 (r355049) +++ head/share/misc/bsd-family-tree Sun Nov 24 07:52:35 2019 (r355050) @@ -400,14 +400,14 @@ FreeBSD 5.2 | | | | | | | | 8.1 |DragonFly 5.6 | | | | ||| | | | | ||DragonFly 5.6.1 - | | FreeBSD| ||| - | | 11.3 | ||| + | | FreeBSD macOS||| + | | 11.3 10.15||| | FreeBSD | |OpenBSD 6.6 | - | 12.1 | ||| - | | | ||| + | 12.1 macOS||| + | | 10.15.1 ||DragonFly 5.6.2 | v | ||| || ||| -FreeBSD 13 -current | NetBSD -current OpenBSD -current DragonFly -current +FreeBSD 13 -current | NetBSD -current OpenBSD -currentDragonFly -current || ||| vv vvv @@ -793,7 +793,10 @@ NetBSD 8.1 2019-06-04 [NBD] DragonFly 5.6 2019-06-17 [DFB] DragonFly 5.6.12019-06-19 [DFB] FreeBSD 11.3 2019-07-09 [FBD] +DragonFly 5.6.22019-08-11 [DFB] OpenBSD 6.62019-10-17 [OBD] +macOS 10.152019-10.29 [APL] +macOS 10.15.1 2019-10-29 [APL] (security/critical release) FreeBSD 12.1 2019-11-04 [FBD] Bibliography ___ 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: r349890 - head/contrib/telnet/telnet
On Wed, 10 Jul 2019 at 10:42, Philip Paeps wrote: > Author: philip > Date: Wed Jul 10 17:42:04 2019 > New Revision: 349890 > URL: https://svnweb.freebsd.org/changeset/base/349890 > > Log: > telnet: fix a couple of snprintf() buffer overflows > > Obtained from:Juniper Networks > MFC after:1 week > > Modified: > head/contrib/telnet/telnet/commands.c > head/contrib/telnet/telnet/telnet.c > head/contrib/telnet/telnet/utilities.c > > Modified: head/contrib/telnet/telnet/commands.c > > == > --- head/contrib/telnet/telnet/commands.c Wed Jul 10 17:21:59 2019 > (r349889) > +++ head/contrib/telnet/telnet/commands.c Wed Jul 10 17:42:04 2019 > (r349890) > @@ -1655,10 +1655,11 @@ env_init(void) > char hbuf[256+1]; > char *cp2 = strchr((char *)ep->value, ':'); > > - gethostname(hbuf, 256); > - hbuf[256] = '\0'; > - cp = (char *)malloc(strlen(hbuf) + strlen(cp2) + 1); > - sprintf((char *)cp, "%s%s", hbuf, cp2); > + gethostname(hbuf, sizeof(hbuf)); > + hbuf[sizeof(hbuf)-1] = '\0'; > +unsigned int buflen = strlen(hbuf) + strlen(cp2) + 1; > Shouldn't this be `size_t` ? > + cp = (char *)malloc(sizeof(char)*buflen); > sizeof(char) is always 1 and is odd to see. Don't cast the return value of `malloc`. > + snprintf((char *)cp, buflen, "%s%s", hbuf, cp2); > Is the cast of `cp` here required? Also couldn't this be replaced with asprintf? free(ep->value); > ep->value = (unsigned char *)cp; > } > > Modified: head/contrib/telnet/telnet/telnet.c > > == > --- head/contrib/telnet/telnet/telnet.c Wed Jul 10 17:21:59 2019 > (r349889) > +++ head/contrib/telnet/telnet/telnet.c Wed Jul 10 17:42:04 2019 > (r349890) > @@ -785,7 +785,7 @@ suboption(void) > name = gettermname(); > len = strlen(name) + 4 + 2; > if (len < NETROOM()) { > - sprintf(temp, "%c%c%c%c%s%c%c", IAC, SB, TELOPT_TTYPE, > + snprintf(temp, sizeof(temp), "%c%c%c%c%s%c%c", IAC, SB, > TELOPT_TTYPE, > TELQUAL_IS, name, IAC, SE); > ring_supply_data(&netoring, temp, len); > printsub('>', &temp[2], len-2); > @@ -807,7 +807,7 @@ suboption(void) > > TerminalSpeeds(&ispeed, &ospeed); > > - sprintf((char *)temp, "%c%c%c%c%ld,%ld%c%c", IAC, SB, > TELOPT_TSPEED, > + snprintf((char *)temp, sizeof(temp), "%c%c%c%c%ld,%ld%c%c", > IAC, SB, TELOPT_TSPEED, > TELQUAL_IS, ospeed, ispeed, IAC, SE); > len = strlen((char *)temp+4) + 4; /* temp[3] is 0 ... */ > > > Modified: head/contrib/telnet/telnet/utilities.c > > == > --- head/contrib/telnet/telnet/utilities.c Wed Jul 10 17:21:59 2019 > (r349889) > +++ head/contrib/telnet/telnet/utilities.c Wed Jul 10 17:42:04 2019 > (r349890) > @@ -629,7 +629,7 @@ printsub(char direction, unsigned char *pointer, int l > } > { > char tbuf[64]; > - sprintf(tbuf, "%s%s%s%s%s", > + snprintf(tbuf, sizeof(tbuf), "%s%s%s%s%s", > pointer[2]&MODE_EDIT ? "|EDIT" : "", > pointer[2]&MODE_TRAPSIG ? "|TRAPSIG" : "", > pointer[2]&MODE_SOFT_TAB ? "|SOFT_TAB" : "", > > -- Eitan Adler ___ 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: r340294 - head/sys/compat/freebsd32
On Fri, 9 Nov 2018 at 10:19, Brooks Davis wrote: > > On Fri, Nov 09, 2018 at 06:03:01PM +, Brooks Davis wrote: > > Author: brooks > > Date: Fri Nov 9 18:03:01 2018 > > New Revision: 340294 > > URL: https://svnweb.freebsd.org/changeset/base/340294 > > > > Log: > > Fix a number of bugs in freebsd32's capabilities.conf. > > > > Bugs range from failure to update after changing syscall implementaion > > names to using the wrong name. Somewhat confusingly, the name in > > capabilities.conf is exactly the string that appears in syscalls.master, > > not the name with a COMPAT* prefix which is the actual function name. > > > > Found while making a change to use the default capabilities.conf. Is there any automated way to detect this in the future? Can we add some test that detect non-existent syscalls or the like? -- Eitan Adler ___ 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: r339484 - head/share/misc
Author: eadler Date: Sat Oct 20 20:34:36 2018 New Revision: 339484 URL: https://svnweb.freebsd.org/changeset/base/339484 Log: bsd-family-tree: Announce two new releases - OpenBSD 6.4; NetBSD 7.2 Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Sat Oct 20 20:34:30 2018 (r339483) +++ head/share/misc/bsd-family-tree Sat Oct 20 20:34:36 2018 (r339484) @@ -368,13 +368,14 @@ FreeBSD 5.2 | | | | | | | NetBSD 7.1.2| | | | | | | | | | | | | | OpenBSD 6.3 | - | | | | | | DragonFly 5.2.0 - | | | | | | | + | | | NetBSD| | DragonFly 5.2.0 + | | |8.0 | | | | | | | | | DragonFly 5.2.1 | | | | | | | | | | | | | DragonFly 5.2.2 - | FreeBSD | | NetBSD 8.0 | | + | FreeBSD | | NetBSD 7.2 | | | 11.2 | | | | | + | | | | | OpenBSD 6.4 | | v | | | | | || | v | | FreeBSD 12 -current | NetBSD -current OpenBSD -currentDragonFly -current @@ -752,6 +753,8 @@ DragonFly 5.2.1 2018-05-20 [DFB] DragonFly 5.2.22018-06-18 [DFB] FreeBSD 11.2 2018-06-27 [FBD] NetBSD 8.0 2018-07-17 [NBD] +NetBSD 7.2 2018-08-29 [NBD] +OpenBSD 6.42018-10-18 [OBD] Bibliography ___ 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: r338182 - in head: sbin/nvmecontrol sys/cam/nvme sys/dev/mpr sys/dev/nvme sys/sys usr.sbin/bhyve
On Tue, 21 Aug 2018 at 21:29, Chuck Tuffli wrote: > > Author: chuck > Date: Wed Aug 22 04:29:24 2018 > New Revision: 338182 > URL: https://svnweb.freebsd.org/changeset/base/338182 > > Log: > Make NVMe compatible with the original API This breaks sysutils/smartmontools. Would you be willing to patch the port and/or submitting a diff upstream? -- Eitan Adler ___ 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: r338189 - head/usr.bin/top
Author: eadler Date: Wed Aug 22 10:07:15 2018 New Revision: 338189 URL: https://svnweb.freebsd.org/changeset/base/338189 Log: top(1): Use warnx and errx instead of fprintf This also makes make "-v" exit without error, since it isn't. Modified: head/usr.bin/top/display.c head/usr.bin/top/screen.c head/usr.bin/top/top.c head/usr.bin/top/top.h Modified: head/usr.bin/top/display.c == --- head/usr.bin/top/display.c Wed Aug 22 10:04:42 2018(r338188) +++ head/usr.bin/top/display.c Wed Aug 22 10:07:15 2018(r338189) @@ -34,6 +34,7 @@ #include #include +#include #include #include #include @@ -1351,9 +1352,7 @@ setup_buffer(char *buffer, int addlen) } if (NULL == b) { - fprintf(stderr, "%s: can't allocate sufficient memory\n", - myname); - exit(4); + errx(4, "can't allocate sufficient memory"); } return b; Modified: head/usr.bin/top/screen.c == --- head/usr.bin/top/screen.c Wed Aug 22 10:04:42 2018(r338188) +++ head/usr.bin/top/screen.c Wed Aug 22 10:07:15 2018(r338189) @@ -21,6 +21,8 @@ */ #include + +#include #include #include #include @@ -94,12 +96,11 @@ init_termcap(bool interactive) { if (status == -1) { - fprintf(stderr, "%s: can't open termcap file\n", myname); + warnx("can't open termcap file"); } else { - fprintf(stderr, "%s: no termcap entry for a `%s' terminal\n", - myname, term_name); + warnx("no termcap entry for a `%s' terminal", term_name); } /* pretend it's dumb and proceed */ Modified: head/usr.bin/top/top.c == --- head/usr.bin/top/top.c Wed Aug 22 10:04:42 2018(r338188) +++ head/usr.bin/top/top.c Wed Aug 22 10:07:15 2018(r338189) @@ -68,7 +68,6 @@ static int max_topn; /* maximum displayable processes /* miscellaneous things */ struct process_select ps; -const char * myname = "top"; pid_t mypid; /* pointers to display routines */ @@ -265,18 +264,6 @@ main(int argc, char *argv[]) setbuffer(stdout, stdoutbuf, Buffersize); #endif -if (argc > 0) -{ - if ((myname = strrchr(argv[0], '/')) == 0) - { - myname = argv[0]; - } - else - { - myname++; - } -} - mypid = getpid(); /* get our name */ @@ -323,9 +310,8 @@ main(int argc, char *argv[]) switch(i) { case 'v': /* show version number */ - fprintf(stderr, "%s: version FreeBSD\n", myname); - exit(1); - break; + errx(0, "version FreeBSD"); + break; case 'u': /* toggle uid/username display */ do_unames = !do_unames; @@ -334,8 +320,7 @@ main(int argc, char *argv[]) case 'U': /* display only username's processes */ if ((ps.uid[0] = userid(optarg)) == -1) { - fprintf(stderr, "%s: unknown user\n", optarg); - exit(1); + errx(1, "%s: unknown user\n", optarg); } break; @@ -363,9 +348,7 @@ main(int argc, char *argv[]) case 'd': /* number of displays to show */ if ((i = atoiwi(optarg)) == Invalid || i == 0) { - fprintf(stderr, - "%s: warning: display count should be positive -- option ignored\n", - myname); + warnx("warning: display count should be positive -- option ignored"); warnings++; } else @@ -395,9 +378,7 @@ main(int argc, char *argv[]) warnings++; } if (delay < 0) { - fprintf(stderr, - "%s: warning: seconds delay should be positive -- using default\n", - myname); + warnx("warning: seconds delay should be positive -- using default"); delay = 2; warnings++; } @@ -408,8 +389,7 @@ main(int argc, char *argv[]) errno = 0; i = setpriority(PRIO_PROCESS, 0, PRIO_MIN); if (i == -1 && errno != 0) { - fprintf(stderr, - "%s: wa
svn commit: r338187 - head/usr.bin/top
Author: eadler Date: Wed Aug 22 09:49:38 2018 New Revision: 338187 URL: https://svnweb.freebsd.org/changeset/base/338187 Log: top(1): issue warning on invalid delay When top -sH is run it continually updates. It should issue an warning instead. Reported by: jmg PR: 230803 Modified: head/usr.bin/top/top.c Modified: head/usr.bin/top/top.c == --- head/usr.bin/top/top.c Wed Aug 22 09:27:40 2018(r338186) +++ head/usr.bin/top/top.c Wed Aug 22 09:49:38 2018(r338187) @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -253,6 +254,7 @@ main(int argc, char *argv[]) char *order_name = NULL; int order_index = 0; fd_set readfds; + char *nptr; /* set the buffer for stdout */ #ifdef DEBUG @@ -386,7 +388,12 @@ main(int argc, char *argv[]) } case 's': - delay = strtod(optarg, NULL); + delay = strtod(optarg, &nptr); + if (nptr == optarg) { + warnx("warning: invalid delay"); + delay = 2; + warnings++; + } if (delay < 0) { fprintf(stderr, "%s: warning: seconds delay should be positive -- using default\n", ___ 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: r338042 - in head: . targets/pseudo/userland usr.bin usr.bin/send-pr usr.sbin/crunch/examples
Author: eadler Date: Sun Aug 19 07:12:35 2018 New Revision: 338042 URL: https://svnweb.freebsd.org/changeset/base/338042 Log: send-pr: wave goodbye Entering into the world of 12.x we no longer need even the placeholder for send-pr. It has not done anything for some time. With Hat: bugmeister Deleted: head/usr.bin/send-pr/Makefile head/usr.bin/send-pr/Makefile.depend head/usr.bin/send-pr/send-pr.sh Modified: head/ObsoleteFiles.inc head/targets/pseudo/userland/Makefile.depend head/usr.bin/Makefile head/usr.sbin/crunch/examples/really-big.conf Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Sun Aug 19 07:05:33 2018(r338041) +++ head/ObsoleteFiles.inc Sun Aug 19 07:12:35 2018(r338042) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20180819: send-pr(1) placeholder removal +OLD_FILES+=usr/bin/send-pr # 20180725: Cleanup old libcasper.so.0 OLD_LIBS+=lib/libcasper.so.0 # 20180722: indent(1) option renamed, test files follow Modified: head/targets/pseudo/userland/Makefile.depend == --- head/targets/pseudo/userland/Makefile.dependSun Aug 19 07:05:33 2018(r338041) +++ head/targets/pseudo/userland/Makefile.dependSun Aug 19 07:12:35 2018(r338042) @@ -320,7 +320,6 @@ DIRDEPS+= \ usr.bin/script \ usr.bin/sdiff \ usr.bin/sed \ - usr.bin/send-pr \ usr.bin/seq \ usr.bin/shar \ usr.bin/showmount \ Modified: head/usr.bin/Makefile == --- head/usr.bin/Makefile Sun Aug 19 07:05:33 2018(r338041) +++ head/usr.bin/Makefile Sun Aug 19 07:12:35 2018(r338042) @@ -135,7 +135,6 @@ SUBDIR= alias \ script \ sdiff \ sed \ - send-pr \ seq \ shar \ showmount \ Modified: head/usr.sbin/crunch/examples/really-big.conf == --- head/usr.sbin/crunch/examples/really-big.conf Sun Aug 19 07:05:33 2018(r338041) +++ head/usr.sbin/crunch/examples/really-big.conf Sun Aug 19 07:12:35 2018(r338042) @@ -110,7 +110,6 @@ progs ypbind ypwhich ypcat ypmatch ypset yppoll srcdirs /usr/src/gnu/usr.bin progs bc cpio diff diff3 gas gawk grep gzip sdiff sort tar -# shell scripts: send-pr srcdirs /usr/src/gnu/usr.bin/ld# ldd and ldconfig progs ld ldd ldconfig ___ 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: r338041 - head/targets/pseudo/userland
Author: eadler Date: Sun Aug 19 07:05:33 2018 New Revision: 338041 URL: https://svnweb.freebsd.org/changeset/base/338041 Log: build: remove reference to some dead utilities Modified: head/targets/pseudo/userland/Makefile.depend Modified: head/targets/pseudo/userland/Makefile.depend == --- head/targets/pseudo/userland/Makefile.dependSun Aug 19 04:15:38 2018(r338040) +++ head/targets/pseudo/userland/Makefile.dependSun Aug 19 07:05:33 2018(r338041) @@ -286,9 +286,6 @@ DIRDEPS+= \ usr.bin/nice \ usr.bin/nl \ usr.bin/nohup \ - usr.bin/nslookup \ - usr.bin/nsupdate \ - usr.bin/numactl \ usr.bin/opieinfo \ usr.bin/opiekey \ usr.bin/opiepasswd \ @@ -761,7 +758,6 @@ DIRDEPS+= \ usr.sbin/zic/zic \ usr.sbin/zonectl \ ${DEP_RELDIR}/cddl \ - ${DEP_RELDIR}/games \ ${DEP_RELDIR}/gnu \ ${DEP_RELDIR}/include \ ${DEP_RELDIR}/kerberos5 \ ___ 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: r337892 - head/share/misc
Author: eadler Date: Thu Aug 16 07:34:10 2018 New Revision: 337892 URL: https://svnweb.freebsd.org/changeset/base/337892 Log: [pci_vendors] Update pci_vendors to 2018.08.12 Modified: head/share/misc/pci_vendors Modified: head/share/misc/pci_vendors == --- head/share/misc/pci_vendors Thu Aug 16 07:13:36 2018(r337891) +++ head/share/misc/pci_vendors Thu Aug 16 07:34:10 2018(r337892) @@ -2,8 +2,8 @@ # List of PCI ID's # -# Version: 2018.04.06 -# Date:2018-04-06 03:15:02 +# Version: 2018.08.12 +# Date:2018-08-12 03:15:01 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -27,6 +27,7 @@ # This is a relabelled RTL-8139 8139 AT-2500TX V3 Ethernet 0014 Loongson Technology LLC + 7a00 Hyper Transport Bridge Controller 7a02 APB (Advanced Peripheral Bus) Controller 7a03 Gigabit Ethernet Controller 7a04 OTG USB Controller @@ -34,9 +35,15 @@ 7a06 DC (Display Controller) 7a07 HDA (High Definition Audio) Controller 7a08 SATA AHCI Controller + 7a09 PCI-to-PCI Bridge + 7a0b SPI Controller + 7a0c LPC Controller 7a0f DMA (Direct Memory Access) Controller 7a14 EHCI USB Controller + 7a15 Vivante GPU (Graphics Processing Unit) + 7a19 PCI-to-PCI Bridge 7a24 OHCI USB Controller + 7a29 PCI-to-PCI Bridge 001c PEAK-System Technik GmbH 0001 PCAN-PCI CAN-Bus controller 001c 0004 2 Channel CAN Bus SJC1000 @@ -74,6 +81,7 @@ 000a TTP-Monitoring Card V2.0 0432 SCM Microsystems, Inc. 0001 Pluto2 DVB-T Receiver for PCMCIA [EasyWatch MobilSet] +0497 Dell Inc. (wrong ID) 0675 Dynalink 1700 IS64PH ISDN Adapter 1702 IS64PH ISDN Adapter @@ -421,6 +429,7 @@ 17aa 1052 ThinkServer RAID 720i 17aa 1053 ThinkServer RAID 720ix 1d49 0600 ThinkSystem RAID 730-8i 1GB Cache PCIe 12Gb Adapter + 1d49 0608 ThinkSystem RAID 730-8i 2GB Flash PCIe 12Gb Adapter 1d49 0609 ThinkSystem RAID 730-8i 4GB Flash PCIe 12Gb Adapter 8086 351e RMS3CC080 RAID Controller 8086 351f RMS3CC040 RAID Controller @@ -476,6 +485,7 @@ 0070 SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire] 0071 MR SAS HBA 2004 0072 SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] + 1000 30b0 9200-8e [LSI SAS 6Gb/s SAS/SATA PCIe x8 External HBA] 1028 1f1c 6Gbps SAS HBA Adapter 1028 1f1d PERC H200 Adapter 1028 1f1e PERC H200 Integrated @@ -643,6 +653,8 @@ 02b0 Virtual Endpoint on PCIe Switch 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter 1d49 0002 ThinkSystem 810-4P NVMe Switch Adapter + 02b1 Virtual Endpoint on PCIe Switch (9749) + 1d49 0004 Lenovo ThinkSystem 1610-8P NVMe Switch Adapter 0407 MegaRAID 1000 0530 MegaRAID 530 SCSI 320-0X RAID Controller 1000 0531 MegaRAID 531 SCSI 320-4X RAID Controller @@ -765,10 +777,11 @@ 131b Kaveri [Radeon R4 Graphics] 131c Kaveri [Radeon R7 Graphics] 131d Kaveri [Radeon R6 Graphics] + 15d8 Picasso 15dd Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] 103c 83c6 Radeon Vega 8 Mobile 1458 d000 Radeon RX Vega 11 - 15ff Vega [Radeon Vega 28 Mobile] + 15ff Vega 11 [Radeon Vega 28 Mobile] 1714 BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series] 103c 168b ProBook 4535s 3150 RV380/M24 [Mobility Radeon X600] @@ -1200,7 +1213,7 @@ 13bd 1019 PC-AR10 4c50 Rage 3 LT [3D Rage LT PRO PCI] 1002 4c50 Rage LT Pro - 4c52 Rage Mobility-M1 PCI + 4c52 M1 [Rage Mobility-M1 PCI] 1033 8112 Versa Note VXi 4c54 264LT [Mach64 LT] 4c57 RV200/M7 [Mobility Radeon 7500] @@ -1616,6 +1629,7 @@ 6602 Mars 6603 Mars 6604 Opal XT [Radeon R7 M265/M365X/M465] + 1025 0776 Aspire V5 Radeon R7 M265 103c 8006 FirePro M4170 103c 814f Litho XT [Radeon R7 M365X] 103c 82aa Litho XT [Radeon R7 M465] @@ -1708,11 +1722,11 @@ 17aa 368f Radeon R5 A230 6667 Jet ULT [Radeon R5 M230] 666f Sun LE [Radeon HD 8550M / R5 M230] - 66a0 Vega 20 + 66a0 Vega 20 [Radeon Instinct] 66a1 Vega 20 66a2 Vega 20 66a3 Vega 20 - 66a7 Vega 20 + 66a7 Vega 20 [Radeon Pro Vega 20] 66af Vega 20 6704 Cayman PRO GL [FirePro V7900] 6707 Cayman LE GL [FirePro V5900] @@ -2314,
Re: svn commit: r337442 - in head/contrib/file: . doc magic magic/Magdir python src tests
On Tue, 14 Aug 2018 at 14:37, Kyle Evans wrote: > > On Tue, Aug 7, 2018 at 8:33 PM, Eitan Adler wrote: > > Author: eadler > > Date: Wed Aug 8 01:33:36 2018 > > New Revision: 337442 > > URL: https://svnweb.freebsd.org/changeset/base/337442 > > > > Log: > > file: update to 5.34 > > > > PR: 230141 > > exp-run by: antoine > > > > Hi, > > Do you have any plans to MFC this and the previous update to stable/11? Done in 337827. I have no plans to MFC this to stable/10 -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams ___ 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: r337505 - head/bin/dd
On Wed, 8 Aug 2018 at 14:37, Kyle Evans wrote: > +/* ARGSUSED */ We've been slowly delintifying system utilities. Why do we still keep these comments? > +void > +sigalrm_handler(int signo __unused) > +{ > + > + need_progress = 1; > } -- Eitan Adler ___ 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: r337448 - head/usr.bin/top
Author: eadler Date: Wed Aug 8 06:31:46 2018 New Revision: 337448 URL: https://svnweb.freebsd.org/changeset/base/337448 Log: top(1): hide THR column in separate-thread mode. It does not make sense to show a "thread count" column when displaying threads separately. In fact we don't, but do show the header for this column. Fix this. Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Wed Aug 8 04:46:03 2018(r337447) +++ head/usr.bin/top/machine.c Wed Aug 8 06:31:46 2018(r337448) @@ -388,7 +388,10 @@ format_header(const char *uname_field) sbuf_printf(header, "%*s", ps.jail ? TOP_JID_LEN : 0, ps.jail ? " JID" : ""); sbuf_printf(header, " %-*.*s ", namelength, namelength, uname_field); - sbuf_cat(header, "THR PRI NICE SIZERES "); + if (!ps.thread) { + sbuf_cat(header, "THR "); + } + sbuf_cat(header, "PRI NICE SIZERES "); if (ps.swap) { sbuf_printf(header, "%*s ", TOP_SWAP_LEN - 1, "SWAP"); } ___ 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: r337442 - in head/contrib/file: . doc magic magic/Magdir python src tests
Author: eadler Date: Wed Aug 8 01:33:36 2018 New Revision: 337442 URL: https://svnweb.freebsd.org/changeset/base/337442 Log: file: update to 5.34 PR: 230141 exp-run by: antoine Added: head/contrib/file/magic/Magdir/dataone - copied unchanged from r336862, vendor/file/dist/magic/Magdir/dataone head/contrib/file/python/CHANGELOG.md - copied unchanged from r336862, vendor/file/dist/python/CHANGELOG.md head/contrib/file/python/LICENSE - copied unchanged from r336862, vendor/file/dist/python/LICENSE head/contrib/file/python/README.md - copied unchanged from r336862, vendor/file/dist/python/README.md head/contrib/file/python/tests.py - copied unchanged from r336862, vendor/file/dist/python/tests.py head/contrib/file/tests/JW07022A.mp3.result - copied unchanged from r336862, vendor/file/dist/tests/JW07022A.mp3.result head/contrib/file/tests/JW07022A.mp3.testfile - copied unchanged from r336862, vendor/file/dist/tests/JW07022A.mp3.testfile Deleted: head/contrib/file/python/README Modified: head/contrib/file/ChangeLog head/contrib/file/Makefile.in head/contrib/file/README head/contrib/file/aclocal.m4 head/contrib/file/compile head/contrib/file/config.guess head/contrib/file/config.h.in head/contrib/file/config.sub head/contrib/file/configure head/contrib/file/configure.ac head/contrib/file/depcomp head/contrib/file/doc/Makefile.in head/contrib/file/doc/file.man head/contrib/file/doc/magic.man head/contrib/file/install-sh head/contrib/file/ltmain.sh head/contrib/file/magic/Magdir/animation head/contrib/file/magic/Magdir/archive head/contrib/file/magic/Magdir/audio head/contrib/file/magic/Magdir/cad head/contrib/file/magic/Magdir/console head/contrib/file/magic/Magdir/database head/contrib/file/magic/Magdir/dbpf head/contrib/file/magic/Magdir/dump head/contrib/file/magic/Magdir/elf head/contrib/file/magic/Magdir/fsav head/contrib/file/magic/Magdir/images head/contrib/file/magic/Magdir/linux head/contrib/file/magic/Magdir/make head/contrib/file/magic/Magdir/measure head/contrib/file/magic/Magdir/msdos head/contrib/file/magic/Magdir/msooxml head/contrib/file/magic/Magdir/pdf head/contrib/file/magic/Magdir/sgi head/contrib/file/magic/Makefile.am head/contrib/file/magic/Makefile.in head/contrib/file/missing head/contrib/file/python/Makefile.am head/contrib/file/python/Makefile.in head/contrib/file/python/magic.py head/contrib/file/python/setup.py head/contrib/file/src/Makefile.in head/contrib/file/src/apprentice.c head/contrib/file/src/compress.c head/contrib/file/src/der.c head/contrib/file/src/file.h head/contrib/file/src/funcs.c head/contrib/file/src/readcdf.c head/contrib/file/src/readelf.c head/contrib/file/src/readelf.h head/contrib/file/src/seccomp.c head/contrib/file/src/softmagic.c head/contrib/file/tests/Makefile.am head/contrib/file/tests/Makefile.in Directory Properties: head/contrib/file/ (props changed) Modified: head/contrib/file/ChangeLog == --- head/contrib/file/ChangeLog Wed Aug 8 01:20:02 2018(r337441) +++ head/contrib/file/ChangeLog Wed Aug 8 01:33:36 2018(r337442) @@ -1,3 +1,15 @@ +2018-07-25 8:50 Christos Zoulas + + * release 5.34 + +2018-06-22 16:38 Christos Zoulas + + * Add Quad indirect offsets + +2018-05-24 14:10 Christos Zoulas + + * Enable parsing of ELF dynamic sections to handle PIE better + 2018-04-15 14:52 Christos Zoulas * release 5.33 Modified: head/contrib/file/Makefile.in == --- head/contrib/file/Makefile.in Wed Aug 8 01:20:02 2018 (r337441) +++ head/contrib/file/Makefile.in Wed Aug 8 01:33:36 2018 (r337442) @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,23 +14,61 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ -am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ +false; \ + elif test -n '$(MAKE_HOST)'; then \ +true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ +true; \ + else \ +false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make)
Re: svn commit: r337157 - in head: . tools/tools/git
On Sat, 4 Aug 2018 at 10:16, Warner Losh wrote: > > > > On Sat, Aug 4, 2018, 6:08 PM Eitan Adler wrote: >> >> On Thu, 2 Aug 2018 at 11:28, Ben Widawsky wrote: >> > +git_checkout() >> > +{ >> > + # Delete master >> > + ${GIT} branch -D master >> > + >> > + # Make master really be trunk >> > + ${GIT} checkout -b master trunk >> >> Can't this be git branch --force master trunk ? > > > No. That won't work. We do not want to change the location of master. This > will reset it to trunk, which is nearly always wrong. See this: ${GIT} branch -D master ${GIT} checkout -b master trunk For clarity I'd expect something closer to: git branch --force master trunk git checkout master The end result is the same, but IMHO this is clearer in intent. -- Eitan Adler ___ 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: r337157 - in head: . tools/tools/git
On Thu, 2 Aug 2018 at 11:28, Ben Widawsky wrote: > +git_checkout() > +{ > + # Delete master > + ${GIT} branch -D master > + > + # Make master really be trunk > + ${GIT} checkout -b master trunk Can't this be git branch --force master trunk ? -- Eitan Adler ___ 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: r336867 - head/sbin/devd [This broke the gcc 4.2.1 based builds for ci.freebsd.org 's FreeBSD-head-*-build 's]
On Sun, 29 Jul 2018 at 13:13, Mark Millard wrote: > > For example: > > https://ci.freebsd.org/job/FreeBSD-head-powerpc64-build/6718/consoleText Thanks! I had thought that nullptr is older than it actually is. Reverted. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams ___ 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: r336877 - head/sbin/devd
Author: eadler Date: Sun Jul 29 21:00:18 2018 New Revision: 336877 URL: https://svnweb.freebsd.org/changeset/base/336877 Log: Revert "devd: use C++ style casts" It seems that nullptr is not yet supported by all compilers used by FreeBSD. :( Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc == --- head/sbin/devd/devd.cc Sun Jul 29 20:47:00 2018(r336876) +++ head/sbin/devd/devd.cc Sun Jul 29 21:00:18 2018(r336877) @@ -262,12 +262,12 @@ my_system(const char *command) */ cfg.close_pidfile(); ::closefrom(3); - ::execl(_PATH_BSHELL, "sh", "-c", command, nullptr); + ::execl(_PATH_BSHELL, "sh", "-c", command, (char *)NULL); ::_exit(127); default:/* parent */ savedpid = pid; do { - pid = ::wait4(savedpid, &pstat, 0, nullptr); + pid = ::wait4(savedpid, &pstat, 0, (struct rusage *)0); } while (pid == -1 && errno == EINTR); break; } @@ -374,7 +374,7 @@ media::do_match(config &c) memset(&ifmr, 0, sizeof(ifmr)); strlcpy(ifmr.ifm_name, value.c_str(), sizeof(ifmr.ifm_name)); - if (ioctl(s, SIOCGIFMEDIA, &ifmr) >= 0 && + if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) >= 0 && ifmr.ifm_status & IFM_AVALID) { devdlog(LOG_DEBUG, "%s has media type 0x%x\n", value.c_str(), IFM_TYPE(ifmr.ifm_active)); @@ -527,7 +527,7 @@ config::open_pidfile() pfh = pidfile_open(_pidfile.c_str(), 0600, &otherpid); if (pfh == NULL) { if (errno == EEXIST) - errx(1, "devd already running, pid: %d", static_cast(otherpid)); + errx(1, "devd already running, pid: %d", (int)otherpid); warn("cannot open pid file"); } } @@ -854,7 +854,7 @@ process_event(char *buffer) // Save the time this happened (as approximated by when we got // around to processing it). gettimeofday(&tv, NULL); - asprintf(×tr, "%jd.%06ld", static_cast(tv.tv_sec), tv.tv_usec); + asprintf(×tr, "%jd.%06ld", (uintmax_t)tv.tv_sec, tv.tv_usec); cfg.set_variable("timestamp", timestr); free(timestr); @@ -919,7 +919,7 @@ create_socket(const char *name, int socktype) unlink(name); if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) err(1, "fcntl"); - if (::bind(fd, reinterpret_cast(&sun), slen) < 0) + if (::bind(fd, (struct sockaddr *) & sun, slen) < 0) err(1, "bind"); listen(fd, 4); if (chown(name, 0, 0)) /* XXX - root.wheel */ ___ 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: r336866 - head/sbin/devd
Author: eadler Date: Sun Jul 29 08:43:05 2018 New Revision: 336866 URL: https://svnweb.freebsd.org/changeset/base/336866 Log: devd: use static where possible Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc == --- head/sbin/devd/devd.cc Sun Jul 29 07:51:42 2018(r336865) +++ head/sbin/devd/devd.cc Sun Jul 29 08:43:05 2018(r336866) @@ -904,7 +904,7 @@ process_event(char *buffer) cfg.pop_var_table(); } -int +static int create_socket(const char *name, int socktype) { int fd, slen; @@ -934,7 +934,7 @@ static unsigned int num_clients; static list clients; -void +static void notify_clients(const char *data, int len) { list::iterator i; @@ -964,7 +964,7 @@ notify_clients(const char *data, int len) } } -void +static void check_clients(void) { int s; @@ -994,7 +994,7 @@ check_clients(void) } } -void +static void new_client(int fd, int socktype) { client_t s; ___ 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: r336867 - head/sbin/devd
Author: eadler Date: Sun Jul 29 08:43:08 2018 New Revision: 336867 URL: https://svnweb.freebsd.org/changeset/base/336867 Log: devd: use C++ style casts Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc == --- head/sbin/devd/devd.cc Sun Jul 29 08:43:05 2018(r336866) +++ head/sbin/devd/devd.cc Sun Jul 29 08:43:08 2018(r336867) @@ -262,12 +262,12 @@ my_system(const char *command) */ cfg.close_pidfile(); ::closefrom(3); - ::execl(_PATH_BSHELL, "sh", "-c", command, (char *)NULL); + ::execl(_PATH_BSHELL, "sh", "-c", command, nullptr); ::_exit(127); default:/* parent */ savedpid = pid; do { - pid = ::wait4(savedpid, &pstat, 0, (struct rusage *)0); + pid = ::wait4(savedpid, &pstat, 0, nullptr); } while (pid == -1 && errno == EINTR); break; } @@ -374,7 +374,7 @@ media::do_match(config &c) memset(&ifmr, 0, sizeof(ifmr)); strlcpy(ifmr.ifm_name, value.c_str(), sizeof(ifmr.ifm_name)); - if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) >= 0 && + if (ioctl(s, SIOCGIFMEDIA, &ifmr) >= 0 && ifmr.ifm_status & IFM_AVALID) { devdlog(LOG_DEBUG, "%s has media type 0x%x\n", value.c_str(), IFM_TYPE(ifmr.ifm_active)); @@ -527,7 +527,7 @@ config::open_pidfile() pfh = pidfile_open(_pidfile.c_str(), 0600, &otherpid); if (pfh == NULL) { if (errno == EEXIST) - errx(1, "devd already running, pid: %d", (int)otherpid); + errx(1, "devd already running, pid: %d", static_cast(otherpid)); warn("cannot open pid file"); } } @@ -854,7 +854,7 @@ process_event(char *buffer) // Save the time this happened (as approximated by when we got // around to processing it). gettimeofday(&tv, NULL); - asprintf(×tr, "%jd.%06ld", (uintmax_t)tv.tv_sec, tv.tv_usec); + asprintf(×tr, "%jd.%06ld", static_cast(tv.tv_sec), tv.tv_usec); cfg.set_variable("timestamp", timestr); free(timestr); @@ -919,7 +919,7 @@ create_socket(const char *name, int socktype) unlink(name); if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) err(1, "fcntl"); - if (::bind(fd, (struct sockaddr *) & sun, slen) < 0) + if (::bind(fd, reinterpret_cast(&sun), slen) < 0) err(1, "bind"); listen(fd, 4); if (chown(name, 0, 0)) /* XXX - root.wheel */ ___ 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: r336864 - head/usr.bin/truncate
Author: eadler Date: Sun Jul 29 07:51:40 2018 New Revision: 336864 URL: https://svnweb.freebsd.org/changeset/base/336864 Log: truncate: use better type for 'round' Modified: head/usr.bin/truncate/truncate.c Modified: head/usr.bin/truncate/truncate.c == --- head/usr.bin/truncate/truncate.cSun Jul 29 05:54:54 2018 (r336863) +++ head/usr.bin/truncate/truncate.cSun Jul 29 07:51:40 2018 (r336864) @@ -51,7 +51,7 @@ main(int argc, char **argv) { struct stat sb; mode_t omode; - off_t oflow, rsize, sz, tsize; + off_t oflow, rsize, sz, tsize, round; uint64_t usz; int ch, error, fd, oflags; int no_create; @@ -59,7 +59,6 @@ main(int argc, char **argv) int do_round; int do_refer; int got_size; - int round; char *fname, *rname; fd = -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: r336865 - head/usr.bin/truncate
Author: eadler Date: Sun Jul 29 07:51:42 2018 New Revision: 336865 URL: https://svnweb.freebsd.org/changeset/base/336865 Log: truncate: delintify Modified: head/usr.bin/truncate/truncate.c Modified: head/usr.bin/truncate/truncate.c == --- head/usr.bin/truncate/truncate.cSun Jul 29 07:51:40 2018 (r336864) +++ head/usr.bin/truncate/truncate.cSun Jul 29 07:51:42 2018 (r336865) @@ -27,10 +27,8 @@ * */ -#ifndef lint static const char rcsid[] = "$FreeBSD$"; -#endif #include ___ 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: r336799 - head/tools/build
Author: eadler Date: Sat Jul 28 00:33:40 2018 New Revision: 336799 URL: https://svnweb.freebsd.org/changeset/base/336799 Log: tools/build/beinstall.sh: Use some slightly better shell syntax; reduce duplication This is is a first pass at improving the be installer. Reviewed By: will Differential Revision: https://reviews.freebsd.org/D16081 Modified: head/tools/build/beinstall.sh Modified: head/tools/build/beinstall.sh == --- head/tools/build/beinstall.sh Fri Jul 27 23:38:31 2018 (r336798) +++ head/tools/build/beinstall.sh Sat Jul 28 00:33:40 2018 (r336799) @@ -69,7 +69,7 @@ cleanup() { errx() { cleanup - echo "error: $*" + echo "error: $@" exit 1 } @@ -107,16 +107,17 @@ if [ -e .git ] ; then [ $? -ne 0 ] && errx "Can't lookup git commit timestamp" commit_ts=$(date -r ${commit_time} '+%Y%m%d.%H%M%S') elif [ -d .svn ] ; then -if [ -f /usr/bin/svnlite ]; then -commit_ts=$( svnlite info --show-item last-changed-date | sed -e 's/\..*//' -e 's/T/./' -e 's/-//g' -e s'/://g' ) -elif [ -f /usr/local/bin/svn ]; then -commit_ts=$( svn info --show-item last-changed-date | sed -e 's/\..*//' -e 's/T/./' -e 's/-//g' -e s'/://g' ) -else -errx "Can't lookup Subversion commit timestamp" -fi + if [ -e /usr/bin/svnlite ]; then +svn=/usr/bin/svnlite + elif [ -e /usr/local/bin/svn ]; then +svn=/usr/local/bin/svn + else +errx "Unable to find subversion" + fi + commit_ts="$( "$svn" info --show-item last-changed-date | sed -e 's/\..*//' -e 's/T/./' -e 's/-//g' -e s'/://g' )" [ $? -ne 0 ] && errx "Can't lookup Subversion commit timestamp" else -errx "Unable to determine sandbox type" +errx "Unable to determine source control type" fi commit_ver=$(${objdir}/bin/freebsd-version/freebsd-version -u 2>/dev/null) @@ -137,8 +138,8 @@ beadm create ${BENAME} >/dev/null || errx "Unable to c beadm mount ${BENAME} ${BE_TMP}/mnt || errx "Unable to mount BE ${BENAME}." echo "Mounted ${BENAME} to ${BE_MNTPT}, performing install/update ..." -make $* DESTDIR=${BE_MNTPT} installkernel || errx "Installkernel failed!" -make $* DESTDIR=${BE_MNTPT} installworld || errx "Installworld failed!" +make "$@" DESTDIR=${BE_MNTPT} installkernel || errx "Installkernel failed!" +make "$@" DESTDIR=${BE_MNTPT} installworld || errx "Installworld failed!" if [ -n "${CONFIG_UPDATER}" ]; then "update_${CONFIG_UPDATER}" ___ 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: r336758 - head/share/mk
Author: eadler Date: Fri Jul 27 10:44:38 2018 New Revision: 336758 URL: https://svnweb.freebsd.org/changeset/base/336758 Log: Feex a cuple of small typos Modified: head/share/mk/atf.test.mk head/share/mk/bsd.own.mk head/share/mk/bsd.sys.mk head/share/mk/bsd.test.mk head/share/mk/meta.sys.mk head/share/mk/plain.test.mk head/share/mk/tap.test.mk Modified: head/share/mk/atf.test.mk == --- head/share/mk/atf.test.mk Fri Jul 27 10:40:48 2018(r336757) +++ head/share/mk/atf.test.mk Fri Jul 27 10:44:38 2018(r336758) @@ -16,7 +16,7 @@ # require the ATF libraries. # # Test programs registered in this manner are set to be installed into TESTSDIR -# (which should be overriden by the Makefile) and are not required to provide a +# (which should be overridden by the Makefile) and are not required to provide a # manpage. ATF_TESTS_C?= ATF_TESTS_CXX?= Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkFri Jul 27 10:40:48 2018(r336757) +++ head/share/mk/bsd.own.mkFri Jul 27 10:44:38 2018(r336758) @@ -267,7 +267,7 @@ XZ_CMD?=xz PKG_CMD?= pkg # Pointer to the top directory into which tests are installed. Should not be -# overriden by Makefiles, but the user may choose to set this in src.conf(5). +# overridden by Makefiles, but the user may choose to set this in src.conf(5). TESTSBASE?= /usr/tests DEPENDFILE?= .depend Modified: head/share/mk/bsd.sys.mk == --- head/share/mk/bsd.sys.mkFri Jul 27 10:40:48 2018(r336757) +++ head/share/mk/bsd.sys.mkFri Jul 27 10:44:38 2018(r336758) @@ -221,7 +221,7 @@ CFLAGS+=${SSP_CFLAGS} DEBUG_FILES_CFLAGS?= -g # Allow user-specified additional warning flags, plus compiler and file -# specific flag overrides, unless we've overriden this... +# specific flag overrides, unless we've overridden this... .if ${MK_WARNS} != "no" CFLAGS+= ${CWARNFLAGS:M*} ${CWARNFLAGS.${COMPILER_TYPE}} CFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} Modified: head/share/mk/bsd.test.mk == --- head/share/mk/bsd.test.mk Fri Jul 27 10:40:48 2018(r336757) +++ head/share/mk/bsd.test.mk Fri Jul 27 10:44:38 2018(r336758) @@ -42,7 +42,7 @@ TESTS_ENV?= # Force all tests in a separate distribution file. # # We want this to be the case even when the distribution name is already -# overriden. For example: we want the tests for programs in the 'games' +# overridden. For example: we want the tests for programs in the 'games' # distribution to end up in the 'tests' distribution; the test programs # themselves have all the necessary logic to detect that the games are not # installed and thus won't cause false negatives. Modified: head/share/mk/meta.sys.mk == --- head/share/mk/meta.sys.mk Fri Jul 27 10:40:48 2018(r336757) +++ head/share/mk/meta.sys.mk Fri Jul 27 10:44:38 2018(r336758) @@ -23,7 +23,7 @@ .-include "local.meta.sys.mk" -# absoulte path to what we are reading. +# absolute path to what we are reading. _PARSEDIR = ${.PARSEDIR:tA} .if !defined(SYS_MK_DIR) Modified: head/share/mk/plain.test.mk == --- head/share/mk/plain.test.mk Fri Jul 27 10:40:48 2018(r336757) +++ head/share/mk/plain.test.mk Fri Jul 27 10:44:38 2018(r336758) @@ -16,7 +16,7 @@ # PROGS, PROGS_CXX and SCRIPTS, respectively. # # Test programs registered in this manner are set to be installed into TESTSDIR -# (which should be overriden by the Makefile) and are not required to provide a +# (which should be overridden by the Makefile) and are not required to provide a # manpage. PLAIN_TESTS_C?= PLAIN_TESTS_CXX?= Modified: head/share/mk/tap.test.mk == --- head/share/mk/tap.test.mk Fri Jul 27 10:40:48 2018(r336757) +++ head/share/mk/tap.test.mk Fri Jul 27 10:44:38 2018(r336758) @@ -18,7 +18,7 @@ # PROGS, PROGS_CXX and SCRIPTS, respectively. # # Test programs registered in this manner are set to be installed into TESTSDIR -# (which should be overriden by the Makefile) and are not required to provide a +# (which should be overridden by the Makefile) and are not required to provide a # manpage. TAP_TESTS_C?= TAP_TESTS_CXX?= ___ 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: r336757 - in head: share/man/man4 share/man/man7 share/misc sys/dev/firewire sys/dev/hwpmc sys/dev/sk sys/dev/sound/pci sys/dev/sound/pcm sys/fs/nfsclient
Author: eadler Date: Fri Jul 27 10:40:48 2018 New Revision: 336757 URL: https://svnweb.freebsd.org/changeset/base/336757 Log: Use https over http for FreeBSD pages Modified: head/share/man/man4/firewire.4 head/share/man/man7/tests.7 head/share/misc/bsd-family-tree head/sys/dev/firewire/00README head/sys/dev/hwpmc/pmc_events.h head/sys/dev/sk/if_sk.c head/sys/dev/sound/pci/maestro3.c head/sys/dev/sound/pcm/dsp.c head/sys/fs/nfsclient/nfs_clstate.c Modified: head/share/man/man4/firewire.4 == --- head/share/man/man4/firewire.4 Fri Jul 27 07:05:50 2018 (r336756) +++ head/share/man/man4/firewire.4 Fri Jul 27 10:40:48 2018 (r336757) @@ -87,7 +87,7 @@ Debugging over the firewire interace is possible with .Xr dcons 4 driver. Please see -.Pa http://wiki.freebsd.org/DebugWithDcons +.Pa https://wiki.freebsd.org/DebugWithDcons for details on how to setup debugging with firewire. .Sh FILES .Bl -tag -width "Pa /dev/fwmem0.0" -compact Modified: head/share/man/man7/tests.7 == --- head/share/man/man7/tests.7 Fri Jul 27 07:05:50 2018(r336756) +++ head/share/man/man7/tests.7 Fri Jul 27 10:40:48 2018(r336757) @@ -198,7 +198,7 @@ problem report. For more details please refer to: .Bl -bullet -offset indent -compact .It -.Lk http://lists.freebsd.org/ "FreeBSD Mailing Lists" +.Lk https://lists.freebsd.org/ "FreeBSD Mailing Lists" .It .Lk https://www.freebsd.org/support.html "Problem Reporting" .El Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Fri Jul 27 07:05:50 2018 (r336756) +++ head/share/misc/bsd-family-tree Fri Jul 27 10:40:48 2018 (r336757) @@ -814,6 +814,6 @@ Steven M. Schultz for providing 2.8BSD, 2.10BSD, 2.11B -- Copyright (c) 1997-2012 Wolfram Schneider -URL: http://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree +URL: https://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree $FreeBSD$ Modified: head/sys/dev/firewire/00README == --- head/sys/dev/firewire/00README Fri Jul 27 07:05:50 2018 (r336756) +++ head/sys/dev/firewire/00README Fri Jul 27 10:40:48 2018 (r336757) @@ -9,7 +9,7 @@ IEEE 1394 support for FreeBSD-5.X and 4.X. modified by Hidetoshi Shimokawa . Please note this driver is still under development. You can find latest snapshots under: - http://people.freebsd.org/~simokawa/ + https://people.freebsd.org/~simokawa/ named firewire-2002.tar.gz The driver consists of 6 parts: Modified: head/sys/dev/hwpmc/pmc_events.h == --- head/sys/dev/hwpmc/pmc_events.h Fri Jul 27 07:05:50 2018 (r336756) +++ head/sys/dev/hwpmc/pmc_events.h Fri Jul 27 10:40:48 2018 (r336757) @@ -36,7 +36,7 @@ * the source tree at src/share/doc/papers/hwpmc/hwpmc.ms * as well as on-line at: * - * http://wiki.freebsd.org/PmcTools/PmcHardwareHowTo + * https://wiki.freebsd.org/PmcTools/PmcHardwareHowTo * * Please refer to those resources before you attempt to modify * this file or the hwpmc driver/subsystem. Modified: head/sys/dev/sk/if_sk.c == --- head/sys/dev/sk/if_sk.c Fri Jul 27 07:05:50 2018(r336756) +++ head/sys/dev/sk/if_sk.c Fri Jul 27 10:40:48 2018(r336757) @@ -64,7 +64,7 @@ __FBSDID("$FreeBSD$"); * XMAC II datasheet online. I have put my copy at people.freebsd.org as a * convenience to others until Vitesse corrects this problem: * - * http://people.freebsd.org/~wpaul/SysKonnect/xmacii_datasheet_rev_c_9-29.pdf + * https://people.freebsd.org/~wpaul/SysKonnect/xmacii_datasheet_rev_c_9-29.pdf * * Written by Bill Paul * Department of Electrical Engineering Modified: head/sys/dev/sound/pci/maestro3.c == --- head/sys/dev/sound/pci/maestro3.c Fri Jul 27 07:05:50 2018 (r336756) +++ head/sys/dev/sound/pci/maestro3.c Fri Jul 27 10:40:48 2018 (r336757) @@ -45,7 +45,7 @@ * , http://www.zabbo.net/maestro3 * * Cameron Grant created the pcm framework used here nearly verbatim. - * , http://people.freebsd.org/~cg/template.c + * , https://people.freebsd.org/~cg/template.c * * Taku YAMAMOTO for his Maestro-1/2 FreeBSD driver and sanity reference. * Modified: head/sys/dev/sound/pcm/dsp.c == --- head/sys/dev/sound/pcm/dsp.cFri Jul 27 07:05:50 2018 (r336756) +++ head/sys/dev/sound/pcm/d
svn commit: r336707 - head/usr.bin/top
Author: eadler Date: Wed Jul 25 14:05:17 2018 New Revision: 336707 URL: https://svnweb.freebsd.org/changeset/base/336707 Log: top(1): increase number of columns for memory The original intention was 4 columns but with a usable a result. In practice this was not the case. Increase the number of columns to 5 until humanize_number learns alternative ways of presenting the number. Requested by: many Ref D15801 Modified: head/usr.bin/top/machine.c head/usr.bin/top/utils.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Wed Jul 25 13:27:20 2018(r336706) +++ head/usr.bin/top/machine.c Wed Jul 25 14:05:17 2018(r336707) @@ -388,7 +388,7 @@ format_header(const char *uname_field) sbuf_printf(header, "%*s", ps.jail ? TOP_JID_LEN : 0, ps.jail ? " JID" : ""); sbuf_printf(header, " %-*.*s ", namelength, namelength, uname_field); - sbuf_cat(header, "THR PRI NICE SIZE RES "); + sbuf_cat(header, "THR PRI NICE SIZERES "); if (ps.swap) { sbuf_printf(header, "%*s ", TOP_SWAP_LEN - 1, "SWAP"); } @@ -1064,8 +1064,8 @@ format_next_process(struct handle * xhandle, char *(*g sbuf_printf(procbuf, "%3d ", pp->ki_pri.pri_level - PZERO); sbuf_printf(procbuf, "%4s", format_nice(pp)); - sbuf_printf(procbuf, "%6s ", format_k(PROCSIZE(pp))); - sbuf_printf(procbuf, "%5s ", format_k(pagetok(pp->ki_rssize))); + sbuf_printf(procbuf, "%7s ", format_k(PROCSIZE(pp))); + sbuf_printf(procbuf, "%6s ", format_k(pagetok(pp->ki_rssize))); if (ps.swap) { sbuf_printf(procbuf, "%*s ", TOP_SWAP_LEN - 1, Modified: head/usr.bin/top/utils.c == --- head/usr.bin/top/utils.cWed Jul 25 13:27:20 2018(r336706) +++ head/usr.bin/top/utils.cWed Jul 25 14:05:17 2018(r336707) @@ -297,7 +297,7 @@ format_k(int64_t amt) ret = retarray[index]; index = (index + 1) % NUM_STRINGS; - humanize_number(ret, 5, amt * 1024, "", HN_AUTOSCALE, HN_NOSPACE); + humanize_number(ret, 6, amt * 1024, "", HN_AUTOSCALE, HN_NOSPACE); return (ret); } ___ 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: r336700 - head/usr.bin/find
Author: eadler Date: Wed Jul 25 03:42:07 2018 New Revision: 336700 URL: https://svnweb.freebsd.org/changeset/base/336700 Log: find(1): remove empty else condition reported by: brooks Modified: head/usr.bin/find/find.c head/usr.bin/find/misc.c Modified: head/usr.bin/find/find.c == --- head/usr.bin/find/find.cWed Jul 25 03:30:01 2018(r336699) +++ head/usr.bin/find/find.cWed Jul 25 03:42:07 2018(r336700) @@ -34,7 +34,6 @@ #if 0 static char sccsid[] = "@(#)find.c 8.5 (Berkeley) 8/5/94"; -#else #endif #include Modified: head/usr.bin/find/misc.c == --- head/usr.bin/find/misc.cWed Jul 25 03:30:01 2018(r336699) +++ head/usr.bin/find/misc.cWed Jul 25 03:42:07 2018(r336700) @@ -34,7 +34,6 @@ #if 0 static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/1/94"; -#else #endif #include ___ 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: r336698 - head/share/misc
Author: eadler Date: Wed Jul 25 03:29:29 2018 New Revision: 336698 URL: https://svnweb.freebsd.org/changeset/base/336698 Log: bsd-family-tree: Announce NetBSD 8.0 Use the correct date... Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Wed Jul 25 03:24:05 2018 (r336697) +++ head/share/misc/bsd-family-tree Wed Jul 25 03:29:29 2018 (r336698) @@ -751,7 +751,7 @@ DragonFly 5.2.0 2018-04-10 [DFB] DragonFly 5.2.12018-05-20 [DFB] DragonFly 5.2.22018-06-18 [DFB] FreeBSD 11.2 2018-06-27 [FBD] -NetBSD 8.0 2018-08-17 [NBD] +NetBSD 8.0 2018-07-17 [NBD] Bibliography ___ 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: r336697 - head/share/misc
Author: eadler Date: Wed Jul 25 03:24:05 2018 New Revision: 336697 URL: https://svnweb.freebsd.org/changeset/base/336697 Log: bsd-family-tree: Announce NetBSD 8.0 Obtained from:https://www.netbsd.org/releases/formal-8/ Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Wed Jul 25 03:08:11 2018 (r336696) +++ head/share/misc/bsd-family-tree Wed Jul 25 03:24:05 2018 (r336697) @@ -372,11 +372,11 @@ FreeBSD 5.2 | | | | | | | | | | | | | | | | DragonFly 5.2.1 | | | | | | | - | | | | v | DragonFly 5.2.2 - | FreeBSD | | | | - | 11.2 | | | | - | v | | | | - || | | | + | | | | | | DragonFly 5.2.2 + | FreeBSD | | NetBSD 8.0 | | + | 11.2 | | | | | + | v | | | | | + || | v | | FreeBSD 12 -current | NetBSD -current OpenBSD -currentDragonFly -current || | | | vv v v v @@ -751,6 +751,7 @@ DragonFly 5.2.0 2018-04-10 [DFB] DragonFly 5.2.12018-05-20 [DFB] DragonFly 5.2.22018-06-18 [DFB] FreeBSD 11.2 2018-06-27 [FBD] +NetBSD 8.0 2018-08-17 [NBD] Bibliography ___ 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: r335888 - in head: contrib/blacklist/bin lib/libpjdlog sbin/hastd
On Tue, 3 Jul 2018 at 08:22, John Baldwin wrote: > since GCC usually breaks > them. Could you explain what you mean or point to a prior conversation? -- Eitan Adler ___ 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: r335836 - head/usr.bin/top
On Wed, 4 Jul 2018 at 09:41, Hiroki Sato wrote: > > Are you going to back out r335836, or disagree about it? > > If there is no objection in the next 24 hours, I will commit the > attached patch. This should be a minimal change to support multibyte > characters in ARGV array depending on LC_CTYPE, not limited to UTF-8. Based on this conversation and my otherwise minimal knowledge about software localization this LGTM. Thanks! -- Eitan Adler ___ 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: r335838 - head
On 1 July 2018 at 03:05, Wolfram Schneider wrote: > # > # Require DESTDIR to be set if installing for a different architecture or > @@ -1412,12 +1418,15 @@ restage reinstall: .MAKE .PHONY > .endif > @echo > @echo "--" > - @echo ">>> Installing everything" > + @echo ">>> Installing everything started on `LC_ALL=C date`" Shouldn't we respect the user preference for locale? Are we using the date for anything automated? -- Eitan Adler ___ 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: r335852 - head/usr.bin/find
Author: eadler Date: Sun Jul 1 20:09:56 2018 New Revision: 335852 URL: https://svnweb.freebsd.org/changeset/base/335852 Log: find(1): use correct type for readlink Modified: head/usr.bin/find/ls.c Modified: head/usr.bin/find/ls.c == --- head/usr.bin/find/ls.c Sun Jul 1 20:09:52 2018(r335851) +++ head/usr.bin/find/ls.c Sun Jul 1 20:09:56 2018(r335852) @@ -110,7 +110,7 @@ printtime(time_t ftime) static void printlink(char *name) { - int lnklen; + ssize_t lnklen; char path[MAXPATHLEN]; if ((lnklen = readlink(name, path, MAXPATHLEN - 1)) == -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: r335851 - head/usr.bin/find
Author: eadler Date: Sun Jul 1 20:09:52 2018 New Revision: 335851 URL: https://svnweb.freebsd.org/changeset/base/335851 Log: find(1): deLINTify Modified: head/usr.bin/find/find.c head/usr.bin/find/function.c head/usr.bin/find/ls.c head/usr.bin/find/main.c head/usr.bin/find/misc.c head/usr.bin/find/operator.c head/usr.bin/find/option.c Modified: head/usr.bin/find/find.c == --- head/usr.bin/find/find.cSun Jul 1 19:44:29 2018(r335850) +++ head/usr.bin/find/find.cSun Jul 1 20:09:52 2018(r335851) @@ -32,12 +32,10 @@ * SUCH DAMAGE. */ -#ifndef lint #if 0 static char sccsid[] = "@(#)find.c 8.5 (Berkeley) 8/5/94"; #else #endif -#endif /* not lint */ #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/function.c == --- head/usr.bin/find/function.cSun Jul 1 19:44:29 2018 (r335850) +++ head/usr.bin/find/function.cSun Jul 1 20:09:52 2018 (r335851) @@ -32,11 +32,9 @@ * SUCH DAMAGE. */ -#ifndef lint #if 0 static const char sccsid[] = "@(#)function.c 8.10 (Berkeley) 5/4/95"; #endif -#endif /* not lint */ #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/ls.c == --- head/usr.bin/find/ls.c Sun Jul 1 19:44:29 2018(r335850) +++ head/usr.bin/find/ls.c Sun Jul 1 20:09:52 2018(r335851) @@ -29,11 +29,9 @@ * SUCH DAMAGE. */ -#ifndef lint #if 0 static char sccsid[] = "@(#)ls.c 8.1 (Berkeley) 6/6/93"; #endif -#endif /* not lint */ #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/main.c == --- head/usr.bin/find/main.cSun Jul 1 19:44:29 2018(r335850) +++ head/usr.bin/find/main.cSun Jul 1 20:09:52 2018(r335851) @@ -32,17 +32,13 @@ * SUCH DAMAGE. */ -#ifndef lint static const char copyright[] = "@(#) Copyright (c) 1990, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ -#ifndef lint #if 0 static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 5/4/95"; #endif -#endif /* not lint */ #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/misc.c == --- head/usr.bin/find/misc.cSun Jul 1 19:44:29 2018(r335850) +++ head/usr.bin/find/misc.cSun Jul 1 20:09:52 2018(r335851) @@ -32,12 +32,10 @@ * SUCH DAMAGE. */ -#ifndef lint #if 0 static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/1/94"; #else #endif -#endif /* not lint */ #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/operator.c == --- head/usr.bin/find/operator.cSun Jul 1 19:44:29 2018 (r335850) +++ head/usr.bin/find/operator.cSun Jul 1 20:09:52 2018 (r335851) @@ -32,11 +32,9 @@ * SUCH DAMAGE. */ -#ifndef lint #if 0 static char sccsid[] = "@(#)operator.c 8.1 (Berkeley) 6/6/93"; #endif -#endif /* not lint */ #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/option.c == --- head/usr.bin/find/option.c Sun Jul 1 19:44:29 2018(r335850) +++ head/usr.bin/find/option.c Sun Jul 1 20:09:52 2018(r335851) @@ -32,11 +32,9 @@ * SUCH DAMAGE. */ -#ifndef lint /* static char sccsid[] = "@(#)option.c 8.2 (Berkeley) 4/16/94"; */ -#endif /* not lint */ #include __FBSDID("$FreeBSD$"); ___ 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: r335836 - head/usr.bin/top
On 1 July 2018 at 10:08, Conrad Meyer wrote: > Hi Daichi, > > > > I don't think code to decode UTF-8 belongs in top(1). I don't know > what the goal of this routine is, but I doubt this is the right way to > accomplish it. For the record, I agree. This is why I didn't click "accept" on the revision. I don't fully oppose leaving it in top(1) for now as we work out the API, but long term its the wrong place. https://reviews.freebsd.org/D16058 is the review. -- Eitan Adler ___ 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: r335850 - head/usr.bin/top
Author: eadler Date: Sun Jul 1 19:44:29 2018 New Revision: 335850 URL: https://svnweb.freebsd.org/changeset/base/335850 Log: top(1): permit infinite length for command There isn't any need to limit the size of the screen. Utilities like 'less -S' don't have a (meaningful) limit anyways. This also makes the way to dynamically changing the column widths based on the screen width. Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Sun Jul 1 19:44:26 2018(r335849) +++ head/usr.bin/top/machine.c Sun Jul 1 19:44:29 2018(r335850) @@ -59,7 +59,6 @@ static const int namelength = 10; /* TOP_JID_LEN based on max of 99 */ #define TOP_JID_LEN 6 #define TOP_SWAP_LEN 5 -static int cmdlengthdelta; /* get_process_info passes back a handle. This is what it looks like: */ @@ -415,7 +414,6 @@ format_header(const char *uname_field) assert("displaymode must not be set to DISP_MAX"); } - cmdlengthdelta = sbuf_len(header) - 7; return sbuf_data(header); } @@ -1091,10 +1089,7 @@ format_next_process(struct handle * xhandle, char *(*g sbuf_printf(procbuf, "%6s ", format_time(cputime)); sbuf_printf(procbuf, "%6.2f%% ", ps.wcpu ? 100.0 * weighted_cpu(PCTCPU(pp), pp) : 100.0 * PCTCPU(pp)); } - sbuf_printf(procbuf, "%.*s", - screen_width > cmdlengthdelta ? - screen_width - cmdlengthdelta : 0, - printable(cmdbuf)); + sbuf_printf(procbuf, "%s", printable(cmdbuf)); free(cmdbuf); return (sbuf_data(procbuf)); } ___ 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: r335849 - head/usr.bin/find
Author: eadler Date: Sun Jul 1 19:44:26 2018 New Revision: 335849 URL: https://svnweb.freebsd.org/changeset/base/335849 Log: find(1): remove portability ifdefs This code isn't designed to be particularly portable outside of FreeBSD. To be more specific it doesn't make much sense to support compiling find(1) on VMS. Modified: head/usr.bin/find/getdate.y Modified: head/usr.bin/find/getdate.y == --- head/usr.bin/find/getdate.y Sun Jul 1 18:58:53 2018(r335848) +++ head/usr.bin/find/getdate.y Sun Jul 1 19:44:26 2018(r335849) @@ -23,22 +23,11 @@ __FBSDID("$FreeBSD$"); tricks are need, but defaults to using the gettimeofday system call. Include if that will be used. */ -#ifdefined(vms) -# include -#else /* defined(vms) */ # include # include -#endif /* !defined(vms) */ #if defined (__STDC__) || defined (USG) #include -#endif - -/* Some old versions of bison generate parsers that use bcopy. - That loses on systems that don't provide the function, so we have - to redefine it here. */ -#if !defined (HAVE_BCOPY) && defined (HAVE_MEMCPY) && !defined (bcopy) -#define bcopy(from, to, len) memcpy ((to), (from), (len)) #endif #if defined (__STDC__) ___ 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: r335831 - head/tools/build
On 30 June 2018 at 18:09, Will Andrews wrote: > Author: will > Date: Sun Jul 1 01:09:52 2018 > New Revision: 335831 > URL: https://svnweb.freebsd.org/changeset/base/335831 > > Log: > beinstall: enable use with git worktrees. What do you think of https://reviews.freebsd.org/D16081 ? -- Eitan Adler ___ 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: r335812 - head/sys/dev/iwn
Author: eadler Date: Sat Jun 30 04:30:08 2018 New Revision: 335812 URL: https://svnweb.freebsd.org/changeset/base/335812 Log: iwn: Add the missing IWN_SDID_6035_5 subdevice Obtained from:Haiku (da166fc6469b98397de98a7ccc13b82a3cd3b290) Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwn_devid.h Modified: head/sys/dev/iwn/if_iwn.c == --- head/sys/dev/iwn/if_iwn.c Sat Jun 30 01:04:37 2018(r335811) +++ head/sys/dev/iwn/if_iwn.c Sat Jun 30 04:30:08 2018(r335812) @@ -862,6 +862,7 @@ iwn_config_specific(struct iwn_softc *sc, uint16_t pid case IWN_SDID_6035_2: case IWN_SDID_6035_3: case IWN_SDID_6035_4: + case IWN_SDID_6035_5: sc->fwname = "iwn6000g2bfw"; sc->limits = &iwn6235_sensitivity_limits; sc->base_params = &iwn_6235_base_params; Modified: head/sys/dev/iwn/if_iwn_devid.h == --- head/sys/dev/iwn/if_iwn_devid.h Sat Jun 30 01:04:37 2018 (r335811) +++ head/sys/dev/iwn/if_iwn_devid.h Sat Jun 30 04:30:08 2018 (r335812) @@ -170,6 +170,7 @@ #defineIWN_SDID_6035_2 0x4260 #defineIWN_SDID_6035_3 0x4460 #defineIWN_SDID_6035_4 0x4860 +#defineIWN_SDID_6035_5 0x5260 /* * -- * Device ID for 1030 and 6030 Series ___ 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: r335811 - head/share/misc
Author: eadler Date: Sat Jun 30 01:04:37 2018 New Revision: 335811 URL: https://svnweb.freebsd.org/changeset/base/335811 Log: bsd-family-tree: Announce DragonFly version 5.2.2 Obtained from:https://www.dragonflybsd.org/release52/ Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Sat Jun 30 01:02:59 2018 (r335810) +++ head/share/misc/bsd-family-tree Sat Jun 30 01:04:37 2018 (r335811) @@ -372,6 +372,7 @@ FreeBSD 5.2 | | | | | | | v | | | | | | | | DragonFly 5.2.1 | | | | v | | + | | | | | | DragonFly 5.2.2 | FreeBSD | | | | | 11.2 | | | | | v | | | | ___ 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: r335810 - head/share/misc
Author: eadler Date: Sat Jun 30 01:02:59 2018 New Revision: 335810 URL: https://svnweb.freebsd.org/changeset/base/335810 Log: bsd-family-tree: Announce DragonFly version 5.2.2 Obtained from:https://www.dragonflybsd.org/release52/ Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Fri Jun 29 23:48:30 2018 (r335809) +++ head/share/misc/bsd-family-tree Sat Jun 30 01:02:59 2018 (r335810) @@ -748,6 +748,7 @@ NetBSD 7.1.22018-03-15 [NBD] OpenBSD 6.32018-04-02 [OBD] DragonFly 5.2.02018-04-10 [DFB] DragonFly 5.2.12018-05-20 [DFB] +DragonFly 5.2.22018-06-18 [DFB] FreeBSD 11.2 2018-06-27 [FBD] Bibliography ___ 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: r335785 - head/sys/dev/iwn
Author: eadler Date: Thu Jun 28 21:59:45 2018 New Revision: 335785 URL: https://svnweb.freebsd.org/changeset/base/335785 Log: iwn: Correct Centrino Advanced-N 6235 constants The iwn 6235 is a 2x2 device (see https://ark.intel.com/products/66890/Intel-Centrino-Advanced-N-6235-Dual-Band) Reviewed by: adrian, kevans Obtained from:Haiku Modified: head/sys/dev/iwn/if_iwn_chip_cfg.h Modified: head/sys/dev/iwn/if_iwn_chip_cfg.h == --- head/sys/dev/iwn/if_iwn_chip_cfg.h Thu Jun 28 21:40:31 2018 (r335784) +++ head/sys/dev/iwn/if_iwn_chip_cfg.h Thu Jun 28 21:59:45 2018 (r335785) @@ -382,8 +382,7 @@ static const struct iwn_base_params iwn_6235_base_para | IWN_FLG_NEED_PHY_CALIB_TEMP_OFFSET ), .support_hostap = false, .no_multi_vaps = true, - /* XXX 1x2? This NIC is 2x2, right? */ - .additional_gp_drv_bit = IWN_GP_DRIVER_6050_1X2, + .additional_gp_drv_bit = 0, .bt_mode = IWN_BT_ADVANCED, .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, }; ___ 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: r335683 - head/usr.sbin/powerd
Author: eadler Date: Wed Jun 27 01:28:09 2018 New Revision: 335683 URL: https://svnweb.freebsd.org/changeset/base/335683 Log: powerd: correct ifdef check for ppc Reviewed by: jhibbits Modified: head/usr.sbin/powerd/powerd.c Modified: head/usr.sbin/powerd/powerd.c == --- head/usr.sbin/powerd/powerd.c Tue Jun 26 23:28:03 2018 (r335682) +++ head/usr.sbin/powerd/powerd.c Wed Jun 27 01:28:09 2018 (r335683) @@ -293,7 +293,7 @@ acline_init(void) acline_mode = ac_sysctl; if (vflag) warnx("using sysctl for AC line status"); -#if __powerpc__ +#ifdef __powerpc__ } else if (sysctlnametomib(PMUAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; if (vflag) ___ 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: r335638 - head/usr.bin/rusers
Author: eadler Date: Mon Jun 25 11:44:56 2018 New Revision: 335638 URL: https://svnweb.freebsd.org/changeset/base/335638 Log: rusers: modernize a bit Modified: head/usr.bin/rusers/rusers.c Modified: head/usr.bin/rusers/rusers.c == --- head/usr.bin/rusers/rusers.cMon Jun 25 11:44:53 2018 (r335637) +++ head/usr.bin/rusers/rusers.cMon Jun 25 11:44:56 2018 (r335638) @@ -94,9 +94,9 @@ remember_host(struct in_addr addr) } static int -rusers_reply(caddr_t replyp, struct sockaddr_in *raddrp) +rusers_reply(void *replyp, struct sockaddr_in *raddrp) { - u_int x; + unsigned int x; int idle; char date[32], idle_time[64], remote[64]; struct hostent *hp; @@ -190,14 +190,14 @@ onehost(char *host) if (rusers_clnt == NULL) errx(1, "%s", clnt_spcreateerror("")); - bzero((char *)&up, sizeof(up)); + memset(&up, 0, sizeof(up)); tv.tv_sec = 15; /* XXX ?? */ tv.tv_usec = 0; if (clnt_call(rusers_clnt, RUSERSPROC_NAMES, (xdrproc_t)xdr_void, NULL, (xdrproc_t)xdr_utmpidlearr, &up, tv) != RPC_SUCCESS) errx(1, "%s", clnt_sperror(rusers_clnt, "")); memcpy(&addr.sin_addr.s_addr, hp->h_addr, sizeof(addr.sin_addr.s_addr)); - rusers_reply((caddr_t)&up, &addr); + rusers_reply(&up, &addr); clnt_destroy(rusers_clnt); } @@ -207,7 +207,7 @@ allhosts(void) utmpidlearr up; enum clnt_stat clnt_stat; - bzero((char *)&up, sizeof(up)); + memset(&up, 0, sizeof(up)); clnt_stat = clnt_broadcast(RUSERSPROG, RUSERSVERS_IDLE, RUSERSPROC_NAMES, (xdrproc_t)xdr_void, NULL, (xdrproc_t)xdr_utmpidlearr, (char *)&up, ___ 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: r335637 - head/usr.bin/rup
Author: eadler Date: Mon Jun 25 11:44:53 2018 New Revision: 335637 URL: https://svnweb.freebsd.org/changeset/base/335637 Log: rup: compile with WARNS=6 Modified: head/usr.bin/rup/Makefile head/usr.bin/rup/rup.c Modified: head/usr.bin/rup/Makefile == --- head/usr.bin/rup/Makefile Mon Jun 25 11:44:41 2018(r335636) +++ head/usr.bin/rup/Makefile Mon Jun 25 11:44:53 2018(r335637) @@ -2,7 +2,8 @@ PROG= rup -WARNS?=3 LIBADD=rpcsvc + +NO_WCAST_ALIGN=# Size is explicitly handled .include Modified: head/usr.bin/rup/rup.c == --- head/usr.bin/rup/rup.c Mon Jun 25 11:44:41 2018(r335636) +++ head/usr.bin/rup/rup.c Mon Jun 25 11:44:53 2018(r335637) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #define HOST_WIDTH 15 -struct host_list { +static struct host_list { struct host_list *next; struct in_addr addr; } *hosts; @@ -93,7 +93,7 @@ remember_host(struct in_addr addr) } static bool_t -rstat_reply(caddr_t replyp, struct sockaddr_in *raddrp) +rstat_reply(statstime *host_stat, struct sockaddr_in *raddrp) { struct tm *tmp_time; struct tm host_time; @@ -102,7 +102,6 @@ rstat_reply(caddr_t replyp, struct sockaddr_in *raddrp char hours_buf[16]; struct hostent *hp; char *host; - statstime *host_stat = (statstime *)replyp; time_t tmp_time_t; if (search_host(raddrp->sin_addr)) @@ -207,7 +206,7 @@ onehost(char *host) } addr.sin_addr.s_addr = *(int *)hp->h_addr; - rstat_reply((caddr_t)&host_stat, &addr); + rstat_reply(&host_stat, &addr); clnt_destroy(rstat_clnt); return (0); } @@ -242,7 +241,6 @@ main(int argc, char *argv[]) switch (ch) { default: usage(); - /*NOTREACHED*/ } setlinebuf(stdout); ___ 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: r335636 - in head: lib/libcasper/libcasper usr.bin/users
Author: eadler Date: Mon Jun 25 11:44:41 2018 New Revision: 335636 URL: https://svnweb.freebsd.org/changeset/base/335636 Log: users(1): Use capsicum helpers for users In doing so also fix the libcasper.h header to work in C++. Modified: head/lib/libcasper/libcasper/libcasper.h head/usr.bin/users/users.cc Modified: head/lib/libcasper/libcasper/libcasper.h == --- head/lib/libcasper/libcasper/libcasper.hMon Jun 25 11:29:04 2018 (r335635) +++ head/lib/libcasper/libcasper/libcasper.hMon Jun 25 11:44:41 2018 (r335636) @@ -105,7 +105,7 @@ cap_init(void) { cap_channel_t *chan; - chan = malloc(sizeof(*chan)); + chan = (cap_channel_t *)malloc(sizeof(*chan)); if (chan != NULL) { chan->cch_fd = -1; } Modified: head/usr.bin/users/users.cc == --- head/usr.bin/users/users.cc Mon Jun 25 11:29:04 2018(r335635) +++ head/usr.bin/users/users.cc Mon Jun 25 11:44:41 2018(r335636) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -56,7 +57,7 @@ main(int argc, char **) setutxent(); - if (cap_enter() < 0 && errno != ENOSYS) + if (caph_enter()) err(1, "Failed to enter capability mode."); while ((ut = getutxent()) != NULL) ___ 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: r335612 - head/sbin/dhclient
Author: eadler Date: Mon Jun 25 01:29:54 2018 New Revision: 335612 URL: https://svnweb.freebsd.org/changeset/base/335612 Log: dhclient: recorrect __progname to getprogname() A more correct way to modernize code that uses __progname is to just replace each occurance of it with a call to getprogname(3) Reported by: ian Reviewed by: imp Modified: head/sbin/dhclient/dhclient.c Modified: head/sbin/dhclient/dhclient.c == --- head/sbin/dhclient/dhclient.c Sun Jun 24 23:19:31 2018 (r335611) +++ head/sbin/dhclient/dhclient.c Mon Jun 25 01:29:54 2018 (r335612) @@ -149,7 +149,6 @@ int fork_privchld(int, int); #define MIN_MTU 68 static time_t scripttime; -static char*__progname; int findproto(char *cp, int n) @@ -379,12 +378,10 @@ main(int argc, char *argv[]) pid_totherpid; cap_rights_t rights; - __progname = basename(argv[0]); - init_casper(); /* Initially, log errors to stderr as well as to syslogd. */ - cap_openlog(capsyslog, __progname, LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY); + cap_openlog(capsyslog, getprogname(), LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY); cap_setlogmask(capsyslog, LOG_UPTO(LOG_DEBUG)); while ((ch = getopt(argc, argv, "bc:dl:p:qu")) != -1) @@ -566,7 +563,7 @@ void usage(void) { - fprintf(stderr, "usage: %s [-bdqu] ", __progname); + fprintf(stderr, "usage: %s [-bdqu] ", getprogname()); fprintf(stderr, "[-c conffile] [-l leasefile] interface\n"); exit(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"
Re: svn commit: r335602 - head/sbin/dhclient
On 24 June 2018 at 07:35, Ian Lepore wrote: > On Sun, 2018-06-24 at 13:23 +0000, Eitan Adler wrote: >> Author: eadler >> Date: Sun Jun 24 13:23:27 2018 >> New Revision: 335602 >> URL: https://svnweb.freebsd.org/changeset/base/335602 >> >> Log: >> dhclient: build with WARNS=6 >> >> - add static in a number of places >> - initialize __progname rather than rely on magical extern values >> - use nitems() instead of manually spelling it out >> - unshadow 'idi' >> - teach 'error' that it is '__dead2' >> - add missing 'break' > > The changes related to __progname aren't correct. __progname is a bsd- > ism that goes back to at least 4.4BSD, Thanks! Is this correct then? Index: dhclient.c === --- dhclient.c (revision 335611) +++ dhclient.c (working copy) @@ -149,7 +149,6 @@ int fork_privchld(int, int); #define MIN_MTU 68 static time_t scripttime; -static char *__progname; int findproto(char *cp, int n) @@ -379,12 +378,10 @@ main(int argc, char *argv[]) pid_t otherpid; cap_rights_t rights; - __progname = basename(argv[0]); - init_casper(); /* Initially, log errors to stderr as well as to syslogd. */ - cap_openlog(capsyslog, __progname, LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY); + cap_openlog(capsyslog, getprogname(), LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY); cap_setlogmask(capsyslog, LOG_UPTO(LOG_DEBUG)); while ((ch = getopt(argc, argv, "bc:dl:p:qu")) != -1) @@ -566,7 +563,7 @@ void usage(void) { - fprintf(stderr, "usage: %s [-bdqu] ", __progname); + fprintf(stderr, "usage: %s [-bdqu] ", getprogname()); fprintf(stderr, "[-c conffile] [-l leasefile] interface\n"); exit(1); } -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams ___ 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: r335602 - head/sbin/dhclient
Author: eadler Date: Sun Jun 24 13:23:27 2018 New Revision: 335602 URL: https://svnweb.freebsd.org/changeset/base/335602 Log: dhclient: build with WARNS=6 - add static in a number of places - initialize __progname rather than rely on magical extern values - use nitems() instead of manually spelling it out - unshadow 'idi' - teach 'error' that it is '__dead2' - add missing 'break' Modified: head/sbin/dhclient/Makefile head/sbin/dhclient/bpf.c head/sbin/dhclient/clparse.c head/sbin/dhclient/conflex.c head/sbin/dhclient/dhclient.c head/sbin/dhclient/dhcpd.h head/sbin/dhclient/dispatch.c head/sbin/dhclient/options.c head/sbin/dhclient/privsep.c head/sbin/dhclient/privsep.h Modified: head/sbin/dhclient/Makefile == --- head/sbin/dhclient/Makefile Sun Jun 24 13:14:04 2018(r335601) +++ head/sbin/dhclient/Makefile Sun Jun 24 13:23:27 2018(r335602) @@ -50,7 +50,6 @@ LIBADD+=cap_syslog CFLAGS+=-DWITH_CASPER .endif -WARNS?=4 NO_WCAST_ALIGN=yes HAS_TESTS= Modified: head/sbin/dhclient/bpf.c == --- head/sbin/dhclient/bpf.cSun Jun 24 13:14:04 2018(r335601) +++ head/sbin/dhclient/bpf.cSun Jun 24 13:23:27 2018(r335602) @@ -95,7 +95,7 @@ if_register_bpf(struct interface_info *info, int flags * Packet write filter program: * 'ip and udp and src port bootps and dst port (bootps or bootpc)' */ -struct bpf_insn dhcp_bpf_wfilter[] = { +static struct bpf_insn dhcp_bpf_wfilter[] = { BPF_STMT(BPF_LD + BPF_B + BPF_IND, 14), BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, (IPVERSION << 4) + 5, 0, 12), @@ -129,7 +129,7 @@ struct bpf_insn dhcp_bpf_wfilter[] = { BPF_STMT(BPF_RET+BPF_K, 0), }; -int dhcp_bpf_wfilter_len = sizeof(dhcp_bpf_wfilter) / sizeof(struct bpf_insn); +static int dhcp_bpf_wfilter_len = nitems(dhcp_bpf_wfilter); void if_register_send(struct interface_info *info) @@ -184,7 +184,7 @@ if_register_send(struct interface_info *info) * XXX: Changes to the filter program may require changes to the * constant offsets used in if_register_send to patch the BPF program! */ -struct bpf_insn dhcp_bpf_filter[] = { +static struct bpf_insn dhcp_bpf_filter[] = { /* Make sure this is an IP packet... */ BPF_STMT(BPF_LD + BPF_H + BPF_ABS, 12), BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETHERTYPE_IP, 0, 8), @@ -211,7 +211,7 @@ struct bpf_insn dhcp_bpf_filter[] = { BPF_STMT(BPF_RET+BPF_K, 0), }; -int dhcp_bpf_filter_len = sizeof(dhcp_bpf_filter) / sizeof(struct bpf_insn); +static int dhcp_bpf_filter_len = nitems(dhcp_bpf_filter); void if_register_receive(struct interface_info *info) Modified: head/sbin/dhclient/clparse.c == --- head/sbin/dhclient/clparse.cSun Jun 24 13:14:04 2018 (r335601) +++ head/sbin/dhclient/clparse.cSun Jun 24 13:23:27 2018 (r335602) @@ -49,10 +49,9 @@ __FBSDID("$FreeBSD$"); #include "dhctoken.h" struct client_config top_level_config; -struct interface_info *dummy_interfaces; -extern struct interface_info *ifi; +static struct interface_info *dummy_interfaces; -char client_script_name[] = "/sbin/dhclient-script"; +static char client_script_name[] = "/sbin/dhclient-script"; /* * client-conf-file :== client-declarations EOF Modified: head/sbin/dhclient/conflex.c == --- head/sbin/dhclient/conflex.cSun Jun 24 13:14:04 2018 (r335601) +++ head/sbin/dhclient/conflex.cSun Jun 24 13:23:27 2018 (r335602) @@ -53,8 +53,8 @@ __FBSDID("$FreeBSD$"); int lexline; int lexchar; char *token_line; -char *prev_line; -char *cur_line; +static char *prev_line; +static char *cur_line; const char *tlname; int eol_token; @@ -347,6 +347,7 @@ intern(char *atom, int dfv) return (BOOTING); if (!strcasecmp(atom + 1, "oot-unknown-clients")) return (BOOT_UNKNOWN_CLIENTS); + break; case 'c': if (!strcasecmp(atom + 1, "lass")) return (CLASS); Modified: head/sbin/dhclient/dhclient.c == --- head/sbin/dhclient/dhclient.c Sun Jun 24 13:14:04 2018 (r335601) +++ head/sbin/dhclient/dhclient.c Sun Jun 24 13:23:27 2018 (r335602) @@ -65,9 +65,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include + #ifndef _PATH_VAREMPTY #define_PATH_VAREMPTY "/var/empty" #endif @@ -91,21 +93,21 @@ __FBSDID("$FreeBSD$"); cap_channel_t *capsyslog; time_t cur_time; -time_t default_lease_time = 43200; /* 12 hours... */ +static time_t default_lease_time = 43200; /*
svn commit: r335601 - head/usr.bin/top
Author: eadler Date: Sun Jun 24 13:14:04 2018 New Revision: 335601 URL: https://svnweb.freebsd.org/changeset/base/335601 Log: top(1): increase field with width for W/CPU column This allows 3 digit CPU columns to look nice Reported by: feld Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Sun Jun 24 13:08:05 2018(r335600) +++ head/usr.bin/top/machine.c Sun Jun 24 13:14:04 2018(r335601) @@ -398,7 +398,7 @@ format_header(const char *uname_field) sbuf_cat(header, "C "); } sbuf_cat(header, "TIME "); - sbuf_printf(header, "%6s ", ps.wcpu ? "WCPU" : "CPU"); + sbuf_printf(header, " %6s ", ps.wcpu ? "WCPU" : "CPU"); sbuf_cat(header, "COMMAND"); sbuf_finish(header); break; @@ -1084,7 +1084,7 @@ format_next_process(struct handle * xhandle, char *(*g } sbuf_printf(procbuf, "%3d ", cpu); } - sbuf_printf(procbuf, "%6s", format_time(cputime)); + sbuf_printf(procbuf, "%6s ", format_time(cputime)); sbuf_printf(procbuf, "%6.2f%% ", ps.wcpu ? 100.0 * weighted_cpu(PCTCPU(pp), pp) : 100.0 * PCTCPU(pp)); } sbuf_printf(procbuf, "%.*s", ___ 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: r335598 - in head: sbin usr.bin
Author: eadler Date: Sun Jun 24 09:39:40 2018 New Revision: 335598 URL: https://svnweb.freebsd.org/changeset/base/335598 Log: Makefiles: remove outdated comments Modified: head/sbin/Makefile head/usr.bin/Makefile Modified: head/sbin/Makefile == --- head/sbin/Makefile Sun Jun 24 05:40:42 2018(r335597) +++ head/sbin/Makefile Sun Jun 24 09:39:40 2018(r335598) @@ -3,8 +3,6 @@ .include -# XXX MISSING: icheck ncheck - SUBDIR=adjkerntz \ camcontrol \ clri \ Modified: head/usr.bin/Makefile == --- head/usr.bin/Makefile Sun Jun 24 05:40:42 2018(r335597) +++ head/usr.bin/Makefile Sun Jun 24 09:39:40 2018(r335598) @@ -3,11 +3,6 @@ .include -# XXX MISSING: deroff diction graph learn plot -# spell spline struct xsend -# XXX Use GNU versions: diff ld patch -# - SUBDIR=alias \ apply \ asa \ ___ 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: r335597 - head/sbin/newfs
Author: eadler Date: Sun Jun 24 05:40:42 2018 New Revision: 335597 URL: https://svnweb.freebsd.org/changeset/base/335597 Log: newfs: clean up warnings - remove param: unused since r95357. - correct definition of usage - add explicit fallthrough notice. The existing one doesn't work with our selection of "implicit-fallthrough" strictness. This results in WARNS=6 building on amd64, but not other arches Modified: head/sbin/newfs/newfs.c Modified: head/sbin/newfs/newfs.c == --- head/sbin/newfs/newfs.c Sun Jun 24 03:31:23 2018(r335596) +++ head/sbin/newfs/newfs.c Sun Jun 24 05:40:42 2018(r335597) @@ -121,7 +121,7 @@ static char *dkname; static char*disktype; static void getfssize(intmax_t *, const char *p, intmax_t, intmax_t); -static struct disklabel *getdisklabel(char *s); +static struct disklabel *getdisklabel(void); static void usage(void); static int expand_number_int(const char *buf, int *num); @@ -185,6 +185,7 @@ main(int argc, char *argv[]) case 'j': jflag = 1; /* fall through to enable soft updates */ + /* FALLTHROUGH */ case 'U': Uflag = 1; break; @@ -351,7 +352,7 @@ main(int argc, char *argv[]) getfssize(&fssize, special, mediasize / sectorsize, reserved); } pp = NULL; - lp = getdisklabel(special); + lp = getdisklabel(); if (lp != NULL) { if (!is_file) /* already set for files */ part_name = special[strlen(special) - 1]; @@ -426,7 +427,7 @@ getfssize(intmax_t *fsz, const char *s, intmax_t disks } struct disklabel * -getdisklabel(char *s) +getdisklabel(void) { static struct disklabel lab; struct disklabel *lp; @@ -453,7 +454,7 @@ getdisklabel(char *s) } static void -usage() +usage(void) { fprintf(stderr, "usage: %s [ -fsoptions ] special-device%s\n", ___ 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: r335591 - head/usr.bin/top
Author: eadler Date: Sat Jun 23 22:45:22 2018 New Revision: 335591 URL: https://svnweb.freebsd.org/changeset/base/335591 Log: top(1): Restructure printing of process states This avoids the need to have separate buffers and calls to sprintf for various calls. Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Sat Jun 23 22:45:20 2018(r335590) +++ head/usr.bin/top/machine.c Sat Jun 23 22:45:22 2018(r335591) @@ -388,14 +388,18 @@ format_header(const char *uname_field) sbuf_printf(header, " %s", ps.thread_id ? " THR" : "PID"); sbuf_printf(header, "%*s", ps.jail ? TOP_JID_LEN : 0, ps.jail ? " JID" : ""); - sbuf_printf(header, " %-*.*s", namelength, namelength, uname_field); - sbuf_cat(header, " THR PRI NICE SIZE RES"); - sbuf_printf(header, "%*s", ps.swap ? TOP_SWAP_LEN : 0, - ps.swap ? " SWAP" : ""); - sbuf_printf(header, "%s", smpmode ? " STATEC " : " STATE "); - sbuf_cat(header, "TIME"); - sbuf_printf(header, " %7s", ps.wcpu ? "WCPU" : "CPU"); - sbuf_cat(header, " COMMAND"); + sbuf_printf(header, " %-*.*s ", namelength, namelength, uname_field); + sbuf_cat(header, "THR PRI NICE SIZE RES "); + if (ps.swap) { + sbuf_printf(header, "%*s ", TOP_SWAP_LEN - 1, "SWAP"); + } + sbuf_cat(header, "STATE"); + if (smpmode) { + sbuf_cat(header, "C "); + } + sbuf_cat(header, "TIME "); + sbuf_printf(header, "%6s ", ps.wcpu ? "WCPU" : "CPU"); + sbuf_cat(header, "COMMAND"); sbuf_finish(header); break; } @@ -861,14 +865,10 @@ format_next_process(struct handle * xhandle, char *(*g struct kinfo_proc *pp; const struct kinfo_proc *oldp; long cputime; - double pct; char status[22]; - int cpu; size_t state; struct rusage ru, *rup; long p_tot, s_tot; - char thr_buf[6]; - char jid_buf[TOP_JID_LEN], swap_buf[TOP_SWAP_LEN]; char *cmdbuf = NULL; char **args; const int cmdlen = 128; @@ -909,9 +909,6 @@ format_next_process(struct handle * xhandle, char *(*g */ cputime = (pp->ki_runtime + 50) / 100; - /* calculate the base for cpu percentages */ - pct = PCTCPU(pp); - /* generate "STATE" field */ switch (state = pp->ki_stat) { case SRUN: @@ -1026,19 +1023,6 @@ format_next_process(struct handle * xhandle, char *(*g } } - if (ps.jail == 0) - jid_buf[0] = '\0'; - else - snprintf(jid_buf, sizeof(jid_buf), "%*d", - TOP_JID_LEN - 1, pp->ki_jid); - - if (ps.swap == 0) - swap_buf[0] = '\0'; - else - snprintf(swap_buf, sizeof(swap_buf), "%*s", - TOP_SWAP_LEN - 1, - format_k(pagetok(ki_swap(pp; /* XXX */ - if (displaymode == DISP_IO) { oldp = get_old_proc(pp); if (oldp != NULL) { @@ -1056,58 +1040,58 @@ format_next_process(struct handle * xhandle, char *(*g p_tot = rup->ru_inblock + rup->ru_oublock + rup->ru_majflt; s_tot = total_inblock + total_oublock + total_majflt; - free(cmdbuf); + sbuf_printf(procbuf, "%5d ", (ps.thread_id) ? pp->ki_tid : pp->ki_pid); - sbuf_printf(procbuf, "%5d", (ps.thread_id) ? pp->ki_tid : pp->ki_pid); - sbuf_printf(procbuf, "%*s", ps.jail ? TOP_JID_LEN : 0, jid_buf); - sbuf_printf(procbuf, " %-*.*s", namelength, namelength, (*get_userid)(pp->ki_ruid)); - sbuf_printf(procbuf, " %6ld", rup->ru_nvcsw); - sbuf_printf(procbuf, " %6ld", rup->ru_nivcsw); - sbuf_printf(procbuf, " %6ld", rup->ru_inblock); - sbuf_printf(procbuf, " %6ld", rup->ru_oublock); - sbuf_printf(procbuf, " %6ld", rup->ru_majflt); - sbuf_printf(procbuf, " %6ld", p_tot); - sbuf_printf(procbuf, " %6.2f%%", s_tot == 0 ? 0.0 : (p_tot * 100.0 / s_tot)); - sbuf_printf(procbuf, " %.*s", - screen_width > cmdlengthdelta ? - screen_width - cmdlengthdelta : 0, - printable(cmdbuf)); + if (ps.jail) { + sbuf_printf(procbuf, "%*d ", TOP_JID_LEN - 1, pp->ki_jid); + } + sbuf_printf(procbuf, "%-*.*
svn commit: r335590 - head/usr.bin/top
Author: eadler Date: Sat Jun 23 22:45:20 2018 New Revision: 335590 URL: https://svnweb.freebsd.org/changeset/base/335590 Log: top(1): Convert process listing to sbuf too This also fixes -mio with 'T' set (thread-id instead of process-id). This can go further by removing the existing sprintf, and using sbuf directly. This will be done in a followup commit. Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Sat Jun 23 22:45:18 2018(r335589) +++ head/usr.bin/top/machine.c Sat Jun 23 22:45:20 2018(r335590) @@ -80,22 +80,6 @@ struct handle { #definePCTCPU(pp) (pcpu[pp - pbase]) -/* - * These definitions control the format of the per-process area - */ - -static const char io_header[] = -" %s%*s %-*.*s VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND"; - -static const char io_Proc_format[] = -"%5d%*s %-*.*s %6ld %6ld %6ld %6ld %6ld %6ld %6.2f%% %.*s"; - -static const char smp_Proc_format[] = -"%5d%*s %-*.*s %s%3d %4s%6s %5s%*.*s %-6.6s %3d%7s %6.2f%% %.*s"; - -static char up_Proc_format[] = -"%5d%*s %-*.*s %s%3d %4s%6s %5s%*.*s %-6.6s%.0d%7s %6.2f%% %.*s"; - /* process state names for the "STATE" column of the display */ /* the extra nulls in the string "run" are for adding a slash and the processor number when needed */ @@ -394,9 +378,10 @@ format_header(const char *uname_field) /* clean up from last time. */ if (header != NULL) { - sbuf_delete(header); + sbuf_clear(header); + } else { + header = sbuf_new_auto(); } - header = sbuf_new_auto(); switch (displaymode) { case DISP_CPU: { @@ -415,10 +400,11 @@ format_header(const char *uname_field) break; } case DISP_IO: { - sbuf_printf(header, io_header, + sbuf_printf(header, " %s%*s %-*.*s", ps.thread_id ? " THR" : "PID", ps.jail ? TOP_JID_LEN : 0, ps.jail ? " JID" : "", namelength, namelength, uname_field); + sbuf_cat(header, " VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND"); break; } case DISP_MAX: @@ -869,8 +855,6 @@ get_process_info(struct system_info *si, struct proces return (&handle); } -static char fmt[512]; /* static area where result is built */ - char * format_next_process(struct handle * xhandle, char *(*get_userid)(int), int flags) { @@ -883,13 +867,21 @@ format_next_process(struct handle * xhandle, char *(*g size_t state; struct rusage ru, *rup; long p_tot, s_tot; - const char *proc_fmt; char thr_buf[6]; char jid_buf[TOP_JID_LEN], swap_buf[TOP_SWAP_LEN]; char *cmdbuf = NULL; char **args; const int cmdlen = 128; + static struct sbuf* procbuf = NULL; + /* clean up from last time. */ + if (procbuf != NULL) { + sbuf_clear(procbuf); + } else { + procbuf = sbuf_new_auto(); + } + + /* find and remember the next proc structure */ pp = *(xhandle->next_proc++); xhandle->remaining--; @@ -1064,24 +1056,24 @@ format_next_process(struct handle * xhandle, char *(*g p_tot = rup->ru_inblock + rup->ru_oublock + rup->ru_majflt; s_tot = total_inblock + total_oublock + total_majflt; - snprintf(fmt, sizeof(fmt), io_Proc_format, - pp->ki_pid, - ps.jail ? TOP_JID_LEN : 0, jid_buf, - namelength, namelength, (*get_userid)(pp->ki_ruid), - rup->ru_nvcsw, - rup->ru_nivcsw, - rup->ru_inblock, - rup->ru_oublock, - rup->ru_majflt, - p_tot, - s_tot == 0 ? 0.0 : (p_tot * 100.0 / s_tot), - screen_width > cmdlengthdelta ? + free(cmdbuf); + + sbuf_printf(procbuf, "%5d", (ps.thread_id) ? pp->ki_tid : pp->ki_pid); + sbuf_printf(procbuf, "%*s", ps.jail ? TOP_JID_LEN : 0, jid_buf); + sbuf_printf(procbuf, " %-*.*s", namelength, namelength, (*get_userid)(pp->ki_ruid)); + sbuf_printf(procbuf, " %6ld", rup->ru_nvcsw); + sbuf_printf(procbuf, " %6ld", rup->ru_nivcsw); + sbuf_printf(procbuf, " %6ld", rup->ru_inblock); + sbuf_printf(procbuf, " %6ld", rup->ru_oublock); + sbuf_printf(procbuf, " %6ld", rup->ru_majflt); + sbuf_printf(procbuf, " %6ld", p_tot); + sbuf_printf(procbuf, " %6.2f%%", s_tot == 0 ? 0.0 : (p_tot * 100.0 / s_tot)); + sbuf_printf(procbuf, " %.*s", + screen_width > cmdlengthdelta ?
svn commit: r335589 - head/usr.bin/top
Author: eadler Date: Sat Jun 23 22:45:18 2018 New Revision: 335589 URL: https://svnweb.freebsd.org/changeset/base/335589 Log: top(1): Use basename instead of a homegrown alternative Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Sat Jun 23 20:12:30 2018(r335588) +++ head/usr.bin/top/machine.c Sat Jun 23 22:45:18 2018(r335589) @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -992,11 +993,7 @@ format_next_process(struct handle * xhandle, char *(*g dst = argbuf; /* Extract cmd name from argv */ - cmd = strrchr(*args, '/'); - if (cmd == NULL) - cmd = *args; - else - cmd++; + cmd = basename(*args); for (; (src = *args++) != NULL; ) { if (*src == '\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: r335576 - head/usr.bin/top
Author: eadler Date: Sat Jun 23 03:17:11 2018 New Revision: 335576 URL: https://svnweb.freebsd.org/changeset/base/335576 Log: top(1): show CPU state breakdown on first run There is no documented reason for this not to be shown on the first run. I can't find any good reason, and it breaks batch mode. PR: 218889 Submitted by: "Jeremy C. Reed" Modified: head/usr.bin/top/top.c Modified: head/usr.bin/top/top.c == --- head/usr.bin/top/top.c Sat Jun 23 02:42:08 2018(r335575) +++ head/usr.bin/top/top.c Sat Jun 23 03:17:11 2018(r335576) @@ -243,7 +243,6 @@ main(int argc, char *argv[]) int preset_argc = 0; const char **av = NULL; int ac = -1; -bool dostates = false; bool do_unames = true; char interactive = 2; char warnings = 0; @@ -641,25 +640,7 @@ restart: /* display process state breakdown */ (*d_procstates)(system_info.p_total, system_info.procstates); - - /* display the cpu state percentage breakdown */ - if (dostates) /* but not the first time */ - { - (*d_cpustates)(system_info.cpustates); - } - else - { - /* we'll do it next time */ - if (smart_terminal) - { - z_cpustates(); - } - else - { - putchar('\n'); - } - dostates = true; - } + (*d_cpustates)(system_info.cpustates); /* display memory stats */ (*d_memory)(system_info.memory); ___ 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: r335539 - head/usr.bin/top
On 22 June 2018 at 04:02, Baptiste Daroussin wrote: > wouldn't it be better with a sbuf_clear here? > > if != null: clear else new_auto I did that originally and undid that for reasons I can't remember. Will try it again, if it works, its more correct. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams ___ 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: r335552 - head/usr.bin/top
Author: eadler Date: Fri Jun 22 10:20:21 2018 New Revision: 335552 URL: https://svnweb.freebsd.org/changeset/base/335552 Log: top(1): increase warnings top(1) now builds without cast-qual warnings, so remove the exemption for that. Tested with clang, gcc7, gcc9 Modified: head/usr.bin/top/Makefile Modified: head/usr.bin/top/Makefile == --- head/usr.bin/top/Makefile Fri Jun 22 10:17:12 2018(r335551) +++ head/usr.bin/top/Makefile Fri Jun 22 10:20:21 2018(r335552) @@ -9,12 +9,12 @@ MAN= top.1 .if ${COMPILER_TYPE} == "gcc" .if ${COMPILER_VERSION} >= 5 -CFLAGS.gcc=-Wno-error=cast-qual -Wno-error=discarded-qualifiers -Wno-error=incompatible-pointer-types +CFLAGS.gcc=-Wno-error=discarded-qualifiers -Wno-error=incompatible-pointer-types .else #base gcc NO_WERROR= .endif .endif -CFLAGS.clang=-Wno-error=incompatible-pointer-types-discards-qualifiers -Wno-error=cast-qual +CFLAGS.clang=-Wno-error=incompatible-pointer-types-discards-qualifiers LIBADD=ncursesw m kvm jail util sbuf .include ___ 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: r335551 - head/usr.bin/top
Author: eadler Date: Fri Jun 22 10:17:12 2018 New Revision: 335551 URL: https://svnweb.freebsd.org/changeset/base/335551 Log: top(1): garbage collect - remove a now-unused function - remove needless indirection of handle type Modified: head/usr.bin/top/machine.c head/usr.bin/top/machine.h Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Fri Jun 22 10:17:10 2018(r335550) +++ head/usr.bin/top/machine.c Fri Jun 22 10:17:12 2018(r335551) @@ -871,13 +871,12 @@ get_process_info(struct system_info *si, struct proces static char fmt[512]; /* static area where result is built */ char * -format_next_process(void* xhandle, char *(*get_userid)(int), int flags) +format_next_process(struct handle * xhandle, char *(*get_userid)(int), int flags) { struct kinfo_proc *pp; const struct kinfo_proc *oldp; long cputime; double pct; - struct handle *hp; char status[22]; int cpu; size_t state; @@ -891,9 +890,8 @@ format_next_process(void* xhandle, char *(*get_userid) const int cmdlen = 128; /* find and remember the next proc structure */ - hp = (struct handle *)xhandle; - pp = *(hp->next_proc++); - hp->remaining--; + pp = *(xhandle->next_proc++); + xhandle->remaining--; /* get the process's command name */ if ((pp->ki_flag & P_INMEM) == 0) { @@ -1544,28 +1542,6 @@ int (*compares[])(const void *arg1, const void *arg2) NULL }; - -/* - * proc_owner(pid) - returns the uid that owns process "pid", or -1 if - * the process does not exist. - */ - -int -proc_owner(int pid) -{ - int cnt; - struct kinfo_proc **prefp; - struct kinfo_proc *pp; - - prefp = pref; - cnt = pref_len; - while (--cnt >= 0) { - pp = *prefp++; - if (pp->ki_pid == (pid_t)pid) - return ((int)pp->ki_ruid); - } - return (-1); -} static int swapmode(int *retavail, int *retfree) Modified: head/usr.bin/top/machine.h == --- head/usr.bin/top/machine.h Fri Jun 22 10:17:10 2018(r335550) +++ head/usr.bin/top/machine.h Fri Jun 22 10:17:12 2018(r335551) @@ -78,13 +78,14 @@ struct process_select /* routines defined by the machine dependent module */ +struct handle; + char *format_header(const char *uname_field); -char *format_next_process(void* handle, char *(*get_userid)(int), +char *format_next_process(struct handle* handle, char *(*get_userid)(int), int flags); voidtoggle_pcpustats(void); voidget_system_info(struct system_info *si); int machine_init(struct statics *statics); -int proc_owner(int pid); /* non-int routines typically used by the machine dependent module */ extern struct process_select ps; ___ 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: r335550 - head/usr.bin/top
Author: eadler Date: Fri Jun 22 10:17:10 2018 New Revision: 335550 URL: https://svnweb.freebsd.org/changeset/base/335550 Log: top(1): increase size of 'C' column On machines with more than 99 CPUs make room to display the entire number. Requested by: cperciva Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Fri Jun 22 10:13:15 2018(r335549) +++ head/usr.bin/top/machine.c Fri Jun 22 10:17:10 2018(r335550) @@ -90,7 +90,7 @@ static const char io_Proc_format[] = "%5d%*s %-*.*s %6ld %6ld %6ld %6ld %6ld %6ld %6.2f%% %.*s"; static const char smp_Proc_format[] = -"%5d%*s %-*.*s %s%3d %4s%6s %5s%*.*s %-6.6s %2d%7s %6.2f%% %.*s"; +"%5d%*s %-*.*s %s%3d %4s%6s %5s%*.*s %-6.6s %3d%7s %6.2f%% %.*s"; static char up_Proc_format[] = "%5d%*s %-*.*s %s%3d %4s%6s %5s%*.*s %-6.6s%.0d%7s %6.2f%% %.*s"; @@ -406,7 +406,7 @@ format_header(const char *uname_field) sbuf_cat(header, " THR PRI NICE SIZE RES"); sbuf_printf(header, "%*s", ps.swap ? TOP_SWAP_LEN : 0, ps.swap ? " SWAP" : ""); - sbuf_printf(header, "%s", smpmode ? " STATE C " : " STATE "); + sbuf_printf(header, "%s", smpmode ? " STATEC " : " STATE "); sbuf_cat(header, "TIME"); sbuf_printf(header, " %7s", ps.wcpu ? "WCPU" : "CPU"); sbuf_cat(header, " COMMAND"); ___ 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: r335547 - head/usr.bin/top
Author: eadler Date: Fri Jun 22 09:45:18 2018 New Revision: 335547 URL: https://svnweb.freebsd.org/changeset/base/335547 Log: top(1): remove special handling of load > 5 When the load is "high" (an arbitrary value) top(1) previously moved the cursor to the top-left of the screen as an acknowledgment. In practice, on modern machines, even relatively slow ones, it looked more like a glitch. Remove the logic. Modified: head/usr.bin/top/screen.c head/usr.bin/top/screen.h head/usr.bin/top/top.c Modified: head/usr.bin/top/screen.c == --- head/usr.bin/top/screen.c Fri Jun 22 09:41:13 2018(r335546) +++ head/usr.bin/top/screen.c Fri Jun 22 09:45:18 2018(r335547) @@ -55,7 +55,7 @@ static struct termios new_settings; static char is_a_terminal = false; void -init_termcap(int interactive) +init_termcap(bool interactive) { char *bufptr; char *PCptr; @@ -138,7 +138,7 @@ init_termcap(int interactive) /* get "ce", clear to end */ if (!overstrike) { - clear_line = tgetstr("ce", &bufptr); + clear_line = tgetstr("ce", &bufptr); } /* get necessary capabilities */ @@ -312,13 +312,4 @@ clear_eol(int len) } } return(-1); -} - -void -go_home(void) -{ -if (smart_terminal) -{ - putcap(home); -} } Modified: head/usr.bin/top/screen.h == --- head/usr.bin/top/screen.h Fri Jun 22 09:41:13 2018(r335546) +++ head/usr.bin/top/screen.h Fri Jun 22 09:45:18 2018(r335547) @@ -28,10 +28,9 @@ extern int screen_width; intclear_eol(int len); void top_standout(const char *msg); void top_clear(void); -void go_home(void); void reinit_screen(void); void get_screensize(void); -void init_termcap(int interactive); +void init_termcap(bool interactive); void end_screen(void); void init_screen(void); Modified: head/usr.bin/top/top.c == --- head/usr.bin/top/top.c Fri Jun 22 09:41:13 2018(r335546) +++ head/usr.bin/top/top.c Fri Jun 22 09:45:18 2018(r335547) @@ -852,13 +852,6 @@ restart: break; case CMD_update:/* merely update display */ - /* is the load average high? */ - if (system_info.load_avg[0] > LoadMax) - { - /* yes, go home for visual feedback */ - go_home(); - fflush(stdout); - } break; case CMD_quit: ___ 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: r335539 - head/usr.bin/top
Author: eadler Date: Fri Jun 22 09:21:01 2018 New Revision: 335539 URL: https://svnweb.freebsd.org/changeset/base/335539 Log: top(1): reimplement header formatting as sbuf The current header formatting is a giant format string that changes global state during the format process. Make the following changes: - use sbuf to build up the header rather than use the above pseudo-dynamic one - Change name length to 10 - Reduce size of RES and SIZE by making humanize more aggressive - Restore a version number line to the copyright. This may be required by the copyright (and may not be; its unclear) This is also a pre-req to implementing TOPCOLOR from newer versions of top(1) Discussed with: allanjude, rpolka, danfe, rgrimes Differential Revision: https://reviews.freebsd.org/D15801 Modified: head/usr.bin/top/Makefile head/usr.bin/top/commands.c head/usr.bin/top/machine.c head/usr.bin/top/machine.h head/usr.bin/top/utils.c Modified: head/usr.bin/top/Makefile == --- head/usr.bin/top/Makefile Fri Jun 22 09:20:50 2018(r335538) +++ head/usr.bin/top/Makefile Fri Jun 22 09:21:01 2018(r335539) @@ -16,5 +16,5 @@ NO_WERROR= .endif CFLAGS.clang=-Wno-error=incompatible-pointer-types-discards-qualifiers -Wno-error=cast-qual -LIBADD=ncursesw m kvm jail util +LIBADD=ncursesw m kvm jail util sbuf .include Modified: head/usr.bin/top/commands.c == --- head/usr.bin/top/commands.c Fri Jun 22 09:20:50 2018(r335538) +++ head/usr.bin/top/commands.c Fri Jun 22 09:21:01 2018(r335539) @@ -1,5 +1,6 @@ /* * Top users/processes display for Unix + * Version 3 * * This program may be freely redistributed, * but this entire comment MUST remain intact. Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Fri Jun 22 09:20:50 2018(r335538) +++ head/usr.bin/top/machine.c Fri Jun 22 09:21:01 2018(r335539) @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -49,18 +50,14 @@ #include "layout.h" #define GETSYSCTL(name, var) getsysctl(name, &(var), sizeof(var)) -#defineSMPUNAMELEN 13 -#defineUPUNAMELEN 15 extern struct timeval timeout; static int smpmode; enum displaymodes displaymode; -static int namelength = 8; +static const int namelength = 10; /* TOP_JID_LEN based on max of 99 */ -#define TOP_JID_LEN 7 -#define TOP_SWAP_LEN 6 -static int jidlength; -static int swaplength; +#define TOP_JID_LEN 6 +#define TOP_SWAP_LEN 5 static int cmdlengthdelta; /* get_process_info passes back a handle. This is what it looks like: */ @@ -92,24 +89,12 @@ static const char io_header[] = static const char io_Proc_format[] = "%5d%*s %-*.*s %6ld %6ld %6ld %6ld %6ld %6ld %6.2f%% %.*s"; -/* XXX: build up header instead of statically defining them. - * This will also allow for a "format string" to be supplied - * as an argument to top(1) instead of having predefined options */ -static const char smp_header_thr_and_pid[] = -" %s%*s %-*.*s THR PRI NICE SIZERES%*s STATE C TIME %7s COMMAND"; -static const char smp_header_id_only[] = -" %s%*s %-*.*s PRI NICE SIZERES%*s STATE C TIME %7s COMMAND"; static const char smp_Proc_format[] = -"%5d%*s %-*.*s %s%3d %4s%7s %6s%*.*s %-6.6s %2d%7s %6.2f%% %.*s"; +"%5d%*s %-*.*s %s%3d %4s%6s %5s%*.*s %-6.6s %2d%7s %6.2f%% %.*s"; -static char up_header_thr_and_pid[] = -" %s%*s %-*.*s THR PRI NICE SIZERES%*s STATETIME %7s COMMAND"; -static char up_header_id_only[] = -" %s%*s %-*.*s PRI NICE SIZERES%*s STATETIME %7s COMMAND"; static char up_Proc_format[] = -"%5d%*s %-*.*s %s%3d %4s%7s %6s%*.*s %-6.6s%.0d%7s %6.2f%% %.*s"; +"%5d%*s %-*.*s %s%3d %4s%6s %5s%*.*s %-6.6s%.0d%7s %6.2f%% %.*s"; - /* process state names for the "STATE" column of the display */ /* the extra nulls in the string "run" are for adding a slash and the processor number when needed */ @@ -325,12 +310,6 @@ machine_init(struct statics *statics) NULL, 0) == 0 && carc_en == 1) carc_enabled = 1; - namelength = MAXLOGNAME; - if (smpmode && namelength > SMPUNAMELEN) - namelength = SMPUNAMELEN; - else if (namelength > UPUNAMELEN) - namelength = UPUNAMELEN; - kd = kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, "kvm_open"); if (kd == NULL) return (-1); @@ -407,63 +386,46 @@ machine_init(struct statics *statics) return (0); } -const char * +char * format_header(const char *uname_field) { - static char Header[128]; - const char *prehead; + static struct sbuf* header = NULL; -
svn commit: r335535 - head/usr.bin/su
Author: eadler Date: Fri Jun 22 09:10:50 2018 New Revision: 335535 URL: https://svnweb.freebsd.org/changeset/base/335535 Log: su(1): build with WARNS=6 Tested with full make universe Modified: head/usr.bin/su/Makefile Modified: head/usr.bin/su/Makefile == --- head/usr.bin/su/MakefileFri Jun 22 09:09:59 2018(r335534) +++ head/usr.bin/su/MakefileFri Jun 22 09:10:50 2018(r335535) @@ -5,8 +5,6 @@ PROG= su -WARNS?=5 - LIBADD=util pam .if ${MK_AUDIT} != "no" ___ 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: r335532 - head/share/man/man9
Author: eadler Date: Fri Jun 22 06:05:19 2018 New Revision: 335532 URL: https://svnweb.freebsd.org/changeset/base/335532 Log: epoch.9: bump Dd ref D15961 Modified: head/share/man/man9/epoch.9 Modified: head/share/man/man9/epoch.9 == --- head/share/man/man9/epoch.9 Fri Jun 22 06:04:22 2018(r335531) +++ head/share/man/man9/epoch.9 Fri Jun 22 06:05:19 2018(r335532) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 13, 2018 +.Dd June 21, 2018 .Dt EPOCH 9 .Os .Sh NAME ___ 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: r335531 - head/share/man/man9
Author: eadler Date: Fri Jun 22 06:04:22 2018 New Revision: 335531 URL: https://svnweb.freebsd.org/changeset/base/335531 Log: epoch.9: fix some style and speeling issues Reported by: Yutaro Hayakawa (spelling) Differential Revision: https://reviews.freebsd.org/D15961 Modified: head/share/man/man9/epoch.9 Modified: head/share/man/man9/epoch.9 == --- head/share/man/man9/epoch.9 Fri Jun 22 04:54:51 2018(r335530) +++ head/share/man/man9/epoch.9 Fri Jun 22 06:04:22 2018(r335531) @@ -1,5 +1,5 @@ .\" -.\" Copyright (C) 2018 Matthew Macy . +.\" Copyright (C) 2018 Matthew Macy . .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -65,15 +65,15 @@ .Sh DESCRIPTION Epochs are used to guarantee liveness and immutability of data by deferring reclamation and mutation until a grace period has elapsed. -Epochs do not have any lock ordering issues. Entering and leaving -an epoch section will never block. +Epochs do not have any lock ordering issues. +Entering and leaving an epoch section will never block. .Pp Epochs are allocated with .Fn epoch_alloc and freed with .Fn epoch_free . The flags passed to epoch_alloc determine whether preemption is -allowed during a section or not (the dafult), as specified by +allowed during a section or not (the default), as specified by EPOCH_PREEMPT. Threads indicate the start of an epoch critical section by calling .Fn epoch_enter . @@ -104,16 +104,17 @@ INVARIANTS can assert that a thread is in an epoch by .Fn in_epoch . .Pp The epoch API currently does not support sleeping in epoch_preempt sections. -A caller cannot do epoch_enter recursively on different preemptible epochs. A -caller should never call +A caller cannot do epoch_enter recursively on different preemptible epochs. +A caller should never call .Fn epoch_wait in the middle of an epoch section as this will lead to a deadlock. .Pp -Note that epochs are not a straight replacement for read locks. Callers -must use safe list and tailq traversal routines in an epoch (see ck_queue). +Note that epochs are not a straight replacement for read locks. +Callers must use safe list and tailq traversal routines in an epoch (see ck_queue). When modifying a list referenced from an epoch section safe removal routines must be used and the caller can no longer modify a list entry -in place. An item to be modified must be handled with copy on write +in place. +An item to be modified must be handled with copy on write and frees must be deferred until after a grace period has elapsed. .Sh RETURN VALUES .Fn in_epoch @@ -123,11 +124,11 @@ One must be cautious when using .Fn epoch_wait_preempt threads are pinned during epoch sections so if a thread in a section is then preempted by a higher priority compute bound thread on that CPU it can be -prevented from leaving the section. Thus the wait time for the waiter is +prevented from leaving the section. +Thus the wait time for the waiter is potentially unbounded. .Sh EXAMPLES Async free example: - Thread 1: .Bd -literal int @@ -164,7 +165,7 @@ void if_purgeaddrs(struct ifnet *ifp) { -/* */ +/* * IF_ADDR_WLOCK(ifp); CK_STAILQ_REMOVE(&ifp->if_addrhead, ifa, ifaddr, ifa_link); IF_ADDR_WUNLOCK(ifp); @@ -172,10 +173,11 @@ if_purgeaddrs(struct ifnet *ifp) } .Ed .Pp -Thread 1 traverses the ifaddr list in an epoch. Thread 2 unlinks -with the corresponding epoch safe macro, marks as logically free, -and then defers deletion. More general mutation or a synchronous -free would have to follow a a call to +Thread 1 traverses the ifaddr list in an epoch. +Thread 2 unlinks with the corresponding epoch safe macro, marks as logically free, +and then defers deletion. +More general mutation or a synchronous +free would have to follow a call to .Fn epoch_wait . .Sh ERRORS None. ___ 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: r335517 - head/usr.bin/top
Author: eadler Date: Fri Jun 22 00:02:36 2018 New Revision: 335517 URL: https://svnweb.freebsd.org/changeset/base/335517 Log: top(1): behave as documented for -t Show top itself by default, unless -t is specified. Modified: head/usr.bin/top/top.c Modified: head/usr.bin/top/top.c == --- head/usr.bin/top/top.c Fri Jun 22 00:02:05 2018(r335516) +++ head/usr.bin/top/top.c Fri Jun 22 00:02:36 2018(r335517) @@ -281,7 +281,7 @@ main(int argc, char *argv[]) /* get our name */ /* initialize some selection options */ ps.idle= true; -ps.self= false; +ps.self= true; ps.system = false; reset_uids(); ps.thread = false; ___ 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: r335402 - head/sbin/veriexecctl
On 19 June 2018 at 20:08, Eitan Adler wrote: > On 19 June 2018 at 18:08, Stephen J. Kiernan wrote: >> Added: head/sbin/veriexecctl/Makefile >> == >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/sbin/veriexecctl/Makefile Wed Jun 20 01:08:54 2018 >> (r335402) >> @@ -0,0 +1,11 @@ >> +# $FreeBSD$ >> + >> +PROG= veriexecctl >> +MAN= veriexecctl.8 >> +SRCS= veriexecctl_parse.y veriexecctl_conf.l veriexecctl.c >> + >> +WARNS?=3 > > Why are we introducing new code with lower-than-6 warnings ? In all the commotion about the more important issues this fell through. Also its argument parsing appears to not be using getopt[_long] ? -- Eitan Adler ___ 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: r335402 - head/sbin/veriexecctl
On 19 June 2018 at 18:08, Stephen J. Kiernan wrote: > Added: head/sbin/veriexecctl/Makefile > == > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sbin/veriexecctl/Makefile Wed Jun 20 01:08:54 2018 > (r335402) > @@ -0,0 +1,11 @@ > +# $FreeBSD$ > + > +PROG= veriexecctl > +MAN= veriexecctl.8 > +SRCS= veriexecctl_parse.y veriexecctl_conf.l veriexecctl.c > + > +WARNS?=3 Why are we introducing new code with lower-than-6 warnings ? -- Eitan Adler ___ 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: r335278 - head/bin/pwd
On 19 June 2018 at 12:57, Pedro Giffuni wrote: > > > On 19/06/2018 11:25, John Baldwin wrote: >> >> On 6/18/18 10:26 PM, Eitan Adler wrote: >>> >>> On 18 June 2018 at 10:57, John Baldwin wrote: >>>> >>>> On 6/16/18 10:14 PM, Eitan Adler wrote: >>>>> >>>>> Author: eadler >>>>> Date: Sun Jun 17 05:14:50 2018 >>>>> New Revision: 335278 >>>>> URL: https://svnweb.freebsd.org/changeset/base/335278 >>>>> >>>>> Log: >>>>>pwd: mark usage as dead >>>> >>>> You keep committing changes like this and ignoring e-mails about them. >>> >>> I replied both the first time and this time. I may have >>> (accidentally?) ignored similar emails though. The question I have is >>> other than the mild code churn what's the harm? >> >> It adds clutter. Also, fixing the tool means you fix all the places at >> once rather than slowly adding workarounds one by one. >> >>>> What broken compiler are you using that doesn't properly inherit __dead2 >>>> from the call to exit()? >>> >>> In this case, scan-build50 was getting annoyed. >> >> Does scan-build from LLVM 6.0 handle this correctly? If so, I'd say to >> just mark this warning as broken (and thus ignore it) for scan-build50 >> just as we ignore certain warnings from GCC 4.2.1 because they are >> broken-as-implemented. >> > FWIW, clang's scan-build is made to even more false positives and general > noise than the regular compiler warnings. > It is better to just ignore it unless it finds something real. I don't consider this a real harm, but I'll try and remember to ignore these in the future. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams ___ 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: r335390 - head/usr.bin/top
Author: eadler Date: Tue Jun 19 23:30:55 2018 New Revision: 335390 URL: https://svnweb.freebsd.org/changeset/base/335390 Log: top(1): fix top -mio Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Tue Jun 19 22:19:42 2018(r335389) +++ head/usr.bin/top/machine.c Tue Jun 19 23:30:55 2018(r335390) @@ -455,6 +455,7 @@ format_header(const char *uname_field) case DISP_IO: prehead = io_header; snprintf(Header, sizeof(Header), prehead, + ps.thread_id ? " THR" : "PID", jidlength, ps.jail ? " JID" : "", namelength, namelength, uname_field); break; ___ 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: r334540 - head/usr.bin/top
On 2 June 2018 at 23:51, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> On 2 June 2018 at 21:14, Rodney W. Grimes >> wrote: >> >> On 2 June 2018 at 16:53, Rodney W. Grimes >> >> wrote: >> >> > [ Charset UTF-8 unsupported, converting... ] >> >> >> Author: eadler >> >> >> Date: Sat Jun 2 21:40:45 2018 >> >> >> New Revision: 334540 >> >> >> URL: https://svnweb.freebsd.org/changeset/base/334540 >> >> >> >> >> >> Log: >> >> >> top(1): cleanup memory allocation and warnings >> >> >> >> >> >> - Prefer calloc over malloc. This is more predicable and we're not >> >> >> in a >> >> >> performance sensitive context. [1] >> >> >> - Remove bogus comment (obsolete from prior commit). [2] >> >> >> - Remove void casts and type casts of NULL >> >> >> - Remove redundant declaration of 'quit' >> >> >> - Add additional const >> >> >> >> >> >> Reported by:kib [1], vangyzen [2] >> >> >> >> >> >> Modified: >> >> >> head/usr.bin/top/display.c >> >> >> head/usr.bin/top/machine.c >> >> >> head/usr.bin/top/screen.c >> >> >> head/usr.bin/top/screen.h >> >> >> head/usr.bin/top/utils.c >> >> > ... >> >> > >> >> >> >> >> >> Modified: head/usr.bin/top/screen.c >> >> >> == >> >> >> --- head/usr.bin/top/screen.c Sat Jun 2 21:16:20 2018(r334539) >> >> >> +++ head/usr.bin/top/screen.c Sat Jun 2 21:40:45 2018(r334540) >> >> >> @@ -3,7 +3,7 @@ >> >> >> * Version 3 >> >> >> * >> >> >> * This program may be freely redistributed, >> >> >> - * but this entire comment MUST remain intact. >> >> >> + * but this entire ceomment MUST remain intact. >> >> > >> >> > I know you have already fixed this spelling error, >> >> > but I believe there are some other commits that actually >> >> > removed either this string, or some part of "this entire" >> >> > comment that is to "remain intact". >> >> >> >> I just went through my commits to top(1) and don't see any others. Did >> >> I miss any? >> > >> > Index: commands.c >> > === >> > --- commands.c (revision 333898) >> > +++ commands.c (working copy) >> > @@ -1,6 +1,5 @@ >> > /* >> > * Top users/processes display for Unix >> > - * Version 3 >> > * >> > * This program may be freely redistributed, >> > * but this entire comment MUST remain intact. >> > >> > Found with a cd usr.bin/top; svn diff -r 333898 which is >> > when you moved it to usr.bin. Further investigation >> > shows that this line was deleted at r333909. >> >> I removed the version line, not the license line. Do you believe >> "entire comment" includes the version information? > > I would interpret entire to be anything between /* and */. Sorry about the delay in responding: there was some ongoing conversations with core@ about the licensing of top(1). While that assertion isn't clear, I also don't think it's harmful to restore. I'll do so in my next pass. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams ___ 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: r335278 - head/bin/pwd
On 18 June 2018 at 10:57, John Baldwin wrote: > On 6/16/18 10:14 PM, Eitan Adler wrote: >> Author: eadler >> Date: Sun Jun 17 05:14:50 2018 >> New Revision: 335278 >> URL: https://svnweb.freebsd.org/changeset/base/335278 >> >> Log: >> pwd: mark usage as dead > > You keep committing changes like this and ignoring e-mails about them. I replied both the first time and this time. I may have (accidentally?) ignored similar emails though. The question I have is other than the mild code churn what's the harm? > What broken compiler are you using that doesn't properly inherit __dead2 > from the call to exit()? In this case, scan-build50 was getting annoyed. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams ___ 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: r335360 - head/usr.bin/top
Author: eadler Date: Tue Jun 19 05:01:07 2018 New Revision: 335360 URL: https://svnweb.freebsd.org/changeset/base/335360 Log: top(1): correct assertion Modified: head/usr.bin/top/top.c Modified: head/usr.bin/top/top.c == --- head/usr.bin/top/top.c Tue Jun 19 04:18:23 2018(r335359) +++ head/usr.bin/top/top.c Tue Jun 19 05:01:07 2018(r335360) @@ -1169,7 +1169,7 @@ restart: clear_message(); break; case CMD_NONE: - assert("reached switch without command"); + assert(false && "reached switch without command"); } } } ___ 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: r335359 - head/usr.bin/top
Author: eadler Date: Tue Jun 19 04:18:23 2018 New Revision: 335359 URL: https://svnweb.freebsd.org/changeset/base/335359 Log: top(1): correct header in UP mode Fix an oversight from r334869 which made the same change, but only for SMP systems. This avoids a segfault while D15801 is being reviewed. Reviewed by: kevans Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Tue Jun 19 03:11:09 2018(r335358) +++ head/usr.bin/top/machine.c Tue Jun 19 04:18:23 2018(r335359) @@ -87,7 +87,7 @@ struct handle { */ static const char io_header[] = -" PID%*s %-*.*s VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND"; +" %s%*s %-*.*s VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND"; static const char io_Proc_format[] = "%5d%*s %-*.*s %6ld %6ld %6ld %6ld %6ld %6ld %6.2f%% %.*s"; @@ -103,7 +103,7 @@ static const char smp_Proc_format[] = "%5d%*s %-*.*s %s%3d %4s%7s %6s%*.*s %-6.6s %2d%7s %6.2f%% %.*s"; static char up_header_thr_and_pid[] = -" PID%*s %-*.*s THR PRI NICE SIZERES%*s STATETIME %7s COMMAND"; +" %s%*s %-*.*s THR PRI NICE SIZERES%*s STATETIME %7s COMMAND"; static char up_header_id_only[] = " %s%*s %-*.*s PRI NICE SIZERES%*s STATETIME %7s COMMAND"; static char up_Proc_format[] = ___ 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: r335313 - head/lib/libcapsicum
Author: eadler Date: Mon Jun 18 04:58:48 2018 New Revision: 335313 URL: https://svnweb.freebsd.org/changeset/base/335313 Log: libcapsicum: adding missing man page links Modified: head/lib/libcapsicum/Makefile Modified: head/lib/libcapsicum/Makefile == --- head/lib/libcapsicum/Makefile Mon Jun 18 04:54:09 2018 (r335312) +++ head/lib/libcapsicum/Makefile Mon Jun 18 04:58:48 2018 (r335313) @@ -6,6 +6,8 @@ INCS= capsicum_helpers.h MAN+= capsicum_helpers.3 +MLINKS+=capsicum_helpers.3 caph_enter.3 +MLINKS+=capsicum_helpers.3 caph_enter_casper.3 MLINKS+=capsicum_helpers.3 caph_limit_stream.3 MLINKS+=capsicum_helpers.3 caph_limit_stdin.3 MLINKS+=capsicum_helpers.3 caph_limit_stderr.3 ___ 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: r335312 - head/usr.bin/dc
Author: eadler Date: Mon Jun 18 04:54:09 2018 New Revision: 335312 URL: https://svnweb.freebsd.org/changeset/base/335312 Log: dc: make use of caph_enter We already use caph library so this makes sense. Modified: head/usr.bin/dc/dc.c Modified: head/usr.bin/dc/dc.c == --- head/usr.bin/dc/dc.cMon Jun 18 04:12:58 2018(r335311) +++ head/usr.bin/dc/dc.cMon Jun 18 04:54:09 2018(r335312) @@ -137,7 +137,7 @@ main(int argc, char *argv[]) if (caph_limit_stream(fd, CAPH_READ) < 0 || caph_limit_stdio() < 0 || - (cap_enter() < 0 && errno != ENOSYS)) + caph_enter() < 0) err(1, "capsicum"); procfd(fd, argv[0]); @@ -146,7 +146,7 @@ main(int argc, char *argv[]) if (preproc_done) return (0); - if (caph_limit_stdio() < 0 || (cap_enter() < 0 && errno != ENOSYS)) + if (caph_limit_stdio() < 0 || caph_enter()) err(1, "capsicum"); src_setstream(&src, stdin); reset_bmachine(&src); ___ 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: r335310 - head/usr.bin/top
Author: eadler Date: Mon Jun 18 02:06:16 2018 New Revision: 335310 URL: https://svnweb.freebsd.org/changeset/base/335310 Log: top(1): use more modern signal code Rather than manually build signal masks use functions designed for that reason. Also use sigprocmask instead of sigblock. Modified: head/usr.bin/top/top.c Modified: head/usr.bin/top/top.c == --- head/usr.bin/top/top.c Sun Jun 17 23:08:54 2018(r335309) +++ head/usr.bin/top/top.c Mon Jun 18 02:06:16 2018(r335310) @@ -50,10 +50,6 @@ typedef void sigret_t; /* The buffer that stdio will use */ static char stdoutbuf[Buffersize]; -/* build Signal masks */ -#define Smask(s) (1 << ((s) - 1)) - - static int fmt_flags = 0; int pcpu_stats = false; @@ -233,7 +229,7 @@ main(int argc, char *argv[]) static char tempbuf1[50]; static char tempbuf2[50]; -int old_sigmask; /* only used for BSD-style signals */ + sigset_t old_sigmask, new_sigmask; int topn = Infinity; double delay = 2; int displays = 0; /* indicates unspecified */ @@ -591,13 +587,18 @@ main(int argc, char *argv[]) } /* hold interrupt signals while setting up the screen and the handlers */ -old_sigmask = sigblock(Smask(SIGINT) | Smask(SIGQUIT) | Smask(SIGTSTP)); + + sigemptyset(&new_sigmask); + sigaddset(&new_sigmask, SIGINT); + sigaddset(&new_sigmask, SIGQUIT); + sigaddset(&new_sigmask, SIGTSTP); + sigprocmask(SIG_BLOCK, &new_sigmask, &old_sigmask); init_screen(); signal(SIGINT, leave); signal(SIGQUIT, leave); signal(SIGTSTP, tstop); signal(SIGWINCH, top_winch); -sigsetmask(old_sigmask); +sigprocmask(SIG_SETMASK, &old_sigmask, NULL); if (warnings) { fputs("", stderr); ___ 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: r335278 - head/bin/pwd
On 16 June 2018 at 23:54, Bruce Evans wrote: > On Sun, 17 Jun 2018, Eitan Adler wrote: > >> Log: >> pwd: mark usage as dead >> >> Modified: >> head/bin/pwd/pwd.c >> >> Modified: head/bin/pwd/pwd.c >> >> == >> --- head/bin/pwd/pwd.c Sun Jun 17 03:33:29 2018(r335277) >> +++ head/bin/pwd/pwd.c Sun Jun 17 05:14:50 2018(r335278) >> @@ -95,7 +95,7 @@ main(int argc, char *argv[]) >> exit(0); >> } >> >> -void >> +void __dead2 >> usage(void) >> { > > > I asked you to back out a previous addition of __dead2 about 20 additions > of it ago. > > __dead2 here has no effect. The compiler can see that usage() doesn't > return if it understands __dead2 at all, since usage() ends with exit() > which is declared as __dead2. You are correct that this doesn't do much for the compiler. On the other hand it does shut up clang and some other static analyzers. It also doesn't cause any harm, so I don't see why it should be removed. Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams ___ 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: r335304 - head/sys/dev/acpi_support
Author: eadler Date: Sun Jun 17 20:44:20 2018 New Revision: 335304 URL: https://svnweb.freebsd.org/changeset/base/335304 Log: acpi: Add support for Thinkpads Mic led PR: 229074 Submitted by: "Ali Abdallah" Modified: head/sys/dev/acpi_support/acpi_ibm.c Modified: head/sys/dev/acpi_support/acpi_ibm.c == --- head/sys/dev/acpi_support/acpi_ibm.cSun Jun 17 20:33:02 2018 (r335303) +++ head/sys/dev/acpi_support/acpi_ibm.cSun Jun 17 20:44:20 2018 (r335304) @@ -74,6 +74,7 @@ ACPI_MODULE_NAME("IBM") #define ACPI_IBM_METHOD_FANSTATUS 12 #define ACPI_IBM_METHOD_THERMAL13 #define ACPI_IBM_METHOD_HANDLEREVENTS 14 +#define ACPI_IBM_METHOD_MIC_LED15 /* Hotkeys/Buttons */ #define IBM_RTC_HOTKEY10x64 @@ -175,6 +176,10 @@ struct acpi_ibm_softc { int led_busy; int led_state; + /* Mic led handle */ + ACPI_HANDLE mic_led_handle; + int mic_led_state; + int wlan_bt_flags; int thermal_updt_supported; @@ -258,7 +263,11 @@ static struct { .method = ACPI_IBM_METHOD_FANSTATUS, .description= "Fan enable", }, - + { + .name = "mic_led", + .method = ACPI_IBM_METHOD_MIC_LED, + .description= "Mic led", + }, { NULL, 0, NULL, 0 } }; @@ -371,6 +380,35 @@ ibm_led_task(struct acpi_ibm_softc *sc, int pending __ } static int +acpi_ibm_mic_led_set (struct acpi_ibm_softc *sc, int arg) +{ + ACPI_OBJECT_LIST input; + ACPI_OBJECT params[1]; + ACPI_STATUS status; + + if (arg < 0 || arg > 1) + return (EINVAL); + + if (sc->mic_led_handle) { + params[0].Type = ACPI_TYPE_INTEGER; + params[0].Integer.Value = 0; + /* mic led: 0 off, 2 on */ + if (arg == 1) + params[0].Integer.Value = 2; + + input.Pointer = params; + input.Count = 1; + + status = AcpiEvaluateObject (sc->handle, "MMTS", &input, NULL); + if (ACPI_SUCCESS(status)) + sc->mic_led_state = arg; + return(status); + } + + return (0); +} + +static int acpi_ibm_probe(device_t dev) { if (acpi_disabled("ibm") || @@ -552,6 +590,9 @@ acpi_ibm_resume(device_t dev) } ACPI_SERIAL_END(ibm); + /* The mic led does not turn back on when sysctl_set is called in the above loop */ + acpi_ibm_mic_led_set(sc, sc->mic_led_state); + return (0); } @@ -739,6 +780,12 @@ acpi_ibm_sysctl_get(struct acpi_ibm_softc *sc, int met else val = -1; break; + case ACPI_IBM_METHOD_MIC_LED: + if (sc->mic_led_handle) + return sc->mic_led_state; + else + val = -1; + break; } return (val); @@ -783,6 +830,10 @@ acpi_ibm_sysctl_set(struct acpi_ibm_softc *sc, int met return acpi_ibm_mute_set(sc, arg); break; + case ACPI_IBM_METHOD_MIC_LED: + return acpi_ibm_mic_led_set (sc, arg); + break; + case ACPI_IBM_METHOD_THINKLIGHT: return acpi_ibm_thinklight_set(sc, arg); break; @@ -841,6 +892,17 @@ acpi_ibm_sysctl_init(struct acpi_ibm_softc *sc, int me case ACPI_IBM_METHOD_MUTE: /* EC is required here, which was already checked before */ return (TRUE); + + case ACPI_IBM_METHOD_MIC_LED: + if (ACPI_SUCCESS(AcpiGetHandle(sc->handle, "MMTS", &sc->mic_led_handle))) + { + /* Turn off mic led by default */ + acpi_ibm_mic_led_set (sc, 0); + return(TRUE); + } + else + sc->mic_led_handle = NULL; + return (FALSE); case ACPI_IBM_METHOD_THINKLIGHT: sc->cmos_handle = NULL; ___ 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: r335299 - head
On 17 June 2018 at 13:00, Nathan Whitehorn wrote: > As a minor caveat, the default release kernel on powerpc64 is "GENERIC64" > not "GENERIC". I'm happy to add that, but for a general README I'm not convinced its important to be overly detailed. That said, noted. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams ___ 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: r334073 - head
On 23 May 2018 at 15:48, John Baldwin wrote: > On Wednesday, May 23, 2018 12:09:59 PM Eitan Adler wrote: >> On 23 May 2018 at 09:27, John Baldwin wrote: >> > On Wednesday, May 23, 2018 04:09:01 AM Eitan Adler wrote: >> >> Author: eadler >> >> Date: Wed May 23 04:09:01 2018 >> >> New Revision: 334073 >> >> URL: https://svnweb.freebsd.org/changeset/base/334073 >> >> >> >> Log: >> >> README: Reduce the textdump; describe the project >> >> >> >> Rework the README to make it a little easier for new users. This is the >> >> first file many will see when persuing the FreeBSD source code so >> >> >> >> - remove some of the text describes how to build. This is better covered >> >> in the linked documentation. >> >> - add a small blurb for what FreeBSD is. Some users might find this >> >> document through features such as github search so they may not even >> >> know what the project is >> >> >> >> generally, gear this file for the new, accidental, or casual user rather >> >> than towards someone seeking fuller documentation. >> >> >> >> Modified: >> >> head/README >> >> head/README.md >> >> >> >> Modified: head/README >> >> == >> >> --- head/README Wed May 23 03:41:22 2018(r334072) >> >> +++ head/README Wed May 23 04:09:01 2018(r334073) >> >> @@ -2,35 +2,25 @@ This is the top level of the FreeBSD source directory. >> >> - >> >> -The kernel configuration files reside in the sys//conf >> >> -sub-directory. GENERIC is the default configuration used in release >> >> builds. >> >> -NOTES contains entries and documentation for all possible >> >> -devices, not just those commonly used. >> > >> > I do think this paragraph is still useful as part of the Source Roadmap and >> > not really part of the build instructions. >> >> I added a reference to sys//conf to the bottom of the >> README.Adding something about NOTES might be helpful, but IMHO closer >> to the build. > > Yes, but the directory doesn't tell you which file is the default kernel. > I'm thinking in terms of a random person browsing the tree via github's web > interface who doesn't know which files are which in which case I think this > note was kind of useful. SendingREADME SendingREADME.md Transmitting file data ..done Committing transaction... Committed revision 335299. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams ___ 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: r335299 - head
Author: eadler Date: Sun Jun 17 19:44:24 2018 New Revision: 335299 URL: https://svnweb.freebsd.org/changeset/base/335299 Log: README: add generic notes about GENERIC and NOTES Inform new users what GENERIC and NOTES are. These are useful for people perusing the tree without a great deal of specific fbsd knowledge. See discussion of r334073 for further motivation. Requested by: jhb Modified: head/README head/README.md Modified: head/README == --- head/README Sun Jun 17 19:31:35 2018(r335298) +++ head/README Sun Jun 17 19:44:24 2018(r335299) @@ -60,7 +60,9 @@ stand Boot loader sources. sysKernel sources. -sys//conf Kernel configuration file +sys//conf Kernel configuration files. GENERIC is the configuration + used in release builds. NOTES contains documentation of + all possible entries. tests Regression tests which can be run by Kyua. See tests/README for additional information. Modified: head/README.md == --- head/README.md Sun Jun 17 19:31:35 2018(r335298) +++ head/README.md Sun Jun 17 19:44:24 2018(r335299) @@ -62,7 +62,9 @@ stand Boot loader sources. sysKernel sources. -sys//conf Kernel configuration file +sys//conf Kernel configuration files. GENERIC is the configuration + used in release builds. NOTES contains documentation of + all possible entries. tests Regression tests which can be run by Kyua. See tests/README for additional information. ___ 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: r335295 - head/lib/liby
Author: eadler Date: Sun Jun 17 18:05:27 2018 New Revision: 335295 URL: https://svnweb.freebsd.org/changeset/base/335295 Log: liby: rewrite yyerror.h In order to prevent confusion about copyright, rewrite from scratch yyerror.h. See discussion on r335270 for details. Modified: head/lib/liby/yyerror.h Modified: head/lib/liby/yyerror.h == --- head/lib/liby/yyerror.h Sun Jun 17 17:43:55 2018(r335294) +++ head/lib/liby/yyerror.h Sun Jun 17 18:05:27 2018(r335295) @@ -1,8 +1,7 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. + * Copyright (c) 2018 Eitan Adler * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,14 +11,11 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - *may be used to endorse or promote products derived from this software - *without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -27,10 +23,14 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ -#include -__FBSDID("$FreeBSD$"); +#ifndef YYERROR_H +#define YYERROR_H -int yyparse(void); int yyerror(const char *msg); +int yyparse(void); + +#endif /* YYERROR_H */ ___ 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: r335270 - head/lib/liby
On 17 June 2018 at 08:49, Ian Lepore wrote: > All this drama about "copying" one line of text and adding another to > create a new file. The no-brainer fix is to add a proper new-file > license and stop arguing about what flavor of copying and what rules > might apply to that. I didn't add my copyright since I didn't write it. I'll rewrite from scratch and add my own new-file copyright. This file contains precisely zero creative output [0] so it should't matter too much. > And for something that might actually matter: nobody seems to have > noticed that this new header file lacks the standard include guards > (something which style(9) seems to be silent about). Good point. [0] Oracle v Google notwithstanding -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams ___ 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: r335278 - head/bin/pwd
Author: eadler Date: Sun Jun 17 05:14:50 2018 New Revision: 335278 URL: https://svnweb.freebsd.org/changeset/base/335278 Log: pwd: mark usage as dead Modified: head/bin/pwd/pwd.c Modified: head/bin/pwd/pwd.c == --- head/bin/pwd/pwd.c Sun Jun 17 03:33:29 2018(r335277) +++ head/bin/pwd/pwd.c Sun Jun 17 05:14:50 2018(r335278) @@ -95,7 +95,7 @@ main(int argc, char *argv[]) exit(0); } -void +void __dead2 usage(void) { ___ 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: r335273 - head/sbin/gvinum
Author: eadler Date: Sun Jun 17 01:39:22 2018 New Revision: 335273 URL: https://svnweb.freebsd.org/changeset/base/335273 Log: gvinum: revert WARNS change in Makefile Architectures that passed on a local build universe, failed on tinderbox. Revert the number change for now while I investigate. Modified: head/sbin/gvinum/Makefile Modified: head/sbin/gvinum/Makefile == --- head/sbin/gvinum/Makefile Sun Jun 17 01:26:57 2018(r335272) +++ head/sbin/gvinum/Makefile Sun Jun 17 01:39:22 2018(r335273) @@ -5,6 +5,7 @@ PROG= gvinum SRCS= gvinum.c gvinum.h geom_vinum_share.c MAN= gvinum.8 +WARNS= 2 CFLAGS+= -I${SRCTOP}/sys -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit LIBADD=edit geom ___ 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: r335270 - head/lib/liby
On 16 June 2018 at 18:10, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> Author: eadler >> Date: Sat Jun 16 23:50:34 2018 >> New Revision: 335270 >> URL: https://svnweb.freebsd.org/changeset/base/335270 >> >> Log: >> liby: build with WARNS=6 >> >> Tested with amd64, arm64, i386, mips >> >> Added: >> head/lib/liby/yyerror.h (contents, props changed) >> Modified: >> head/lib/liby/Makefile >> head/lib/liby/main.c >> head/lib/liby/yyerror.c >> >> Modified: head/lib/liby/Makefile >> == >> --- head/lib/liby/MakefileSat Jun 16 23:49:22 2018(r335269) >> +++ head/lib/liby/MakefileSat Jun 16 23:50:34 2018(r335270) >> @@ -5,6 +5,4 @@ LIB= y >> SRCS=main.c yyerror.c >> NO_PIC= >> >> -WARNS?= 1 >> - >> .include >> >> Modified: head/lib/liby/main.c >> == >> --- head/lib/liby/main.c Sat Jun 16 23:49:22 2018(r335269) >> +++ head/lib/liby/main.c Sat Jun 16 23:50:34 2018(r335270) >> @@ -32,16 +32,17 @@ >> #include >> __FBSDID("$FreeBSD$"); >> >> -#ifndef lint >> +#if defined(LIBC_SCCS) && !defined(lint) >> static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/4/93"; >> -#endif /* not lint */ >> +#endif /* LIBC_SCCS and not lint */ >> >> #include >> >> -int yyparse(void); >> +#include "yyerror.h" >> >> int >> main(void) >> { >> + >> exit(yyparse()); >> } >> >> Modified: head/lib/liby/yyerror.c >> == >> --- head/lib/liby/yyerror.c Sat Jun 16 23:49:22 2018(r335269) >> +++ head/lib/liby/yyerror.c Sat Jun 16 23:50:34 2018(r335270) >> @@ -32,16 +32,18 @@ >> #include >> __FBSDID("$FreeBSD$"); >> >> -#ifndef lint >> +#if defined(LIBC_SCCS) && !defined(lint) >> static char sccsid[] = "@(#)yyerror.c8.1 (Berkeley) 6/4/93"; >> -#endif /* not lint */ >> +#endif /* LIBC_SCCS and not lint */ >> >> #include >> >> +#include "yyerror.h" >> + >> int >> -yyerror(msg) >> -char *msg; >> +yyerror(const char *msg) >> { >> - (void)fprintf(stderr, "%s\n", msg); >> + >> + fprintf(stderr, "%s\n", msg); >> return(0); >> } >> >> Added: head/lib/liby/yyerror.h >> == >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/lib/liby/yyerror.h Sat Jun 16 23:50:34 2018(r335270) >> @@ -0,0 +1,36 @@ > > Where did this file come from I added a header file instead of keeping the prototypes in the .c files. Is something wrong with that? -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams ___ 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: r334046 - head/tools/tools/intel-ucode-split
On 13 June 2018 at 07:07, Mark Johnston wrote: > On Wed, Jun 13, 2018 at 01:46:34AM +0200, Oliver Pinter wrote: >> On Wednesday, June 13, 2018, Ed Maste wrote: >> >> > On Tue, 12 Jun 2018 at 18:17, Sean Bruno wrote: >> > > >> > > On 06/12/18 16:05, Oliver Pinter wrote: >> > > > On 5/22/18, Ed Maste wrote: >> > > >> Author: emaste >> > > >> Date: Tue May 22 14:35:33 2018 >> > > >> New Revision: 334046 >> > > >> URL: https://svnweb.freebsd.org/changeset/base/334046 >> > > >> >> > > >> Log: >> > > >> intel-ucode-split: add -n flag to skip creating output files >> > > >> >> > > >> Sponsored by: The FreeBSD Foundation >> > > >> >> > > >> Modified: >> > > >> head/tools/tools/intel-ucode-split/intel-ucode-split.c >> > > > >> > > > Hi! >> > > > >> > > > Could you please MFC the intel-ucode-split related commits to >> > 11-STABLE? >> > > > >> > > > Thanks, >> > > > op >> > > >> > > Do you need it in base for some reason? This code is already in the >> > > devcpu-data port and is used when the port is built. Its not needed for >> > > anything AFAIK. >> > >> > Indeed, the real use in FreeBSD is via the devcpu-data port; I >> > committed it to src/tools/ for collaboration and testing. I'll merge >> > it to stable/11 if it will be useful for someone, but am curious about >> > the use case. >> > >> >> >> I'm considering to write an in kernel microcode update facility, based on >> firmware(9), and in first idea it would be nice during the generation of >> firmware modules. > > FWIW, I'm working on this for 12.0 and was planning to describe my > proposal on -arch in the next couple of weeks. For my purposes at > least, firmware(9) isn't suitable. We'd like to ensure that updates are > applied before the kernel does CPU identification, and that happens > quite early during boot. This places some constraints on the > implementation which exclude firmware(9). Naive question, knowing nothing about firmware(9), but why can't it be enhanced to work that early? It seems there might be other use-cases for very-early-boot firmware application. -- Eitan Adler ___ 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: r335271 - head/sbin/ddb
Author: eadler Date: Sun Jun 17 00:00:24 2018 New Revision: 335271 URL: https://svnweb.freebsd.org/changeset/base/335271 Log: ddb: unbreak ppc usr/src/powerpc.powerpcspe/tmp/usr/include/strings.h:62: warning: shadowed declaration is here Modified: head/sbin/ddb/ddb_capture.c Modified: head/sbin/ddb/ddb_capture.c == --- head/sbin/ddb/ddb_capture.c Sat Jun 16 23:50:34 2018(r335270) +++ head/sbin/ddb/ddb_capture.c Sun Jun 17 00:00:24 2018(r335271) @@ -83,12 +83,12 @@ kread(kvm_t *kvm, void *kvm_pointer, void *address, si } static int -kread_symbol(kvm_t *kvm, int index, void *address, size_t size, +kread_symbol(kvm_t *kvm, int read_index, void *address, size_t size, size_t offset) { ssize_t ret; - ret = kvm_read(kvm, namelist[index].n_value + offset, address, size); + ret = kvm_read(kvm, namelist[read_index].n_value + offset, address, size); if (ret < 0 || (size_t)ret != size) return (-1); 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: r335270 - head/lib/liby
Author: eadler Date: Sat Jun 16 23:50:34 2018 New Revision: 335270 URL: https://svnweb.freebsd.org/changeset/base/335270 Log: liby: build with WARNS=6 Tested with amd64, arm64, i386, mips Added: head/lib/liby/yyerror.h (contents, props changed) Modified: head/lib/liby/Makefile head/lib/liby/main.c head/lib/liby/yyerror.c Modified: head/lib/liby/Makefile == --- head/lib/liby/Makefile Sat Jun 16 23:49:22 2018(r335269) +++ head/lib/liby/Makefile Sat Jun 16 23:50:34 2018(r335270) @@ -5,6 +5,4 @@ LIB=y SRCS= main.c yyerror.c NO_PIC= -WARNS?=1 - .include Modified: head/lib/liby/main.c == --- head/lib/liby/main.cSat Jun 16 23:49:22 2018(r335269) +++ head/lib/liby/main.cSat Jun 16 23:50:34 2018(r335270) @@ -32,16 +32,17 @@ #include __FBSDID("$FreeBSD$"); -#ifndef lint +#if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/4/93"; -#endif /* not lint */ +#endif /* LIBC_SCCS and not lint */ #include -int yyparse(void); +#include "yyerror.h" int main(void) { + exit(yyparse()); } Modified: head/lib/liby/yyerror.c == --- head/lib/liby/yyerror.c Sat Jun 16 23:49:22 2018(r335269) +++ head/lib/liby/yyerror.c Sat Jun 16 23:50:34 2018(r335270) @@ -32,16 +32,18 @@ #include __FBSDID("$FreeBSD$"); -#ifndef lint +#if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)yyerror.c 8.1 (Berkeley) 6/4/93"; -#endif /* not lint */ +#endif /* LIBC_SCCS and not lint */ #include +#include "yyerror.h" + int -yyerror(msg) -char *msg; +yyerror(const char *msg) { - (void)fprintf(stderr, "%s\n", msg); + + fprintf(stderr, "%s\n", msg); return(0); } Added: head/lib/liby/yyerror.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/liby/yyerror.h Sat Jun 16 23:50:34 2018(r335270) @@ -0,0 +1,36 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + *may be used to endorse or promote products derived from this software + *without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +int yyparse(void); +int yyerror(const char *msg); ___ 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: r335269 - head/tools/tools/netrate/http
Author: eadler Date: Sat Jun 16 23:49:22 2018 New Revision: 335269 URL: https://svnweb.freebsd.org/changeset/base/335269 Log: netrate: build with WARNS=6 Tested with amd64, i386 Modified: head/tools/tools/netrate/http/Makefile head/tools/tools/netrate/http/http.c Modified: head/tools/tools/netrate/http/Makefile == --- head/tools/tools/netrate/http/Makefile Sat Jun 16 23:47:59 2018 (r335268) +++ head/tools/tools/netrate/http/Makefile Sat Jun 16 23:49:22 2018 (r335269) @@ -2,7 +2,6 @@ PROG= http MAN= -WARNS?=3 LIBADD=pthread .include Modified: head/tools/tools/netrate/http/http.c == --- head/tools/tools/netrate/http/http.cSat Jun 16 23:47:59 2018 (r335268) +++ head/tools/tools/netrate/http/http.cSat Jun 16 23:49:22 2018 (r335269) @@ -160,7 +160,7 @@ killall(void) } static void -signal_handler(int signum) +signal_handler(int signum __unused) { statep->hwd[curthread].hwd_start_signal_barrier = 1; @@ -232,7 +232,7 @@ usage(void) } static void -main_sighup(int signum) +main_sighup(int signum __unused) { killall(); @@ -242,7 +242,7 @@ int main(int argc, char *argv[]) { int ch, error, i; - char *pagebuffer; + struct state *pagebuffer; uintmax_t total; size_t len; pid_t pid; @@ -283,7 +283,7 @@ main(int argc, char *argv[]) err(-1, "mmap"); if (minherit(pagebuffer, len, INHERIT_SHARE) < 0) err(-1, "minherit"); - statep = (struct state *)pagebuffer; + statep = pagebuffer; bzero(&statep->sin, sizeof(statep->sin)); statep->sin.sin_len = sizeof(statep->sin); ___ 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: r335268 - head/sbin/quotacheck
Author: eadler Date: Sat Jun 16 23:47:59 2018 New Revision: 335268 URL: https://svnweb.freebsd.org/changeset/base/335268 Log: quotacheck: build with WARNS=3 WARNS++ Tested with amd64, arm64, i386, mips Modified: head/sbin/quotacheck/Makefile head/sbin/quotacheck/quotacheck.c Modified: head/sbin/quotacheck/Makefile == --- head/sbin/quotacheck/Makefile Sat Jun 16 23:45:59 2018 (r335267) +++ head/sbin/quotacheck/Makefile Sat Jun 16 23:47:59 2018 (r335268) @@ -4,7 +4,7 @@ PACKAGE=quotacheck PROG= quotacheck SRCS= quotacheck.c preen.c fsutil.c utilities.c -WARNS?=2 +WARNS?=3 MAN= quotacheck.8 LIBADD=util ufs Modified: head/sbin/quotacheck/quotacheck.c == --- head/sbin/quotacheck/quotacheck.c Sat Jun 16 23:45:59 2018 (r335267) +++ head/sbin/quotacheck/quotacheck.c Sat Jun 16 23:47:59 2018 (r335268) @@ -74,9 +74,9 @@ __FBSDID("$FreeBSD$"); #include "quotacheck.h" -char *qfname = QUOTAFILENAME; -char *qfextension[] = INITQFNAMES; -char *quotagroup = QUOTAGROUP; +const char *qfname = QUOTAFILENAME; +const char *qfextension[] = INITQFNAMES; +const char *quotagroup = QUOTAGROUP; union { struct fs sblk; @@ -253,8 +253,9 @@ chkquota(char *specname, struct quotafile *qfu, struct struct fileusage *fup; union dinode *dp; struct fs *fs; - int cg, i, ret, mode, errs = 0; - ino_t ino, inosused, userino = 0, groupino = 0; + int i, ret, mode, errs = 0; + u_int32_t cg; + ino_t curino, ino, inosused, userino = 0, groupino = 0; dev_t dev, userdev = 0, groupdev = 0; struct stat sb; const char *mntpt; @@ -367,7 +368,7 @@ chkquota(char *specname, struct quotafile *qfu, struct if (inosused <= 0) continue; } - for (i = 0; i < inosused; i++, ino++) { + for (curino = 0; curino < inosused; curino++, ino++) { if ((dp = getnextinode(ino)) == NULL || ino < UFS_ROOTINO || (mode = DIP(dp, di_mode) & IFMT) == 0) @@ -403,7 +404,7 @@ chkquota(char *specname, struct quotafile *qfu, struct continue; if (qfg) { fup = addid((u_long)DIP(dp, di_gid), GRPQUOTA, - (char *)0, mntpt); + NULL, mntpt); fup->fu_curinodes++; if (mode == IFREG || mode == IFDIR || mode == IFLNK) @@ -411,7 +412,7 @@ chkquota(char *specname, struct quotafile *qfu, struct } if (qfu) { fup = addid((u_long)DIP(dp, di_uid), USRQUOTA, - (char *)0, mntpt); + NULL, mntpt); fup->fu_curinodes++; if (mode == IFREG || mode == IFDIR || mode == IFLNK) @@ -498,7 +499,7 @@ update(const char *fsname, struct quotafile *qf, int t */ if (highid < lastid && stat(quota_qfname(qf), &sb) == 0 && - sb.st_size > (((off_t)highid + 2) * sizeof(struct dqblk))) + sb.st_size > (off_t)((highid + 2) * sizeof(struct dqblk))) truncate(quota_qfname(qf), (((off_t)highid + 2) * sizeof(struct dqblk))); 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: r335267 - head/sbin/gvinum
Author: eadler Date: Sat Jun 16 23:45:59 2018 New Revision: 335267 URL: https://svnweb.freebsd.org/changeset/base/335267 Log: gvinum: build with WARNS=6 This also removes an unused and uninitialized variable. Tested with amd64, arm64, i386, mips Modified: head/sbin/gvinum/Makefile head/sbin/gvinum/gvinum.c Modified: head/sbin/gvinum/Makefile == --- head/sbin/gvinum/Makefile Sat Jun 16 23:44:18 2018(r335266) +++ head/sbin/gvinum/Makefile Sat Jun 16 23:45:59 2018(r335267) @@ -5,7 +5,6 @@ PROG= gvinum SRCS= gvinum.c gvinum.h geom_vinum_share.c MAN= gvinum.8 -WARNS?=2 CFLAGS+= -I${SRCTOP}/sys -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit LIBADD=edit geom Modified: head/sbin/gvinum/gvinum.c == --- head/sbin/gvinum/gvinum.c Sat Jun 16 23:44:18 2018(r335266) +++ head/sbin/gvinum/gvinum.c Sat Jun 16 23:45:59 2018(r335267) @@ -94,7 +94,7 @@ static void copy_device(struct gv_drive *, const char int main(int argc, char **argv) { - int line, tokens; + int tokens; char buffer[BUFSIZ], *inputline, *token[GV_MAXARGS]; /* Load the module if necessary. */ @@ -124,7 +124,6 @@ main(int argc, char **argv) add_history(inputline); strcpy(buffer, inputline); free(inputline); - line++; /* count the lines */ tokens = gv_tokenize(buffer, token, GV_MAXARGS); if (tokens) parseline(tokens, token); @@ -184,7 +183,8 @@ gvinum_create(int argc, char * const *argv) int drives, errors, fd, flags, i, line, plexes, plex_in_volume; int sd_in_plex, status, subdisks, tokens, undeffd, volumes; const char *errstr; - char buf[BUFSIZ], buf1[BUFSIZ], commandline[BUFSIZ], *ed, *sdname; + char buf[BUFSIZ], buf1[BUFSIZ], commandline[BUFSIZ], *sdname; + const char *ed; char original[BUFSIZ], tmpfile[20], *token[GV_MAXARGS]; char plex[GV_MAXPLEXNAME], volume[GV_MAXVOLNAME]; @@ -806,7 +806,8 @@ gvinum_list(int argc, char * const *argv) struct gctl_req *req; int flags, i, j; const char *errstr; - char buf[20], *cmd, config[GV_CFG_LEN + 1]; + char buf[20], config[GV_CFG_LEN + 1]; + const char *cmd; flags = 0; cmd = "list"; @@ -931,7 +932,7 @@ gvinum_move(int argc, char * const *argv) } static void -gvinum_printconfig(int argc, char * const *argv) +gvinum_printconfig(int argc __unused, char * const *argv __unused) { printconfig(stdout, ""); @@ -943,7 +944,7 @@ gvinum_parityop(int argc, char * const *argv, int rebu struct gctl_req *req; int flags, i; const char *errstr; - char *op; + const char *op; if (rebuild) { op = "rebuildparity"; @@ -1214,7 +1215,7 @@ gvinum_start(int argc, char * const *argv) } static void -gvinum_stop(int argc, char * const *argv) +gvinum_stop(int argc __unused, char * const *argv __unused) { int err, fileid; ___ 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: r335266 - head/sbin/ddb
Author: eadler Date: Sat Jun 16 23:44:18 2018 New Revision: 335266 URL: https://svnweb.freebsd.org/changeset/base/335266 Log: ddb: build with WARNS=6 Tested with amd64, arm64, i386, mips Modified: head/sbin/ddb/Makefile head/sbin/ddb/ddb_script.c Modified: head/sbin/ddb/Makefile == --- head/sbin/ddb/Makefile Sat Jun 16 21:07:46 2018(r335265) +++ head/sbin/ddb/Makefile Sat Jun 16 23:44:18 2018(r335266) @@ -4,7 +4,6 @@ PACKAGE=runtime PROG= ddb SRCS= ddb.c ddb_capture.c ddb_script.c MAN= ddb.8 -WARNS?=3 LIBADD=kvm Modified: head/sbin/ddb/ddb_script.c == --- head/sbin/ddb/ddb_script.c Sat Jun 16 21:07:46 2018(r335265) +++ head/sbin/ddb/ddb_script.c Sat Jun 16 23:44:18 2018(r335266) @@ -135,7 +135,7 @@ ddb_script(int argc, char *argv[]) } void -ddb_scripts(int argc, char *argv[]) +ddb_scripts(int argc, char *argv[] __unused) { if (argc != 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: r335265 - head/usr.bin/units
Author: eadler Date: Sat Jun 16 21:07:46 2018 New Revision: 335265 URL: https://svnweb.freebsd.org/changeset/base/335265 Log: units: fix some nits - prefer braces to abusing the `,` operator - mark dead function as dead - remove dead break Modified: head/usr.bin/units/units.c Modified: head/usr.bin/units/units.c == --- head/usr.bin/units/units.c Sat Jun 16 20:00:41 2018(r335264) +++ head/usr.bin/units/units.c Sat Jun 16 21:07:46 2018(r335265) @@ -625,8 +625,10 @@ compareproducts(char **one, char **two) two++; else if (strcmp(*one, *two)) return 1; - else - one++, two++; + else { + one++; + two++; + } } return 0; } @@ -726,7 +728,7 @@ showanswer(struct unittype * have, struct unittype * w } -static void +static void __dead2 usage(void) { fprintf(stderr, @@ -805,7 +807,6 @@ main(int argc, char **argv) else printf("Units data file not found"); exit(0); - break; case 'h': /* FALLTHROUGH */ ___ 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"