svn commit: r333966 - head/sys/amd64/amd64
Author: mjg Date: Mon May 21 05:20:23 2018 New Revision: 333966 URL: https://svnweb.freebsd.org/changeset/base/333966 Log: amd64: annotate pti with __read_frequently Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Mon May 21 05:00:19 2018(r333965) +++ head/sys/amd64/amd64/pmap.c Mon May 21 05:20:23 2018(r333966) @@ -413,7 +413,7 @@ int invpcid_works = 0; SYSCTL_INT(_vm_pmap, OID_AUTO, invpcid_works, CTLFLAG_RD, _works, 0, "Is the invpcid instruction available ?"); -int pti = 0; +int __read_frequently pti = 0; SYSCTL_INT(_vm_pmap, OID_AUTO, pti, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, , 0, "Page Table Isolation enabled"); ___ 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: r333948 - head/usr.bin/top
On 20 May 2018 at 22:01, Rodney W. Grimeswrote: > [ Charset UTF-8 unsupported, converting... ] >> Author: eadler >> Date: Mon May 21 00:20:32 2018 >> New Revision: 333948 >> URL: https://svnweb.freebsd.org/changeset/base/333948 >> >> Log: >> top(1): add getrusage to SEE also >> >> This documents the various columns that top might support. >> >> PR: 199637 >> Submitted by: verma...@interia.pl >> >> Modified: >> head/usr.bin/top/top.1 >> >> Modified: head/usr.bin/top/top.1 >> == >> --- head/usr.bin/top/top.1Sun May 20 23:39:08 2018(r333947) >> +++ head/usr.bin/top/top.1Mon May 21 00:20:32 2018(r333948) >> @@ -454,13 +454,13 @@ things can change while >> .I top >> is collecting information for an update. The picture it gives is only a >> close approximation to reality. >> -.SH "SEE ALSO" >> +.SH SEE ALSO >> kill(1), >> ps(1), >> stty(1), >> mem(4), >> +getrusage(2), >> renice(8) >> -.\" $FreeBSD$ > > Was deleting this intentional? It wasnt mentioned in the commit log, > and I do not see it added back anyplace else. Yeah. Its a duplicate of a line above. It was originally included because it was concatenating generated code. I need to rewrite the top(1) man page, but each time I started ended up finding something else to change. I'll get to it "soon" -- 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: r333948 - head/usr.bin/top
[ Charset UTF-8 unsupported, converting... ] > Author: eadler > Date: Mon May 21 00:20:32 2018 > New Revision: 333948 > URL: https://svnweb.freebsd.org/changeset/base/333948 > > Log: > top(1): add getrusage to SEE also > > This documents the various columns that top might support. > > PR: 199637 > Submitted by: verma...@interia.pl > > Modified: > head/usr.bin/top/top.1 > > Modified: head/usr.bin/top/top.1 > == > --- head/usr.bin/top/top.1Sun May 20 23:39:08 2018(r333947) > +++ head/usr.bin/top/top.1Mon May 21 00:20:32 2018(r333948) > @@ -454,13 +454,13 @@ things can change while > .I top > is collecting information for an update. The picture it gives is only a > close approximation to reality. > -.SH "SEE ALSO" > +.SH SEE ALSO > kill(1), > ps(1), > stty(1), > mem(4), > +getrusage(2), > renice(8) > -.\" $FreeBSD$ Was deleting this intentional? It wasnt mentioned in the commit log, and I do not see it added back anyplace else. > .SH "FreeBSD NOTES" > > .SH DESCRIPTION OF MEMORY > > -- Rod Grimes rgri...@freebsd.org ___ 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: r333965 - in head: . usr.bin/top
Author: eadler Date: Mon May 21 05:00:19 2018 New Revision: 333965 URL: https://svnweb.freebsd.org/changeset/base/333965 Log: top(1): add myself as a MAINTAIENR also fix some nits Modified: head/MAINTAINERS head/usr.bin/top/username.h head/usr.bin/top/utils.c Modified: head/MAINTAINERS == --- head/MAINTAINERSMon May 21 04:51:43 2018(r333964) +++ head/MAINTAINERSMon May 21 05:00:19 2018(r333965) @@ -99,6 +99,7 @@ sys/netpfil/pfkp,glebius Pre-commit review recommende sys/x86/xenroyger Pre-commit review recommended. sys/xenroyger Pre-commit review recommended. tests freebsd-testing,ngiePre-commit review requested. +top(1) eadler Pre-commit review requested. usr.sbin/bsdconfig dteske Pre-commit phabricator review requested. usr.sbin/dpv dteske Pre-commit review requested. Keep in sync with libdpv. usr.sbin/pkg pkg@Please coordinate behavior or flag changes with pkg team. Modified: head/usr.bin/top/username.h == --- head/usr.bin/top/username.h Mon May 21 04:51:43 2018(r333964) +++ head/usr.bin/top/username.h Mon May 21 05:00:19 2018(r333965) @@ -1,7 +1,4 @@ /* - * 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/utils.c == --- head/usr.bin/top/utils.cMon May 21 04:51:43 2018(r333964) +++ head/usr.bin/top/utils.cMon May 21 05:00:19 2018(r333965) @@ -1,7 +1,4 @@ /* - * Top users/processes display for Unix - * Version 3 - * * This program may be freely redistributed, * but this entire comment MUST remain intact. * @@ -397,10 +394,7 @@ long seconds; #define NUM_STRINGS 8 -char *format_k(amt) - -int amt; - +char *format_k(int amt) { static char retarray[NUM_STRINGS][16]; static int index = 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: r333964 - head/usr.bin/top
Author: eadler Date: Mon May 21 04:51:43 2018 New Revision: 333964 URL: https://svnweb.freebsd.org/changeset/base/333964 Log: top(1): remove prime.c This file was not connected to the build, and is better served by primes(6) anyways. Deleted: head/usr.bin/top/prime.c ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333963 - head/usr.bin/top
Author: eadler Date: Mon May 21 04:47:13 2018 New Revision: 333963 URL: https://svnweb.freebsd.org/changeset/base/333963 Log: top(1): fix MIPS I missed where the parentheses were. Reported by: imp Modified: head/usr.bin/top/loadavg.h Modified: head/usr.bin/top/loadavg.h == --- head/usr.bin/top/loadavg.h Mon May 21 04:40:20 2018(r333962) +++ head/usr.bin/top/loadavg.h Mon May 21 04:47:13 2018(r333963) @@ -14,20 +14,6 @@ * $FreeBSD$ */ -/* - * We assume that if FSCALE is defined, then avenrun and ccpu are type long. - * If your machine is an exception (mips, perhaps?) then make adjustments - * here. - * - * Defined types: load_avg for load averages, pctcpu for cpu percentages. - */ -#if defined(__mips__) && defined(__FreeBSD__) -# include -# if defined(FBITS) && !defined(FSCALE) -# define FSCALE (1 << FBITS) /* RISC/os on mips */ -# endif -#endif - #define FIXED_LOADAVG FSCALE #define FIXED_PCTCPU FSCALE ___ 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: r333962 - head/usr.bin/top
Author: eadler Date: Mon May 21 04:40:20 2018 New Revision: 333962 URL: https://svnweb.freebsd.org/changeset/base/333962 Log: top(1): further unconditionally assume we're on FreeBSD Modified: head/usr.bin/top/loadavg.h head/usr.bin/top/machine.c head/usr.bin/top/machine.h head/usr.bin/top/top.c Modified: head/usr.bin/top/loadavg.h == --- head/usr.bin/top/loadavg.h Mon May 21 04:32:14 2018(r333961) +++ head/usr.bin/top/loadavg.h Mon May 21 04:40:20 2018(r333962) @@ -10,6 +10,8 @@ * * loaddouble(la) - convert load_avg to double. * intload(i) - convert integer to load_avg. + * + * $FreeBSD$ */ /* @@ -19,39 +21,19 @@ * * Defined types: load_avg for load averages, pctcpu for cpu percentages. */ -#if defined(__mips__) && !(defined(__NetBSD__) || defined(__FreeBSD__)) +#if defined(__mips__) && defined(__FreeBSD__) # include # if defined(FBITS) && !defined(FSCALE) # define FSCALE (1 << FBITS) /* RISC/os on mips */ # endif #endif -#ifdef FSCALE -# define FIXED_LOADAVG FSCALE -# define FIXED_PCTCPU FSCALE -#endif +#define FIXED_LOADAVG FSCALE +#define FIXED_PCTCPU FSCALE -#ifdef ibm032 -# undef FIXED_LOADAVG -# undef FIXED_PCTCPU -# define FIXED_PCTCPU PCT_SCALE -#endif +typedef long pctcpu; +#define pctdouble(p) ((double)(p) / FIXED_PCTCPU) - -#ifdef FIXED_PCTCPU - typedef long pctcpu; -# define pctdouble(p) ((double)(p) / FIXED_PCTCPU) -#else -typedef double pctcpu; -# define pctdouble(p) (p) -#endif - -#ifdef FIXED_LOADAVG - typedef fixpt_t load_avg; -# define loaddouble(la) ((double)(la) / FIXED_LOADAVG) -# define intload(i) ((int)((i) * FIXED_LOADAVG)) -#else - typedef double load_avg; -# define loaddouble(la) (la) -# define intload(i) ((double)(i)) -#endif +typedef fixpt_t load_avg; +#define loaddouble(la) ((double)(la) / FIXED_LOADAVG) +#define intload(i) ((int)((i) * FIXED_LOADAVG)) Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Mon May 21 04:32:14 2018(r333961) +++ head/usr.bin/top/machine.c Mon May 21 04:40:20 2018(r333962) @@ -905,7 +905,7 @@ get_process_info(struct system_info *si, struct proces /* remember active and total counts */ si->p_total = total_procs; - si->p_active = pref_len = active_procs; + si->p_pactive = pref_len = active_procs; /* pass back a handle */ handle.next_proc = pref; Modified: head/usr.bin/top/machine.h == --- head/usr.bin/top/machine.h Mon May 21 04:32:14 2018(r333961) +++ head/usr.bin/top/machine.h Mon May 21 04:40:20 2018(r333962) @@ -31,18 +31,12 @@ struct statics * the system_info struct is filled in by a machine dependent routine. */ -#ifdef p_active /* uw7 define macro p_active */ -#define P_ACTIVE p_pactive -#else -#define P_ACTIVE p_active -#endif - struct system_info { intlast_pid; double load_avg[NUM_AVERAGES]; intp_total; -intP_ACTIVE; /* number of procs considered "active" */ +intp_pactive; /* number of procs considered "active" */ int*procstates; int*cpustates; int*memory; Modified: head/usr.bin/top/top.c == --- head/usr.bin/top/top.c Mon May 21 04:32:14 2018(r333961) +++ head/usr.bin/top/top.c Mon May 21 04:40:20 2018(r333962) @@ -403,7 +403,7 @@ char *argv[]; if (getuid() == 0) { /* be very un-nice! */ - (void) nice(-20); + nice(-20); } else { @@ -589,25 +589,13 @@ char *argv[]; } /* hold interrupt signals while setting up the screen and the handlers */ -#ifdef SIGHOLD -sighold(SIGINT); -sighold(SIGQUIT); -sighold(SIGTSTP); -#else old_sigmask = sigblock(Smask(SIGINT) | Smask(SIGQUIT) | Smask(SIGTSTP)); -#endif init_screen(); signal(SIGINT, leave); signal(SIGQUIT, leave); signal(SIGTSTP, tstop); signal(SIGWINCH, top_winch); -#ifdef SIGRELSE -sigrelse(SIGINT); -sigrelse(SIGQUIT); -sigrelse(SIGTSTP); -#else -(void) sigsetmask(old_sigmask); -#endif +sigsetmask(old_sigmask); if (warnings) { fputs("", stderr); @@ -689,7 +677,7 @@ restart: /* determine number of processes to actually display */ /* this number will be the smallest of: active processes, number user requested, number current screen accomodates */ - active_procs = system_info.P_ACTIVE; + active_procs = system_info.p_pactive; if (active_procs > topn) { active_procs = topn; @@ -779,18
svn commit: r333961 - head/usr.bin/top
Author: eadler Date: Mon May 21 04:32:14 2018 New Revision: 333961 URL: https://svnweb.freebsd.org/changeset/base/333961 Log: top(1): clean up in prep for const poisoning - sprinkle "const" in a few obvious places - remove "(void)" in front of lack-of-error-checked functions Modified: head/usr.bin/top/commands.c Modified: head/usr.bin/top/commands.c == --- head/usr.bin/top/commands.c Mon May 21 04:02:45 2018(r333960) +++ head/usr.bin/top/commands.c Mon May 21 04:32:14 2018(r333961) @@ -43,7 +43,7 @@ struct errs /* structure for a system-call error */ char *arg; /* argument that caused the error */ }; -char *err_string(void); +static char *err_string(void); static int str_adderr(char *str, int len, int err); static int str_addarg(char *str, int len, char *arg, int first); @@ -237,7 +237,7 @@ char *err_string() { return(err_listem); } - (void) strcat(string, "; "); /* we know there's more */ + strcat(string, "; "); /* we know there's more */ } currerr = errp->errnum; first = Yes; @@ -262,15 +262,10 @@ char *err_string() */ static int -str_adderr(str, len, err) - -char *str; -int len; -int err; - +str_adderr(char *str, int len, int err) { -char *msg; -int msglen; +const char *msg; +int msglen; msg = err == 0 ? "Not a number" : strerror(err); msglen = strlen(msg) + 2; @@ -278,8 +273,8 @@ int err; { return(0); } -(void) strcat(str, ": "); -(void) strcat(str, msg); +strcat(str, ": "); +strcat(str, msg); return(len - msglen); } @@ -311,9 +306,9 @@ int first; } if (!first) { - (void) strcat(str, ", "); + strcat(str, ", "); } -(void) strcat(str, arg); +strcat(str, arg); return(len - arglen); } @@ -402,7 +397,7 @@ kill_procs(char *str) if (isdigit(str[1])) { - (void) scanint(str + 1, ); + scanint(str + 1, ); if (signum <= 0 || signum >= NSIG) { return(" invalid signal number"); ___ 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: r333960 - head/usr.bin/top
Author: eadler Date: Mon May 21 04:02:45 2018 New Revision: 333960 URL: https://svnweb.freebsd.org/changeset/base/333960 Log: top(1): further unconditionally assume we're on FreeBSD Modified: head/usr.bin/top/commands.c head/usr.bin/top/display.c head/usr.bin/top/display.h head/usr.bin/top/machine.c Modified: head/usr.bin/top/commands.c == --- head/usr.bin/top/commands.c Mon May 21 03:58:15 2018(r333959) +++ head/usr.bin/top/commands.c Mon May 21 04:02:45 2018(r333960) @@ -489,13 +489,11 @@ renice_procs(char *str) prio = -prio; } -#if defined(PRIO_MIN) && defined(PRIO_MAX) /* check for validity */ if (procnum == -1 || prio < PRIO_MIN || prio > PRIO_MAX) { return(" bad priority value"); } -#endif /* move to the first process number */ if ((str = next_field(str)) == NULL) Modified: head/usr.bin/top/display.c == --- head/usr.bin/top/display.c Mon May 21 03:58:15 2018(r333959) +++ head/usr.bin/top/display.c Mon May 21 04:02:45 2018(r333960) @@ -441,40 +441,6 @@ int *brkdn; } } -#ifdef no_more -/* - * *_cpustates(states, names) - print the cpu state percentages - * - * Assumptions: cursor is on the PREVIOUS line - */ - -/* cpustates_tag() calculates the correct tag to use to label the line */ - -char *cpustates_tag() - -{ -char *use; - -static char *short_tag = "CPU: "; -static char *long_tag = "CPU states: "; - -/* if length + strlen(long_tag) >= screen_width, then we have to - use the shorter tag (we subtract 2 to account for ": ") */ -if (cpustate_total_length + (int)strlen(long_tag) - 2 >= screen_width) -{ - use = short_tag; -} -else -{ - use = long_tag; -} - -/* set cpustates_column accordingly then return result */ -cpustates_column = strlen(use); -return(use); -} -#endif - void i_cpustates(states) Modified: head/usr.bin/top/display.h == --- head/usr.bin/top/display.h Mon May 21 03:58:15 2018(r333959) +++ head/usr.bin/top/display.h Mon May 21 04:02:45 2018(r333960) @@ -13,7 +13,6 @@ void clear_message(void); int display_resize(void); voidi_header(char *text); char *printable(char *string); -char *cpustates_tag(void); voiddisplay_header(int t); int display_init(struct statics *statics); voidi_arc(int *stats); Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Mon May 21 03:58:15 2018(r333959) +++ head/usr.bin/top/machine.c Mon May 21 04:02:45 2018(r333960) @@ -42,8 +42,9 @@ #include #include "top.h" -#include "machine.h" #include "display.h" +#include "machine.h" +#include "loadavg.h" #include "screen.h" #include "utils.h" #include "layout.h" @@ -56,11 +57,7 @@ extern struct process_select ps; extern struct timeval timeout; static int smpmode; enum displaymodes displaymode; -#ifdef TOP_USERNAME_LEN -static int namelength = TOP_USERNAME_LEN; -#else static int namelength = 8; -#endif /* TOP_JID_LEN based on max of 99 */ #define TOP_JID_LEN 7 #define TOP_SWAP_LEN 6 @@ -75,8 +72,6 @@ struct handle { int remaining; /* number of pointers remaining */ }; -/* declarations for load_avg */ -#include "loadavg.h" /* define what weighted cpu is. */ #define weighted_cpu(pct, pp) ((pp)->ki_swtime == 0 ? 0.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: r333959 - head/usr.bin/top
Author: eadler Date: Mon May 21 03:58:15 2018 New Revision: 333959 URL: https://svnweb.freebsd.org/changeset/base/333959 Log: top(1): build with WARNS=3 This fixes everything but -Wincompatible-pointer-types-discards-qualifiers Modified: head/usr.bin/top/Makefile head/usr.bin/top/display.c head/usr.bin/top/display.h head/usr.bin/top/machine.h head/usr.bin/top/top.c Modified: head/usr.bin/top/Makefile == --- head/usr.bin/top/Makefile Mon May 21 03:36:16 2018(r333958) +++ head/usr.bin/top/Makefile Mon May 21 03:58:15 2018(r333959) @@ -7,7 +7,7 @@ SRCS+= sigdesc.h top.local.h CFLAGS+= -I ${.OBJDIR} MAN= top.1 -WARNS?=2 +WARNS?=3 LIBADD=ncursesw m kvm jail Modified: head/usr.bin/top/display.c == --- head/usr.bin/top/display.c Mon May 21 03:36:16 2018(r333958) +++ head/usr.bin/top/display.c Mon May 21 03:58:15 2018(r333959) @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -1042,14 +1043,16 @@ display_header(int t) } } -/*VARARGS2*/ void -new_message(int type, char *msgfmt, caddr_t a1, caddr_t a2, caddr_t a3) +new_message(int type, char *msgfmt, ...) { -int i; +va_list args; +size_t i; +va_start(args, msgfmt); + /* first, format the message */ -snprintf(next_msg, sizeof(next_msg), msgfmt, a1, a2, a3); +snprintf(next_msg, sizeof(next_msg), msgfmt, args); if (msglen > 0) { Modified: head/usr.bin/top/display.h == --- head/usr.bin/top/display.h Mon May 21 03:36:16 2018(r333958) +++ head/usr.bin/top/display.h Mon May 21 03:58:15 2018(r333959) @@ -27,7 +27,7 @@ void i_procstates(int total, int *brkdn); voidi_swap(int *stats); voidi_timeofday(time_t *tod); voidi_uptime(struct timeval *bt, time_t *tod); -voidnew_message(); +voidnew_message(int type, char *msgfmt, ...); int readline(char *buffer, int size, int numeric); char *trim_header(char *text); voidu_arc(int *stats); Modified: head/usr.bin/top/machine.h == --- head/usr.bin/top/machine.h Mon May 21 03:36:16 2018(r333958) +++ head/usr.bin/top/machine.h Mon May 21 03:58:15 2018(r333959) @@ -91,4 +91,8 @@ intproc_owner(int pid); /* non-int routines typically used by the machine dependent module */ char *printable(char *string); +caddr_t +get_process_info(struct system_info *si, struct process_select *sel, +int (*compare)(const void *, const void *)); + #endif /* MACHINE_H */ Modified: head/usr.bin/top/top.c == --- head/usr.bin/top/top.c Mon May 21 03:36:16 2018(r333958) +++ head/usr.bin/top/top.c Mon May 21 03:58:15 2018(r333959) @@ -221,7 +221,7 @@ char *argv[]; int displays = 0; /* indicates unspecified */ int sel_ret = 0; time_t curr_time; -char *(*get_userid)() = username; +char *(*get_userid)(int) = username; char *uname_field = "USERNAME"; char *header_text; char *env_top; @@ -625,7 +625,7 @@ restart: while ((displays == -1) || (displays-- > 0)) { - int (*compare)(); + int (*compare)(const void * const, const void * const); /* get the current stats */ ___ 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: r333958 - head/usr.bin/top
Author: eadler Date: Mon May 21 03:36:16 2018 New Revision: 333958 URL: https://svnweb.freebsd.org/changeset/base/333958 Log: top(1): fix several more warnings Modified: head/usr.bin/top/commands.c head/usr.bin/top/display.c head/usr.bin/top/machine.c head/usr.bin/top/screen.c head/usr.bin/top/top.c head/usr.bin/top/top.h head/usr.bin/top/utils.c Modified: head/usr.bin/top/commands.c == --- head/usr.bin/top/commands.c Mon May 21 01:53:23 2018(r333957) +++ head/usr.bin/top/commands.c Mon May 21 03:36:16 2018(r333958) @@ -326,8 +326,8 @@ static int err_compar(const void *p1, const void *p2) { int result; -struct errs * g1 = (struct errs *)p1; -struct errs * g2 = (struct errs *)p2; +const struct errs * const g1 = (const struct errs * const)p1; +const struct errs * const g2 = (const struct errs * const)p2; Modified: head/usr.bin/top/display.c == --- head/usr.bin/top/display.c Mon May 21 01:53:23 2018(r333957) +++ head/usr.bin/top/display.c Mon May 21 03:36:16 2018(r333958) @@ -66,7 +66,7 @@ static int display_width = MAX_COLS; /* things initialized by display_init and used thruout */ /* buffer of proc information lines for display updating */ -char *screenbuf = NULL; +static char *screenbuf = NULL; static char **procstate_names; static char **cpustate_names; @@ -656,13 +656,10 @@ int *stats; * Assumptions: cursor is on "lastline" *for i_arc ONLY: cursor is on the previous line */ -char arc_buffer[MAX_COLS]; +static char arc_buffer[MAX_COLS]; void -i_arc(stats) - -int *stats; - +i_arc(int *stats) { if (arc_names == NULL) return; @@ -698,13 +695,10 @@ int *stats; * Assumptions: cursor is on "lastline" *for i_carc ONLY: cursor is on the previous line */ -char carc_buffer[MAX_COLS]; +static char carc_buffer[MAX_COLS]; void -i_carc(stats) - -int *stats; - +i_carc(int *stats) { if (carc_names == NULL) return; @@ -740,13 +734,10 @@ int *stats; *for i_swap ONLY: cursor is on the previous line */ -char swap_buffer[MAX_COLS]; +static char swap_buffer[MAX_COLS]; void -i_swap(stats) - -int *stats; - +i_swap(int *stats) { fputs("\nSwap: ", stdout); lastline++; @@ -757,10 +748,7 @@ int *stats; } void -u_swap(stats) - -int *stats; - +u_swap(int *stats) { static char new[MAX_COLS]; @@ -790,8 +778,8 @@ static int msglen = 0; void i_message() - { + while (lastline < y_message) { fputc('\n', stdout); Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Mon May 21 01:53:23 2018(r333957) +++ head/usr.bin/top/machine.c Mon May 21 03:36:16 2018(r333958) @@ -124,7 +124,7 @@ static char up_header[] = /* the extra nulls in the string "run" are for adding a slash and the processor number when needed */ -char *state_abbrev[] = { +static char *state_abbrev[] = { "", "START", "RUN\0\0\0", "SLEEP", "STOP", "ZOMB", "WAIT", "LOCK" }; @@ -151,8 +151,8 @@ static long cp_diff[CPUSTATES]; /* these are for detailing the process states */ -int process_states[8]; -char *procstatenames[] = { +static int process_states[8]; +static char *procstatenames[] = { "", " starting, ", " running, ", " sleeping, ", " stopped, ", " zombie, ", " waiting, ", " lock, ", NULL @@ -160,33 +160,33 @@ char *procstatenames[] = { /* these are for detailing the cpu states */ -int cpu_states[CPUSTATES]; -char *cpustatenames[] = { +static int cpu_states[CPUSTATES]; +static char *cpustatenames[] = { "user", "nice", "system", "interrupt", "idle", NULL }; /* these are for detailing the memory statistics */ -int memory_stats[7]; -char *memorynames[] = { +static int memory_stats[7]; +static char *memorynames[] = { "K Active, ", "K Inact, ", "K Laundry, ", "K Wired, ", "K Buf, ", "K Free", NULL }; -int arc_stats[7]; -char *arcnames[] = { +static int arc_stats[7]; +static char *arcnames[] = { "K Total, ", "K MFU, ", "K MRU, ", "K Anon, ", "K Header, ", "K Other", NULL }; -int carc_stats[4]; -char *carcnames[] = { +static int carc_stats[4]; +static char *carcnames[] = { "K Compressed, ", "K Uncompressed, ", ":1 Ratio, ", NULL }; -int swap_stats[7]; -char *swapnames[] = { +static int swap_stats[7]; +static char *swapnames[] = { "K Total, ", "K Used, ", "K Free, ", "% Inuse, ", "K In, ", "K Out", NULL }; @@ -933,7 +933,8 @@ format_next_process(caddr_t xhandle, char *(*get_useri size_t state; struct rusage ru, *rup; long p_tot, s_tot; - char *proc_fmt, thr_buf[6]; + char *proc_fmt; + char thr_buf[6];
svn commit: r333951 - head/usr.bin/top
Author: eadler Date: Mon May 21 00:53:42 2018 New Revision: 333951 URL: https://svnweb.freebsd.org/changeset/base/333951 Log: top(1): clean much of WARNS=3 issues There is still one glaring issue: new_message is not a protoype, but can't be trivially converted since it uses K style var-args. Modified: head/usr.bin/top/display.c head/usr.bin/top/display.h head/usr.bin/top/machine.c head/usr.bin/top/screen.c head/usr.bin/top/screen.h head/usr.bin/top/top.c Modified: head/usr.bin/top/display.c == --- head/usr.bin/top/display.c Mon May 21 00:51:30 2018(r333950) +++ head/usr.bin/top/display.c Mon May 21 00:53:42 2018(r333951) @@ -92,9 +92,9 @@ static int cpustates_column; static enum { OFF, ON, ERASE } header_status = ON; -static int string_count(); -static void summary_format(); -static void line_update(); +static int string_count(char **); +static void summary_format(char *, int *, char **); +static void line_update(char *, char *, int, int); int x_lastpid = 10; int y_lastpid = 0; @@ -1041,11 +1041,9 @@ int hi; } void -display_header(t) - -int t; - +display_header(int t) { + if (t) { header_status = ON; @@ -1058,17 +1056,12 @@ int t; /*VARARGS2*/ void -new_message(type, msgfmt, a1, a2, a3) - -int type; -char *msgfmt; -caddr_t a1, a2, a3; - +new_message(int type, char *msgfmt, caddr_t a1, caddr_t a2, caddr_t a3) { int i; /* first, format the message */ -(void) snprintf(next_msg, sizeof(next_msg), msgfmt, a1, a2, a3); +snprintf(next_msg, sizeof(next_msg), msgfmt, a1, a2, a3); if (msglen > 0) { @@ -1196,10 +1189,7 @@ int numeric; /* internal support routines */ -static int string_count(pp) - -char **pp; - +static int string_count(char **pp) { int cnt; @@ -1211,12 +1201,7 @@ char **pp; return(cnt); } -static void summary_format(str, numbers, names) - -char *str; -int *numbers; -char **names; - +static void summary_format(char *str, int *numbers, char **names) { char *p; int num; Modified: head/usr.bin/top/display.h == --- head/usr.bin/top/display.h Mon May 21 00:51:30 2018(r333950) +++ head/usr.bin/top/display.h Mon May 21 00:53:42 2018(r333951) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /* constants needed for display.c */ /* "type" argument for new_message function */ @@ -27,7 +28,7 @@ void i_swap(int *stats); voidi_timeofday(time_t *tod); voidi_uptime(struct timeval *bt, time_t *tod); voidnew_message(); -int readline(char *buffer, int size, int numeric); +int readline(char *buffer, int size, int numeric); char *trim_header(char *text); voidu_arc(int *stats); voidu_carc(int *stats); Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Mon May 21 00:51:30 2018(r333950) +++ head/usr.bin/top/machine.c Mon May 21 00:53:42 2018(r333951) @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -460,6 +461,8 @@ format_header(char *uname_field) jidlength, ps.jail ? " JID" : "", namelength, namelength, uname_field); break; + case DISP_MAX: + assert("displaymode must not be set to DISP_MAX"); } cmdlengthdelta = strlen(Header) - 7; return (Header); @@ -624,7 +627,7 @@ get_system_info(struct system_info *si) * XXX: this could be done when the actual processes are fetched, we do * it here out of laziness. */ -const struct kinfo_proc * +static const struct kinfo_proc * get_old_proc(struct kinfo_proc *pp) { struct kinfo_proc **oldpp, *oldp; @@ -667,7 +670,7 @@ get_old_proc(struct kinfo_proc *pp) * Return the total amount of IO done in blocks in/out and faults. * store the values individually in the pointers passed in. */ -long +static long get_io_stats(struct kinfo_proc *pp, long *inp, long *oup, long *flp, long *vcsw, long *ivcsw) { @@ -741,7 +744,7 @@ proc_used_cpu(struct kinfo_proc *pp) /* * Return the total number of block in/out and faults by a process. */ -long +static long get_io_total(struct kinfo_proc *pp) { long dummy; @@ -932,7 +935,8 @@ format_next_process(caddr_t xhandle, char *(*get_useri double pct; struct handle *hp; char status[16]; - int cpu, state; + int cpu; + size_t state; struct rusage ru, *rup; long p_tot, s_tot; char *proc_fmt, thr_buf[6]; @@ -995,7 +999,7 @@ format_next_process(caddr_t xhandle, char *(*get_useri state < sizeof(state_abbrev) / sizeof(*state_abbrev)) sprintf(status, "%.6s", state_abbrev[state]); else -
svn commit: r333952 - head/usr.bin/top
Author: eadler Date: Mon May 21 01:05:32 2018 New Revision: 333952 URL: https://svnweb.freebsd.org/changeset/base/333952 Log: top(1): fix "variable without declaration" warning This is only shown at WARNS=6, but since we don't yet build at WARNS=2 its hidden. Modified: head/usr.bin/top/sigconv.awk Modified: head/usr.bin/top/sigconv.awk == --- head/usr.bin/top/sigconv.awkMon May 21 00:53:42 2018 (r333951) +++ head/usr.bin/top/sigconv.awkMon May 21 01:05:32 2018 (r333952) @@ -9,7 +9,7 @@ BEGIN { print "const char * const name;" print "const int number;" print "};\n" - print "struct sigdesc sigdesc[] = {" + print "static struct sigdesc sigdesc[] = {" } /^#define[ \t][ \t]*SIG[A-Z]+[0-9]*[ \t]/ { ___ 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: r333957 - in head/sys: net sys
Author: mmacy Date: Mon May 21 01:53:23 2018 New Revision: 333957 URL: https://svnweb.freebsd.org/changeset/base/333957 Log: ck: simplify interface with libkvm consumers by defining ck_queue types as their queue.h equivalents if !_KERNEL Added: head/sys/sys/ck.h (contents, props changed) Modified: head/sys/net/if_var.h Modified: head/sys/net/if_var.h == --- head/sys/net/if_var.h Mon May 21 01:39:26 2018(r333956) +++ head/sys/net/if_var.h Mon May 21 01:53:23 2018(r333957) @@ -76,10 +76,10 @@ struct netdump_methods; #include /* ifqueue only? */ #include #include -#include -#include #endif /* _KERNEL */ +#include #include +#include #include /* XXX */ #include /* struct ifqueue */ #include /* XXX */ @@ -90,13 +90,8 @@ struct netdump_methods; #include TAILQ_HEAD(ifnethead, ifnet); /* we use TAILQs so that the order of */ -#ifdef _KERNEL CK_STAILQ_HEAD(ifaddrhead, ifaddr);/* instantiation is preserved in the list */ CK_STAILQ_HEAD(ifmultihead, ifmultiaddr); -#else -STAILQ_HEAD(ifaddrhead, ifaddr); /* instantiation is preserved in the list */ -STAILQ_HEAD(ifmultihead, ifmultiaddr); -#endif TAILQ_HEAD(ifgrouphead, ifg_group); #ifdef _KERNEL @@ -522,7 +517,7 @@ struct ifaddr { struct sockaddr *ifa_netmask; /* used to determine subnet */ struct ifnet *ifa_ifp; /* back-pointer to interface */ struct carp_softc *ifa_carp; /* pointer to CARP data */ - STAILQ_ENTRY(ifaddr) ifa_link; /* queue macro glue */ + CK_STAILQ_ENTRY(ifaddr) ifa_link; /* queue macro glue */ void(*ifa_rtrequest)/* check or clean routes (+ or -)'d */ (int, struct rtentry *, struct rt_addrinfo *); u_short ifa_flags; /* mostly rt_flags for cloning */ @@ -546,7 +541,7 @@ voidifa_ref(struct ifaddr *ifa); * structure except that it keeps track of multicast addresses. */ struct ifmultiaddr { - STAILQ_ENTRY(ifmultiaddr) ifma_link; /* queue macro glue */ + CK_STAILQ_ENTRY(ifmultiaddr) ifma_link; /* queue macro glue */ struct sockaddr *ifma_addr;/* address this membership is for */ struct sockaddr *ifma_lladdr; /* link-layer translation, if any */ struct ifnet *ifma_ifp;/* back-pointer to interface */ Added: head/sys/sys/ck.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/ck.h Mon May 21 01:53:23 2018(r333957) @@ -0,0 +1,13 @@ +/* + * $FreeBSD$ + */ +#ifdef _KERNEL +#include +#include +#else +#include +#define CK_STAILQ_HEAD STAILQ_HEAD +#define CK_STAILQ_ENTRY STAILQ_ENTRY +#define CK_LIST_HEAD LIST_HEAD +#define CK_LIST_ENTRY LIST_ENTRY +#endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333956 - head/usr.bin/top
Author: eadler Date: Mon May 21 01:39:26 2018 New Revision: 333956 URL: https://svnweb.freebsd.org/changeset/base/333956 Log: top(1): fix build on arches where size_t != ull Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Mon May 21 01:20:19 2018(r333955) +++ head/usr.bin/top/machine.c Mon May 21 01:39:26 2018(r333956) @@ -993,7 +993,7 @@ format_next_process(caddr_t xhandle, char *(*get_useri state < sizeof(state_abbrev) / sizeof(*state_abbrev)) sprintf(status, "%.6s", state_abbrev[state]); else - sprintf(status, "?%5lu", state); + sprintf(status, "?%5zu", state); 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"
svn commit: r333955 - in head/stand: common ofw/libofw sparc64/loader
Author: marius Date: Mon May 21 01:20:19 2018 New Revision: 333955 URL: https://svnweb.freebsd.org/changeset/base/333955 Log: - Unbreak booting sparc64 kernels after the metadata unification in r329190; sparc64 kernels are always 64-bit but with that revision in place, the loader was treating them as 32-bit ones. - In order to reduce the likelihood of this kind of breakage in the future, #ifdef out md_load() on sparc64 and make md_load_dual() - which is currently local to metadata.c anyway - static. - Make md_getboothowto() - also local to metadata.c - static. - Get rid of the unused DTB pointer on sparc64. Modified: head/stand/common/metadata.c head/stand/ofw/libofw/libofw.h head/stand/sparc64/loader/main.c Modified: head/stand/common/metadata.c == --- head/stand/common/metadata.cMon May 21 01:16:26 2018 (r333954) +++ head/stand/common/metadata.cMon May 21 01:20:19 2018 (r333955) @@ -94,7 +94,7 @@ md_bootserial(void) } #endif -int +static int md_getboothowto(char *kargs) { char *cp; @@ -307,7 +307,7 @@ md_copymodules(vm_offset_t addr, int kern64) * - The kernel environment is copied into kernel space. * - Module metadata are formatted and placed in kernel space. */ -int +static int md_load_dual(char *args, vm_offset_t *modulep, vm_offset_t *dtb, int kern64) { struct preloaded_file *kfp; @@ -460,13 +460,15 @@ md_load_dual(char *args, vm_offset_t *modulep, vm_offs return(0); } +#if !defined(__sparc64__) int md_load(char *args, vm_offset_t *modulep, vm_offset_t *dtb) { return (md_load_dual(args, modulep, dtb, 0)); } +#endif -#if defined(__mips__) || defined(__powerpc__) +#if defined(__mips__) || defined(__powerpc__) || defined(__sparc64__) int md_load64(char *args, vm_offset_t *modulep, vm_offset_t *dtb) { Modified: head/stand/ofw/libofw/libofw.h == --- head/stand/ofw/libofw/libofw.h Mon May 21 01:16:26 2018 (r333954) +++ head/stand/ofw/libofw/libofw.h Mon May 21 01:20:19 2018 (r333955) @@ -62,7 +62,9 @@ struct preloaded_file; struct file_format; /* MD code implementing MI interfaces */ +#if !defined(__sparc64__) vm_offset_t md_load(char *args, vm_offset_t *modulep, vm_offset_t *dtb); +#endif vm_offset_t md_load64(char *args, vm_offset_t *modulep, vm_offset_t *dtb); extern voidreboot(void); Modified: head/stand/sparc64/loader/main.c == --- head/stand/sparc64/loader/main.cMon May 21 01:16:26 2018 (r333954) +++ head/stand/sparc64/loader/main.cMon May 21 01:20:19 2018 (r333955) @@ -339,7 +339,7 @@ static int __elfN(exec)(struct preloaded_file *fp) { struct file_metadata *fmp; - vm_offset_t mdp, dtbp; + vm_offset_t mdp; Elf_Addr entry; Elf_Ehdr *e; int error; @@ -348,7 +348,7 @@ __elfN(exec)(struct preloaded_file *fp) return (EFTYPE); e = (Elf_Ehdr *)>md_data; - if ((error = md_load(fp->f_args, , )) != 0) + if ((error = md_load64(fp->f_args, , NULL)) != 0) return (error); printf("jumping to kernel entry at %#lx.\n", e->e_entry); ___ 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: r333954 - head/usr.bin/top
Author: eadler Date: Mon May 21 01:16:26 2018 New Revision: 333954 URL: https://svnweb.freebsd.org/changeset/base/333954 Log: top(1): pull function declarations and externs into headers Modified: head/usr.bin/top/commands.c head/usr.bin/top/machine.c head/usr.bin/top/top.c head/usr.bin/top/top.h Modified: head/usr.bin/top/commands.c == --- head/usr.bin/top/commands.c Mon May 21 01:06:59 2018(r333953) +++ head/usr.bin/top/commands.c Mon May 21 01:16:26 2018(r333954) @@ -35,11 +35,6 @@ #include "utils.h" #include "machine.h" -extern char *copyright; - -/* imported from screen.c */ -extern int overstrike; - static int err_compar(const void *p1, const void *p2); struct errs/* structure for a system-call error */ Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Mon May 21 01:06:59 2018(r333953) +++ head/usr.bin/top/machine.c Mon May 21 01:16:26 2018(r333954) @@ -43,6 +43,7 @@ #include "top.h" #include "machine.h" +#include "display.h" #include "screen.h" #include "utils.h" #include "layout.h" @@ -52,7 +53,7 @@ #defineUPUNAMELEN 15 extern struct process_select ps; -extern char* printable(char *); +extern struct timeval timeout; static int smpmode; enum displaymodes displaymode; #ifdef TOP_USERNAME_LEN @@ -67,9 +68,6 @@ static int jidlength; static int swaplength; static int cmdlengthdelta; -/* Prototypes for top internals */ -void quit(int); - /* get_process_info passes back a handle. This is what it looks like: */ struct handle { @@ -233,9 +231,6 @@ static int pageshift; /* log base 2 of the pagesize * #define ki_swap(kip) \ ((kip)->ki_swrss > (kip)->ki_rssize ? (kip)->ki_swrss - (kip)->ki_rssize : 0) -/* useful externals */ -long percentages(int cnt, int *out, long *new, long *old, long *diffs); - /* * Sorting orders. The first element is the default. */ @@ -470,7 +465,6 @@ format_header(char *uname_field) static int swappgsin = -1; static int swappgsout = -1; -extern struct timeval timeout; void Modified: head/usr.bin/top/top.c == --- head/usr.bin/top/top.c Mon May 21 01:06:59 2018(r333953) +++ head/usr.bin/top/top.c Mon May 21 01:16:26 2018(r333954) @@ -3,7 +3,6 @@ char *copyright = /* * Top users/processes display for Unix - * Version 3 * * This program may be freely redistributed, * but this entire comment MUST remain intact. @@ -16,23 +15,6 @@ char *copyright = * $FreeBSD$ */ -/* - * See the file "Changes" for information on version-to-version changes. - */ - -/* - * This file contains "main" and other high-level routines. - */ - -/* - * The following preprocessor variables, when defined, are used to - * distinguish between different Unix implementations: - * - * SIGHOLD - use SVR4 sighold function when defined - * SIGRELSE - use SVR4 sigrelse function when defined - * FD_SET - macros FD_SET and FD_ZERO are used when defined - */ - #include #include #include @@ -48,7 +30,6 @@ char *copyright = #include #include -/* includes specific to top */ #include "commands.h" #include "display.h" /* interface to display package */ #include "screen.h"/* interface to screen package */ @@ -70,13 +51,7 @@ char stdoutbuf[Buffersize]; /* build Signal masks */ #define Smask(s) (1 << ((s) - 1)) -/* for getopt: */ -extern int optind; -extern char *optarg; -/* imported from screen.c */ -extern int overstrike; - static int fmt_flags = 0; int pcpu_stats = No; @@ -85,13 +60,10 @@ static sigret_t leave(int); static sigret_t tstop(int); static sigret_t top_winch(int); -volatile sig_atomic_t leaveflag; -volatile sig_atomic_t tstopflag; -volatile sig_atomic_t winchflag; +static volatile sig_atomic_t leaveflag; +static volatile sig_atomic_t tstopflag; +static volatile sig_atomic_t winchflag; -/* internal routines */ -void quit(int); - /* values which need to be accessed by signal handlers */ static int max_topn; /* maximum displayable processes */ @@ -102,7 +74,6 @@ jmp_buf jmp_int; char *username(int); -extern int (*compares[])(const void*, const void*); time_t time(time_t *tloc); caddr_t get_process_info(struct system_info *si, struct process_select *sel, Modified: head/usr.bin/top/top.h == --- head/usr.bin/top/top.h Mon May 21 01:06:59 2018(r333953) +++ head/usr.bin/top/top.h Mon May 21 01:16:26 2018(r333954) @@ -44,9 +44,17 @@ enum displaymodes { DISP_CPU = 0, DISP_IO, DISP_MAX }; extern enum displaymodes displaymode; extern int pcpu_stats; +extern int overstrike; +extern int
Re: svn commit: r333924 - head/sys/fs/nfsclient
I don't understand why you can't install the gcc8 package but here you go: https://people.freebsd.org/~mmacy/gcc8logs/nfs-GENERIC-NODEBUG.log https://people.freebsd.org/~mmacy/gcc8logs/nfs-GENERIC.log On Sun, May 20, 2018 at 5:17 PM, Rick Macklemwrote: > I'm not in a situation where I can use gcc, but if you email me the > list of warnings, I can look at them. > > rick > > > From: Matthew Macy > Sent: Sunday, May 20, 2018 7:16:31 PM > To: Rick Macklem > Cc: src-committ...@freebsd.org; svn-src-...@freebsd.org; > svn-src-head@freebsd.org > Subject: Re: svn commit: r333924 - head/sys/fs/nfsclient > > Actually if you could clean up the NFS code that would be great. It's > _full_ of set but not used warnings. And anyone else reading this if > you could clean up other areas. I've mostly cleaned up kern / net / > netinet / iflib drivers. > > > both > WITHOUT_FORMAT_EXTENSIONS= XCC=/usr/local/bin/gcc8 make -j buildkernel > > and > WITHOUT_FORMAT_EXTENSIONS= XCC=/usr/local/bin/gcc8 make -j > buildkernel KERNCONF=GENERIC-NODEBUG > > Thanks. > > On Sun, May 20, 2018 at 4:09 PM, Matthew Macy wrote: >> gcc8 >> >> On Sun, May 20, 2018 at 15:14 Rick Macklem wrote: >>> >>> Matt Macy wrote: >>> >Author: mmacy >>> >Date: Sun May 20 06:14:12 2018 >>> >New Revision: 333924 >>> >URL: https://svnweb.freebsd.org/changeset/base/333924 >>> > >>> >Log: >>> > nfsclient: warnings cleanups >>> Just wondering what compiler you are using. I haven't seen warnings for >>> these? >>> FYI, for the first two cases, ncookie is always set before it is used. >>> For the third, "rflags" is set but not used. I sometimes leave code like >>> this in >>> the tree since I might need those argument flags later and might not >>> remember >>> how to get them. In this case, similar code in other functions set >>> "rflags" in the >>> same way, so it shouldn't be hard to crib the assignment from there. >>> As such, I don't have a problem with deleting the code. >>> >>> rick >>> ... the commit patch ... >>> Modified: >>> head/sys/fs/nfsclient/nfs_clcomsubs.c >>> head/sys/fs/nfsclient/nfs_clrpcops.c >>> >>> Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c >>> >>> == >>> --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 05:59:42 2018 >>> (r333923) >>> +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 06:14:12 2018 >>> (r333924) >>> @@ -354,7 +354,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu >>> char *uiocp; >>> struct mbuf *mp, *mp2, *firstmp; >>> int xfer, left, mlen; >>> - int uiosiz, clflg, rem; >>> + int uiosiz, clflg; >>> char *tcp; >>> >>> KASSERT(uiop->uio_iovcnt == 1, ("nfsm_uiotombuf: iovcnt != 1")); >>> @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu >>> clflg = 1; >>> else >>> clflg = 0; >>> - rem = NFSM_RNDUP(siz) - siz; >>> if (clflg != 0) >>> NFSMCLGET(mp, M_WAITOK); >>> else >>> >>> Modified: head/sys/fs/nfsclient/nfs_clrpcops.c >>> >>> == >>> --- head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 05:59:42 2018 >>> (r333923) >>> +++ head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 06:14:12 2018 >>> (r333924) >>> @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, >>> nfsuint64 >>> KASSERT(uiop->uio_iovcnt == 1 && >>> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, >>> ("nfs readdirrpc bad uio")); >>> - >>> + ncookie.lval[0] = ncookie.lval[1] = 0; >>> /* >>> * There is no point in reading a lot more than uio_resid, however >>> * adding one additional DIRBLKSIZ makes sense. Since uio_resid >>> @@ -3288,6 +3288,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, >>> nfsui >>> KASSERT(uiop->uio_iovcnt == 1 && >>> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, >>> ("nfs readdirplusrpc bad uio")); >>> + ncookie.lval[0] = ncookie.lval[1] = 0; >>> timespecclear(); >>> *attrflagp = 0; >>> if (eofp != NULL) >>> @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp, >>> ui >>> >>> NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); >>> len = fxdr_unsigned(uint32_t, *tl); >>> + str = NULL; >>> if (len > NFSV4_OPAQUELIMIT) { >>> error = NFSERR_BADXDR; >>> goto nfsmout; >>> @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int >>> namel >>> struct nfsclsession *tsep; >>> nfsattrbit_t attrbits; >>> nfsv4stateid_t stateid; >>> - uint32_t rflags; >>> struct nfsmount *nmp; >>> >>> nmp = VFSTONFS(dvp->v_mount);
svn commit: r333949 - head/usr.bin/top
Author: eadler Date: Mon May 21 00:32:48 2018 New Revision: 333949 URL: https://svnweb.freebsd.org/changeset/base/333949 Log: top(1): build with WARN=2 Modified: head/usr.bin/top/Makefile head/usr.bin/top/machine.c head/usr.bin/top/screen.c Modified: head/usr.bin/top/Makefile == --- head/usr.bin/top/Makefile Mon May 21 00:20:32 2018(r333948) +++ head/usr.bin/top/Makefile Mon May 21 00:32:48 2018(r333949) @@ -7,7 +7,7 @@ SRCS+= sigdesc.h top.local.h CFLAGS+= -I ${.OBJDIR} MAN= top.1 -WARNS?=1 +WARNS?=2 LIBADD=ncursesw m kvm jail Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Mon May 21 00:20:32 2018(r333948) +++ head/usr.bin/top/machine.c Mon May 21 00:32:48 2018(r333949) @@ -872,7 +872,7 @@ get_process_info(struct system_info *si, struct proces total_oublock += p_oublock; total_majflt += p_majflt; total_procs++; - process_states[pp->ki_stat]++; + process_states[(unsigned char)pp->ki_stat]++; if (pp->ki_stat == SZOMB) /* skip zombies */ @@ -1316,7 +1316,7 @@ static int sorted_state[] = { } while (0) #define ORDERKEY_STATE(a, b) do { \ - int diff = sorted_state[(b)->ki_stat] - sorted_state[(a)->ki_stat]; \ + int diff = sorted_state[(unsigned char)(b)->ki_stat] - sorted_state[(unsigned char)(a)->ki_stat]; \ if (diff != 0) \ return (diff > 0 ? 1 : -1); \ } while (0) Modified: head/usr.bin/top/screen.c == --- head/usr.bin/top/screen.c Mon May 21 00:20:32 2018(r333948) +++ head/usr.bin/top/screen.c Mon May 21 00:32:48 2018(r333949) @@ -59,8 +59,6 @@ char *terminal_end; static struct termios old_settings; static struct termios new_settings; static char is_a_terminal = No; -static int old_lword; -static int new_lword; #defineSTDIN 0 #defineSTDOUT 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: r333945 - head/usr.bin/top
On Sun, 20 May 2018, Eitan Adler wrote: Log: top(1): set max username length based on system constant This changes previous behavior of calculating it at startup based on the current max username length. This is done because: - it is in theory possible for the max length to change at run-time (e.g., a new user is added after top starts running) - on machines with many users this delays startup significantly This is sort of backwards. MAXLOGNAME would be harmful if it were actually used for the limit here, but it has never been used for the limit here. First, MAXLOGNAME should never be used. It is an old BSD name for the POSIX limit {LOGIN_NAME_MAX}. LOGIN_NAME_MAX should never be used either. It might be undefined, or possibily -1, to indicate that it can vary. sysconf() should be used to determine {LOGIN_NAME_MAX}. After determining the correct value, you will find that it is always unusable here because it is too large. It might be LONG_MAX to indicate no limit, or it might be 255 which is merely 3 times the terminal width. It used to be 17 in FreeBSD, and is now 33. 17 is about 1/5 of the terminal width, but that is too wide. 33 is grossly too wide. 17 was used for a while, but this was mostly fixed in r146291 in 2005. The log message for r146291 claims to limit the length to 8, but the code is slightly better, but obfuscated. The lower limit is never 8, but is 13 for SMP and 15 for UP. 8 is only the lower limit and is only imposed so that the format doesn't change too often if all user names are short. PR:20799 PR:89762 Reported by: o...@e-gitt.net Reported by: w...@kavalan.csie.nctu.edu.tw Reported on: 2000-08-23 and 2005-11-30 The first one of these is much older than the fix in r146291. Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Sun May 20 22:07:44 2018(r333944) +++ head/usr.bin/top/machine.c Sun May 20 23:19:09 2018(r333945) @@ -340,12 +340,7 @@ machine_init(struct statics *statics, char do_unames) NULL, 0) == 0 && carc_en == 1) carc_enabled = 1; - if (do_unames) { - while ((pw = getpwent()) != NULL) { - if (strlen(pw->pw_name) > namelength) - namelength = strlen(pw->pw_name); - } - } namelength is now initially TOP_USERNAME_LEN if that is defined, else 8. TOP_USERNAME_LEN is now never used as well as rarely configured. The hard-coded 8 is now never used instead of rarely used. The above loop took the maximum of {(initial TOP_USERNAME_LEN or 8), all names in system}. On large systems there is usually at least one use with a verbose name. This makes any reasonably small initial limits have no effect (since they minimums, not maximumns). A minimum limit is also needed for space for "USERNAME" in the header. + namelength = MAXLOGNAME; This is now always 33 in FreeBSD. if (smpmode && namelength > SMPUNAMELEN) namelength = SMPUNAMELEN; else if (namelength > UPUNAMELEN) But 33 is too large. It is much larger than the hard-coded maximum limits, so it is never used, but is reduced to SMPNAMELEN = 13 or UPUNAMELEN = 15. So getting the correct value of about 8 is even harder than before, but changing SMPNAMELEN to 4 works quite well -- "USERNAME" in the header is then reduced to "USER" and space is made available for something useful like the command name. The old code did work for forcing a minimum user name length of (TOP_USERNAME_LEN or 8) and a maximum user name length of (SMPUNAMELEN or UPUNAMELEN). The breakage in this commit is only seen on systems without verbose names, e.g., mine, where the longest name is "operator" (length 8). Then the dynamic maximum is the same as the static maximum (8), so the final length is 8. Now the minimum and maxium are hard-coded (modulo MAXLOGNAME being unusuably large) as 15 or 13, so all systems now waste space like only large systems used to do. The correct method is something like defaulting to 8 but allow overriding this using an environment variable or option. Bruce ___ 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: r333948 - head/usr.bin/top
Author: eadler Date: Mon May 21 00:20:32 2018 New Revision: 333948 URL: https://svnweb.freebsd.org/changeset/base/333948 Log: top(1): add getrusage to SEE also This documents the various columns that top might support. PR: 199637 Submitted by: verma...@interia.pl Modified: head/usr.bin/top/top.1 Modified: head/usr.bin/top/top.1 == --- head/usr.bin/top/top.1 Sun May 20 23:39:08 2018(r333947) +++ head/usr.bin/top/top.1 Mon May 21 00:20:32 2018(r333948) @@ -454,13 +454,13 @@ things can change while .I top is collecting information for an update. The picture it gives is only a close approximation to reality. -.SH "SEE ALSO" +.SH SEE ALSO kill(1), ps(1), stty(1), mem(4), +getrusage(2), renice(8) -.\" $FreeBSD$ .SH "FreeBSD NOTES" .SH DESCRIPTION OF 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: r333924 - head/sys/fs/nfsclient
I'm not in a situation where I can use gcc, but if you email me the list of warnings, I can look at them. rick From: Matthew MacySent: Sunday, May 20, 2018 7:16:31 PM To: Rick Macklem Cc: src-committ...@freebsd.org; svn-src-...@freebsd.org; svn-src-head@freebsd.org Subject: Re: svn commit: r333924 - head/sys/fs/nfsclient Actually if you could clean up the NFS code that would be great. It's _full_ of set but not used warnings. And anyone else reading this if you could clean up other areas. I've mostly cleaned up kern / net / netinet / iflib drivers. both WITHOUT_FORMAT_EXTENSIONS= XCC=/usr/local/bin/gcc8 make -j buildkernel and WITHOUT_FORMAT_EXTENSIONS= XCC=/usr/local/bin/gcc8 make -j buildkernel KERNCONF=GENERIC-NODEBUG Thanks. On Sun, May 20, 2018 at 4:09 PM, Matthew Macy wrote: > gcc8 > > On Sun, May 20, 2018 at 15:14 Rick Macklem wrote: >> >> Matt Macy wrote: >> >Author: mmacy >> >Date: Sun May 20 06:14:12 2018 >> >New Revision: 333924 >> >URL: https://svnweb.freebsd.org/changeset/base/333924 >> > >> >Log: >> > nfsclient: warnings cleanups >> Just wondering what compiler you are using. I haven't seen warnings for >> these? >> FYI, for the first two cases, ncookie is always set before it is used. >> For the third, "rflags" is set but not used. I sometimes leave code like >> this in >> the tree since I might need those argument flags later and might not >> remember >> how to get them. In this case, similar code in other functions set >> "rflags" in the >> same way, so it shouldn't be hard to crib the assignment from there. >> As such, I don't have a problem with deleting the code. >> >> rick >> ... the commit patch ... >> Modified: >> head/sys/fs/nfsclient/nfs_clcomsubs.c >> head/sys/fs/nfsclient/nfs_clrpcops.c >> >> Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c >> >> == >> --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 05:59:42 2018 >> (r333923) >> +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 06:14:12 2018 >> (r333924) >> @@ -354,7 +354,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu >> char *uiocp; >> struct mbuf *mp, *mp2, *firstmp; >> int xfer, left, mlen; >> - int uiosiz, clflg, rem; >> + int uiosiz, clflg; >> char *tcp; >> >> KASSERT(uiop->uio_iovcnt == 1, ("nfsm_uiotombuf: iovcnt != 1")); >> @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu >> clflg = 1; >> else >> clflg = 0; >> - rem = NFSM_RNDUP(siz) - siz; >> if (clflg != 0) >> NFSMCLGET(mp, M_WAITOK); >> else >> >> Modified: head/sys/fs/nfsclient/nfs_clrpcops.c >> >> == >> --- head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 05:59:42 2018 >> (r333923) >> +++ head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 06:14:12 2018 >> (r333924) >> @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, >> nfsuint64 >> KASSERT(uiop->uio_iovcnt == 1 && >> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, >> ("nfs readdirrpc bad uio")); >> - >> + ncookie.lval[0] = ncookie.lval[1] = 0; >> /* >> * There is no point in reading a lot more than uio_resid, however >> * adding one additional DIRBLKSIZ makes sense. Since uio_resid >> @@ -3288,6 +3288,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, >> nfsui >> KASSERT(uiop->uio_iovcnt == 1 && >> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, >> ("nfs readdirplusrpc bad uio")); >> + ncookie.lval[0] = ncookie.lval[1] = 0; >> timespecclear(); >> *attrflagp = 0; >> if (eofp != NULL) >> @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp, >> ui >> >> NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); >> len = fxdr_unsigned(uint32_t, *tl); >> + str = NULL; >> if (len > NFSV4_OPAQUELIMIT) { >> error = NFSERR_BADXDR; >> goto nfsmout; >> @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int >> namel >> struct nfsclsession *tsep; >> nfsattrbit_t attrbits; >> nfsv4stateid_t stateid; >> - uint32_t rflags; >> struct nfsmount *nmp; >> >> nmp = VFSTONFS(dvp->v_mount); >> @@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int >> namel >> stateid.other[0] = *tl++; >> stateid.other[1] = *tl++; >> stateid.other[2] = *tl; >> - rflags = fxdr_unsigned(u_int32_t, *(tl + 6)); >> nfsrv_getattrbits(nd, , NULL, NULL); >> NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); >> deleg
svn commit: r333947 - head/usr.bin/top
Author: eadler Date: Sun May 20 23:39:08 2018 New Revision: 333947 URL: https://svnweb.freebsd.org/changeset/base/333947 Log: top(1): Remove now-unused variable Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Sun May 20 23:37:30 2018(r333946) +++ head/usr.bin/top/machine.c Sun May 20 23:39:08 2018(r333947) @@ -320,7 +320,6 @@ machine_init(struct statics *statics) uint64_t arc_size; boolean_t carc_en; size_t size; - struct passwd *pw; size = sizeof(smpmode); if ((sysctlbyname("machdep.smp_active", , , ___ 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: r333946 - head/usr.bin/top
Author: eadler Date: Sun May 20 23:37:30 2018 New Revision: 333946 URL: https://svnweb.freebsd.org/changeset/base/333946 Log: top(1): pull configuration directly into header files This sets configuration variables directly in the various header files, avoiding the need to have special logic in our Makefile to build the header. Deleted: head/usr.bin/top/top.local.hs head/usr.bin/top/top.xs Modified: head/usr.bin/top/Makefile head/usr.bin/top/top.c head/usr.bin/top/top.h head/usr.bin/top/username.c head/usr.bin/top/username.h Modified: head/usr.bin/top/Makefile == --- head/usr.bin/top/Makefile Sun May 20 23:19:09 2018(r333945) +++ head/usr.bin/top/Makefile Sun May 20 23:37:30 2018(r333946) @@ -16,15 +16,4 @@ SIGNAL_H= ${SRCTOP}/sys/sys/signal.h sigdesc.h: sigconv.awk ${SIGNAL_H} awk -f ${SRCTOP}/usr.bin/top/sigconv.awk < ${SIGNAL_H} > ${.TARGET} -.SUFFIXES: .xs .x .hs .h -.xs.x .hs.h: - @${ECHO} Making ${.TARGET} from ${.IMPSRC} - @sed -e's,%LoadMax%,5.0,g' \ - -e's,%TableSize%,20011,g' \ - -e's,%NominalTopn%,18,g' \ - -e's,%topn%,-1,g' \ - -e's,%delay%,2,g' \ - -e's,%random%,1,g' \ - ${.IMPSRC} > ${.TARGET} - .include Modified: head/usr.bin/top/top.c == --- head/usr.bin/top/top.c Sun May 20 23:19:09 2018(r333945) +++ head/usr.bin/top/top.c Sun May 20 23:37:30 2018(r333946) @@ -251,7 +251,7 @@ char *argv[]; static char tempbuf1[50]; static char tempbuf2[50]; int old_sigmask; /* only used for BSD-style signals */ -int topn = Default_TOPN; +int topn = Infinity; int delay = Default_DELAY; int displays = 0; /* indicates unspecified */ int sel_ret = 0; @@ -268,9 +268,7 @@ char *argv[]; char do_unames = Yes; char interactive = Maybe; char warnings = 0; -#if Default_TOPN == Infinity char topn_specified = No; -#endif char ch; char *iptr; char no_command = 1; @@ -525,12 +523,10 @@ char *argv[]; myname); warnings++; } -#if Default_TOPN == Infinity else { topn_specified = Yes; } -#endif } /* tricky: remember old value of preset_argc & set preset_argc = 0 */ @@ -608,12 +604,8 @@ char *argv[]; * and the default is Infinity, then (and only then) we use * "Nominal_TOPN" instead. */ -#if Default_TOPN == Infinity topn = smart_terminal ? Largest : (topn_specified ? Largest : Nominal_TOPN); -#else - topn = Largest; -#endif } /* set header display accordingly */ Modified: head/usr.bin/top/top.h == --- head/usr.bin/top/top.h Sun May 20 23:19:09 2018(r333945) +++ head/usr.bin/top/top.h Sun May 20 23:37:30 2018(r333946) @@ -10,8 +10,7 @@ #ifndef TOP_H #define TOP_H -/* Current major version number */ -#define VERSION3 +#define Default_DELAY 2 /* Number of lines of header information on the standard screen */ extern int Header_lines; /* 7 */ @@ -48,5 +47,33 @@ extern int pcpu_stats; char* kill_procs(char *); char* renice_procs(char *); + +/* + * The space command forces an immediate update. Sometimes, on loaded + * systems, this update will take a significant period of time (because all + * the output is buffered). So, if the short-term load average is above + * "LoadMax", then top will put the cursor home immediately after the space + * is pressed before the next update is attempted. This serves as a visual + * acknowledgement of the command. + */ +#define LoadMax 5.0 + +/* + * "Nominal_TOPN" is used as the default TOPN when + * the output is a dumb terminal. If we didn't do this, then + * we will get every + * process in the system when running top on a dumb terminal (or redirected + * to a file). Note that Nominal_TOPN is a default: it can still be + * overridden on the command line, even with the value "infinity". + */ +#define Nominal_TOPN 18 + +/* + * If the local system's getpwnam interface uses random access to retrieve + * a record (i.e.: 4.3 systems, Sun "yellow pages"), then defining + * RANDOM_PW will take advantage of that fact. + */ + +#define RANDOM_PW 1 #endif /* TOP_H */ Modified: head/usr.bin/top/username.c == --- head/usr.bin/top/username.c Sun May 20 23:19:09 2018(r333945) +++ head/usr.bin/top/username.c Sun May 20 23:37:30 2018(r333946) @@ -1,6 +1,5 @@ /* * Top users/processes display for Unix - * Version 3 * * This program may be freely redistributed, * but this entire
svn commit: r333945 - head/usr.bin/top
Author: eadler Date: Sun May 20 23:19:09 2018 New Revision: 333945 URL: https://svnweb.freebsd.org/changeset/base/333945 Log: top(1): set max username length based on system constant This changes previous behavior of calculating it at startup based on the current max username length. This is done because: - it is in theory possible for the max length to change at run-time (e.g., a new user is added after top starts running) - on machines with many users this delays startup significantly PR: 20799 PR: 89762 Reported by: o...@e-gitt.net Reported by: w...@kavalan.csie.nctu.edu.tw Reported on: 2000-08-23 and 2005-11-30 Modified: head/usr.bin/top/machine.c head/usr.bin/top/machine.h head/usr.bin/top/top.c head/usr.bin/top/username.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Sun May 20 22:07:44 2018(r333944) +++ head/usr.bin/top/machine.c Sun May 20 23:19:09 2018(r333945) @@ -314,7 +314,7 @@ update_layout(void) } int -machine_init(struct statics *statics, char do_unames) +machine_init(struct statics *statics) { int i, j, empty, pagesize; uint64_t arc_size; @@ -340,12 +340,7 @@ machine_init(struct statics *statics, char do_unames) NULL, 0) == 0 && carc_en == 1) carc_enabled = 1; - if (do_unames) { - while ((pw = getpwent()) != NULL) { - if (strlen(pw->pw_name) > namelength) - namelength = strlen(pw->pw_name); - } - } + namelength = MAXLOGNAME; if (smpmode && namelength > SMPUNAMELEN) namelength = SMPUNAMELEN; else if (namelength > UPUNAMELEN) Modified: head/usr.bin/top/machine.h == --- head/usr.bin/top/machine.h Sun May 20 22:07:44 2018(r333944) +++ head/usr.bin/top/machine.h Sun May 20 23:19:09 2018(r333945) @@ -85,7 +85,7 @@ char *format_next_process(caddr_t handle, char *(*get_ int flags); voidtoggle_pcpustats(void); voidget_system_info(struct system_info *si); -int machine_init(struct statics *statics, char do_unames); +int machine_init(struct statics *statics); int proc_owner(int pid); /* non-int routines typically used by the machine dependent module */ Modified: head/usr.bin/top/top.c == --- head/usr.bin/top/top.c Sun May 20 22:07:44 2018(r333944) +++ head/usr.bin/top/top.c Sun May 20 23:19:09 2018(r333945) @@ -548,7 +548,7 @@ char *argv[]; } /* initialize the kernel memory interface */ -if (machine_init(, do_unames) == -1) +if (machine_init() == -1) { exit(1); } @@ -572,14 +572,6 @@ char *argv[]; exit(1); } } - -#ifdef no_initialization_needed -/* initialize the hashing stuff */ -if (do_unames) -{ - init_hash(); -} -#endif /* initialize termcap */ init_termcap(interactive); Modified: head/usr.bin/top/username.c == --- head/usr.bin/top/username.c Sun May 20 22:07:44 2018(r333944) +++ head/usr.bin/top/username.c Sun May 20 23:19:09 2018(r333945) @@ -60,17 +60,6 @@ struct hash_el { struct hash_el hash_table[Table_size]; -void -init_hash() - -{ -/* - * There used to be some steps we had to take to initialize things. - * We don't need to do that anymore, but we will leave this stub in - * just in case future changes require initialization steps. - */ -} - char *username(uid) int uid; ___ 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: r333924 - head/sys/fs/nfsclient
Actually if you could clean up the NFS code that would be great. It's _full_ of set but not used warnings. And anyone else reading this if you could clean up other areas. I've mostly cleaned up kern / net / netinet / iflib drivers. both WITHOUT_FORMAT_EXTENSIONS= XCC=/usr/local/bin/gcc8 make -j buildkernel and WITHOUT_FORMAT_EXTENSIONS= XCC=/usr/local/bin/gcc8 make -j buildkernel KERNCONF=GENERIC-NODEBUG Thanks. On Sun, May 20, 2018 at 4:09 PM, Matthew Macywrote: > gcc8 > > On Sun, May 20, 2018 at 15:14 Rick Macklem wrote: >> >> Matt Macy wrote: >> >Author: mmacy >> >Date: Sun May 20 06:14:12 2018 >> >New Revision: 333924 >> >URL: https://svnweb.freebsd.org/changeset/base/333924 >> > >> >Log: >> > nfsclient: warnings cleanups >> Just wondering what compiler you are using. I haven't seen warnings for >> these? >> FYI, for the first two cases, ncookie is always set before it is used. >> For the third, "rflags" is set but not used. I sometimes leave code like >> this in >> the tree since I might need those argument flags later and might not >> remember >> how to get them. In this case, similar code in other functions set >> "rflags" in the >> same way, so it shouldn't be hard to crib the assignment from there. >> As such, I don't have a problem with deleting the code. >> >> rick >> ... the commit patch ... >> Modified: >> head/sys/fs/nfsclient/nfs_clcomsubs.c >> head/sys/fs/nfsclient/nfs_clrpcops.c >> >> Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c >> >> == >> --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 05:59:42 2018 >> (r333923) >> +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 06:14:12 2018 >> (r333924) >> @@ -354,7 +354,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu >> char *uiocp; >> struct mbuf *mp, *mp2, *firstmp; >> int xfer, left, mlen; >> - int uiosiz, clflg, rem; >> + int uiosiz, clflg; >> char *tcp; >> >> KASSERT(uiop->uio_iovcnt == 1, ("nfsm_uiotombuf: iovcnt != 1")); >> @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu >> clflg = 1; >> else >> clflg = 0; >> - rem = NFSM_RNDUP(siz) - siz; >> if (clflg != 0) >> NFSMCLGET(mp, M_WAITOK); >> else >> >> Modified: head/sys/fs/nfsclient/nfs_clrpcops.c >> >> == >> --- head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 05:59:42 2018 >> (r333923) >> +++ head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 06:14:12 2018 >> (r333924) >> @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, >> nfsuint64 >> KASSERT(uiop->uio_iovcnt == 1 && >> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, >> ("nfs readdirrpc bad uio")); >> - >> + ncookie.lval[0] = ncookie.lval[1] = 0; >> /* >> * There is no point in reading a lot more than uio_resid, however >> * adding one additional DIRBLKSIZ makes sense. Since uio_resid >> @@ -3288,6 +3288,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, >> nfsui >> KASSERT(uiop->uio_iovcnt == 1 && >> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, >> ("nfs readdirplusrpc bad uio")); >> + ncookie.lval[0] = ncookie.lval[1] = 0; >> timespecclear(); >> *attrflagp = 0; >> if (eofp != NULL) >> @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp, >> ui >> >> NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); >> len = fxdr_unsigned(uint32_t, *tl); >> + str = NULL; >> if (len > NFSV4_OPAQUELIMIT) { >> error = NFSERR_BADXDR; >> goto nfsmout; >> @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int >> namel >> struct nfsclsession *tsep; >> nfsattrbit_t attrbits; >> nfsv4stateid_t stateid; >> - uint32_t rflags; >> struct nfsmount *nmp; >> >> nmp = VFSTONFS(dvp->v_mount); >> @@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int >> namel >> stateid.other[0] = *tl++; >> stateid.other[1] = *tl++; >> stateid.other[2] = *tl; >> - rflags = fxdr_unsigned(u_int32_t, *(tl + 6)); >> nfsrv_getattrbits(nd, , NULL, NULL); >> NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); >> deleg = fxdr_unsigned(int, *tl); >> > ___ 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: r333924 - head/sys/fs/nfsclient
gcc8 On Sun, May 20, 2018 at 15:14 Rick Macklemwrote: > Matt Macy wrote: > >Author: mmacy > >Date: Sun May 20 06:14:12 2018 > >New Revision: 333924 > >URL: https://svnweb.freebsd.org/changeset/base/333924 > > > >Log: > > nfsclient: warnings cleanups > Just wondering what compiler you are using. I haven't seen warnings for > these? > FYI, for the first two cases, ncookie is always set before it is used. > For the third, "rflags" is set but not used. I sometimes leave code like > this in > the tree since I might need those argument flags later and might not > remember > how to get them. In this case, similar code in other functions set > "rflags" in the > same way, so it shouldn't be hard to crib the assignment from there. > As such, I don't have a problem with deleting the code. > > rick > ... the commit patch ... > Modified: > head/sys/fs/nfsclient/nfs_clcomsubs.c > head/sys/fs/nfsclient/nfs_clrpcops.c > > Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c > > == > --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 05:59:42 2018 > (r333923) > +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 06:14:12 2018 > (r333924) > @@ -354,7 +354,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu > char *uiocp; > struct mbuf *mp, *mp2, *firstmp; > int xfer, left, mlen; > - int uiosiz, clflg, rem; > + int uiosiz, clflg; > char *tcp; > > KASSERT(uiop->uio_iovcnt == 1, ("nfsm_uiotombuf: iovcnt != 1")); > @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu > clflg = 1; > else > clflg = 0; > - rem = NFSM_RNDUP(siz) - siz; > if (clflg != 0) > NFSMCLGET(mp, M_WAITOK); > else > > Modified: head/sys/fs/nfsclient/nfs_clrpcops.c > > == > --- head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 05:59:42 2018 > (r333923) > +++ head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 06:14:12 2018 > (r333924) > @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, > nfsuint64 > KASSERT(uiop->uio_iovcnt == 1 && > (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, > ("nfs readdirrpc bad uio")); > - > + ncookie.lval[0] = ncookie.lval[1] = 0; > /* > * There is no point in reading a lot more than uio_resid, however > * adding one additional DIRBLKSIZ makes sense. Since uio_resid > @@ -3288,6 +3288,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, > nfsui > KASSERT(uiop->uio_iovcnt == 1 && > (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, > ("nfs readdirplusrpc bad uio")); > + ncookie.lval[0] = ncookie.lval[1] = 0; > timespecclear(); > *attrflagp = 0; > if (eofp != NULL) > @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp, > ui > > NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); > len = fxdr_unsigned(uint32_t, *tl); > + str = NULL; > if (len > NFSV4_OPAQUELIMIT) { > error = NFSERR_BADXDR; > goto nfsmout; > @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int > namel > struct nfsclsession *tsep; > nfsattrbit_t attrbits; > nfsv4stateid_t stateid; > - uint32_t rflags; > struct nfsmount *nmp; > > nmp = VFSTONFS(dvp->v_mount); > @@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int > namel > stateid.other[0] = *tl++; > stateid.other[1] = *tl++; > stateid.other[2] = *tl; > - rflags = fxdr_unsigned(u_int32_t, *(tl + 6)); > nfsrv_getattrbits(nd, , NULL, NULL); > NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); > deleg = fxdr_unsigned(int, *tl); > > ___ 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: r333944 - head/contrib/file/magic/Magdir
Thank you! --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. Also, this old phone only supports top post. Apologies. Cy Schubertor The need of the many outweighs the greed of the few. --- -Original Message- From: Antoine Brodin Sent: 20/05/2018 15:07 To: src-committ...@freebsd.org; svn-src-...@freebsd.org; svn-src-head@freebsd.org Subject: svn commit: r333944 - head/contrib/file/magic/Magdir Author: antoine Date: Sun May 20 22:07:44 2018 New Revision: 333944 URL: https://svnweb.freebsd.org/changeset/base/333944 Log: Revert last change to file/magic/Magdir/elf, it misidentifies most shared libraries installed from ports as pie executables instead of shared libraries, and consequently breaks ports. Modified: head/contrib/file/magic/Magdir/elf Modified: head/contrib/file/magic/Magdir/elf == --- head/contrib/file/magic/Magdir/elf Sun May 20 21:56:08 2018 (r333943) +++ head/contrib/file/magic/Magdir/elf Sun May 20 22:07:44 2018 (r333944) @@ -48,9 +48,8 @@ !:mime application/x-object >16leshort 2 executable, !:mime application/x-executable ->16leshort 3 ${x?pie executable:shared object} - -!:mime application/x-${x?pie-executable:sharedlib} +>16leshort 3 shared object, +!:mime application/x-sharedlib >16leshort 4 core file !:mime application/x-coredump # Core file detection is not reliable. ___ 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: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests
On 20 May 2018 at 14:27, Kirill Ponomarevwrote: > On 05/20, Antoine Brodin wrote: >> On Sun, May 20, 2018 at 10:30 PM, Antoine Brodin wrote: >> > On Sun, May 20, 2018 at 7:06 AM, Eitan Adler wrote: >> >> Author: eadler >> >> Date: Sun May 20 05:06:42 2018 >> >> New Revision: 333919 >> >> URL: https://svnweb.freebsd.org/changeset/base/333919 >> >> >> >> Log: >> >> MFV: file 5.33 >> >> >> >> Merge the latest file(1) in. >> >> >> >> Relevent Changelog: >> >> - extend the support for ${x?:} expansions for magic descriptions >> >> - add support for ${x?:} in mime types to handle pie binaries. >> >> - add support for negative offsets (offsets from the end of file) >> >> - close the file on error when writing magic >> >> >> >> Relnotes: yes >> > >> > Hi, >> > >> > This breaks the ports tree, please revert and request an exp-run. >> >> At least revert the changes to contrib/file/magic/Magdir/elf > > Eitan, please coordinate your efforts with portmgr first (for > exp-run) before committing such changes. I had no reason to believe this would break ports. Now that is has, my world view has changed, and I'll ask for an exp-run before even minor changes to libmagic. -- 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: r333924 - head/sys/fs/nfsclient
Matt Macy wrote: >Author: mmacy >Date: Sun May 20 06:14:12 2018 >New Revision: 333924 >URL: https://svnweb.freebsd.org/changeset/base/333924 > >Log: > nfsclient: warnings cleanups Just wondering what compiler you are using. I haven't seen warnings for these? FYI, for the first two cases, ncookie is always set before it is used. For the third, "rflags" is set but not used. I sometimes leave code like this in the tree since I might need those argument flags later and might not remember how to get them. In this case, similar code in other functions set "rflags" in the same way, so it shouldn't be hard to crib the assignment from there. As such, I don't have a problem with deleting the code. rick ... the commit patch ... Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c == --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 05:59:42 2018 (r333923) +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 06:14:12 2018 (r333924) @@ -354,7 +354,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu char *uiocp; struct mbuf *mp, *mp2, *firstmp; int xfer, left, mlen; - int uiosiz, clflg, rem; + int uiosiz, clflg; char *tcp; KASSERT(uiop->uio_iovcnt == 1, ("nfsm_uiotombuf: iovcnt != 1")); @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu clflg = 1; else clflg = 0; - rem = NFSM_RNDUP(siz) - siz; if (clflg != 0) NFSMCLGET(mp, M_WAITOK); else Modified: head/sys/fs/nfsclient/nfs_clrpcops.c == --- head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 05:59:42 2018 (r333923) +++ head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 06:14:12 2018 (r333924) @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 KASSERT(uiop->uio_iovcnt == 1 && (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, ("nfs readdirrpc bad uio")); - + ncookie.lval[0] = ncookie.lval[1] = 0; /* * There is no point in reading a lot more than uio_resid, however * adding one additional DIRBLKSIZ makes sense. Since uio_resid @@ -3288,6 +3288,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsui KASSERT(uiop->uio_iovcnt == 1 && (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, ("nfs readdirplusrpc bad uio")); + ncookie.lval[0] = ncookie.lval[1] = 0; timespecclear(); *attrflagp = 0; if (eofp != NULL) @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp, ui NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); len = fxdr_unsigned(uint32_t, *tl); + str = NULL; if (len > NFSV4_OPAQUELIMIT) { error = NFSERR_BADXDR; goto nfsmout; @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namel struct nfsclsession *tsep; nfsattrbit_t attrbits; nfsv4stateid_t stateid; - uint32_t rflags; struct nfsmount *nmp; nmp = VFSTONFS(dvp->v_mount); @@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namel stateid.other[0] = *tl++; stateid.other[1] = *tl++; stateid.other[2] = *tl; - rflags = fxdr_unsigned(u_int32_t, *(tl + 6)); nfsrv_getattrbits(nd, , NULL, NULL); NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); deleg = fxdr_unsigned(int, *tl); ___ 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: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests
On Sun, May 20, 2018 at 10:39 PM, Antoine Brodinwrote: > On Sun, May 20, 2018 at 10:30 PM, Antoine Brodin wrote: >> On Sun, May 20, 2018 at 7:06 AM, Eitan Adler wrote: >>> Author: eadler >>> Date: Sun May 20 05:06:42 2018 >>> New Revision: 333919 >>> URL: https://svnweb.freebsd.org/changeset/base/333919 >>> >>> Log: >>> MFV: file 5.33 >>> >>> Merge the latest file(1) in. >>> >>> Relevent Changelog: >>> - extend the support for ${x?:} expansions for magic descriptions >>> - add support for ${x?:} in mime types to handle pie binaries. >>> - add support for negative offsets (offsets from the end of file) >>> - close the file on error when writing magic >>> >>> Relnotes: yes >> >> Hi, >> >> This breaks the ports tree, please revert and request an exp-run. > > At least revert the changes to contrib/file/magic/Magdir/elf The problematic part was reverted in r333944 Antoine ___ 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: r333943 - head/lib/libc/sys
[ Charset UTF-8 unsupported, converting... ] > Author: sevan (doc committer) > Date: Sun May 20 21:56:08 2018 > New Revision: 333943 > URL: https://svnweb.freebsd.org/changeset/base/333943 > > Log: > Use St macro for specifying C standards. > > Reported by:rgrimes@ Thank you. > Modified: > head/lib/libc/sys/recv.2 > > Modified: head/lib/libc/sys/recv.2 > == > --- head/lib/libc/sys/recv.2 Sun May 20 21:37:34 2018(r333942) > +++ head/lib/libc/sys/recv.2 Sun May 20 21:56:08 2018(r333943) > @@ -198,7 +198,11 @@ If no data is available, > .Va errno > is set to > .Er EAGAIN . > -This flag is not available in strict ANSI or C99 compilation mode. > +This flag is not available in > +.St -ansiC > +or > +.St -isoC-99 > +compilation mode. > The > .Dv MSG_WAITFORONE > flag sets MSG_DONTWAIT after the first message has been received. > > -- Rod Grimes rgri...@freebsd.org ___ 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: r333944 - head/contrib/file/magic/Magdir
Author: antoine Date: Sun May 20 22:07:44 2018 New Revision: 333944 URL: https://svnweb.freebsd.org/changeset/base/333944 Log: Revert last change to file/magic/Magdir/elf, it misidentifies most shared libraries installed from ports as pie executables instead of shared libraries, and consequently breaks ports. Modified: head/contrib/file/magic/Magdir/elf Modified: head/contrib/file/magic/Magdir/elf == --- head/contrib/file/magic/Magdir/elf Sun May 20 21:56:08 2018 (r333943) +++ head/contrib/file/magic/Magdir/elf Sun May 20 22:07:44 2018 (r333944) @@ -48,9 +48,8 @@ !:mime application/x-object >16leshort 2 executable, !:mime application/x-executable ->16leshort 3 ${x?pie executable:shared object} - -!:mime application/x-${x?pie-executable:sharedlib} +>16leshort 3 shared object, +!:mime application/x-sharedlib >16leshort 4 core file !:mime application/x-coredump # Core file detection is not reliable. ___ 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: r333943 - head/lib/libc/sys
Author: sevan (doc committer) Date: Sun May 20 21:56:08 2018 New Revision: 333943 URL: https://svnweb.freebsd.org/changeset/base/333943 Log: Use St macro for specifying C standards. Reported by: rgrimes@ Modified: head/lib/libc/sys/recv.2 Modified: head/lib/libc/sys/recv.2 == --- head/lib/libc/sys/recv.2Sun May 20 21:37:34 2018(r333942) +++ head/lib/libc/sys/recv.2Sun May 20 21:56:08 2018(r333943) @@ -198,7 +198,11 @@ If no data is available, .Va errno is set to .Er EAGAIN . -This flag is not available in strict ANSI or C99 compilation mode. +This flag is not available in +.St -ansiC +or +.St -isoC-99 +compilation mode. The .Dv MSG_WAITFORONE flag sets MSG_DONTWAIT after the first message has been received. ___ 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: r333937 - head/lib/libc/sys
[ Charset UTF-8 unsupported, converting... ] > Author: sevan (doc committer) > Date: Sun May 20 20:28:17 2018 > New Revision: 333937 > URL: https://svnweb.freebsd.org/changeset/base/333937 > > Log: > Fix a typo and remove an unneeded Tn macro as highlighted by mandoc -Tlint. > > Submitted by: Mateusz Piotrowski > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D15204 > > Modified: > head/lib/libc/sys/recv.2 > > Modified: head/lib/libc/sys/recv.2 > == > --- head/lib/libc/sys/recv.2 Sun May 20 20:08:21 2018(r333936) > +++ head/lib/libc/sys/recv.2 Sun May 20 20:28:17 2018(r333937) > @@ -28,7 +28,7 @@ > .\" @(#)recv.2 8.3 (Berkeley) 2/21/94 > .\" $FreeBSD$ > .\" > -.Dd October 3, 2017 > +.Dd May 20, 2018 > .Dt RECV 2 > .Os > .Sh NAME > @@ -198,9 +198,7 @@ If no data is available, > .Va errno > is set to > .Er EAGAIN . > -This flag is not available in strict > -.Tn ANSI > -or C99 compilation mode. > +This flag is not available in strict ANSI or C99 compilation mode. This could be re-written to use .St > The > .Dv MSG_WAITFORONE > flag sets MSG_DONTWAIT after the first message has been received. > @@ -298,7 +296,7 @@ system call uses the > .Fa mmsghdr > structure, defined as follows in the > .In sys/socket.h > -header : > +header: > .Bd -literal > struct mmsghdr { > struct msghdrmsg_hdr; /* message header */ > > -- Rod Grimes rgri...@freebsd.org ___ 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: r333942 - head/sys/kern
Author: mmacy Date: Sun May 20 21:37:34 2018 New Revision: 333942 URL: https://svnweb.freebsd.org/changeset/base/333942 Log: AF_UNIX gc unused label ...sigh Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c == --- head/sys/kern/uipc_usrreq.c Sun May 20 21:20:26 2018(r333941) +++ head/sys/kern/uipc_usrreq.c Sun May 20 21:37:34 2018(r333942) @@ -1615,7 +1615,6 @@ unp_connectat(int fd, struct socket *so, struct sockad sotounpcb(so2) == unp2, ("%s: unp2 %p so2 %p", __func__, unp2, so2)); error = unp_connect2(so, so2, PRU_CONNECT); -bad3: UNP_PCB_UNLOCK(unp2); UNP_PCB_UNLOCK(unp); bad2: ___ 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: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests
On Sun, May 20, 2018 at 10:44:54PM +0200, Stefan Esser wrote: > Am 20.05.18 um 22:30 schrieb Antoine Brodin: > > On Sun, May 20, 2018 at 7:06 AM, Eitan Adlerwrote: > >> Author: eadler > >> Date: Sun May 20 05:06:42 2018 > >> New Revision: 333919 > >> URL: https://svnweb.freebsd.org/changeset/base/333919 > >> > >> Log: > >> MFV: file 5.33 > >> > >> Merge the latest file(1) in. > >> > >> Relevent Changelog: > >> - extend the support for ${x?:} expansions for magic descriptions > >> - add support for ${x?:} in mime types to handle pie binaries. > >> - add support for negative offsets (offsets from the end of file) > >> - close the file on error when writing magic > >> > >> Relnotes: yes > > > > Hi, > > > > This breaks the ports tree, please revert and request an exp-run. > > This seems to be the cause of LIB_DEPENDS not being correctly checked. > > I have fixed this locally with the following patch to find-lib.sh: > > Index: Mk/Scripts/find-lib.sh > === > --- Mk/Scripts/find-lib.sh(Revision 470484) > +++ Mk/Scripts/find-lib.sh(Arbeitskopie) > @@ -27,7 +27,9 @@ > for libdir in ${dirs} ; do > test -f ${libdir}/${lib} || continue > libfile=${libdir}/${lib} > - [ `file -b -L --mime-type ${libfile}` = "application/x-sharedlib" ] || > continue > - echo $libfile > - break > + case `file -b -L --mime-type ${libfile}` in > + application/x-pie-executable|application/x-sharedlib) > + echo $libfile > + break ;; > + esac > done > > This works for amd64 at least ... seems to work for me as well (also amd64). -- Larry Rosenman https://people.FreeBSD.org/~ler/ Phone: +1 214-642-9640 E-Mail: l...@freebsd.org US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106 signature.asc Description: PGP signature
Re: svn commit: r333925 - head/sys/teken
Hi Jean-Sébastien, 2018-05-20 16:21 GMT+02:00 Jean-Sébastien Pédron: > Modified: head/sys/teken/sequences > == > --- head/sys/teken/sequencesSun May 20 06:14:12 2018(r333924) > +++ head/sys/teken/sequencesSun May 20 14:21:20 2018(r333925) > @@ -48,6 +48,7 @@ CUF Cursor Forward ^[ [ a > n > CUPCursor Position ^[ [ H n n > CUPCursor Position ^[ [ f n n > CUUCursor Up ^[ [ A n > +CS Cursor style^[ [ SP q r > DA1Primary Device Attributes ^[ [ c r > DA2Secondary Device Attributes ^[ [ > cr > DC Delete character^[ [ P n So far I've been trying to be quite consistent in the naming here, using the exact phrasing that is used elsewhere. Could you please use "DECSCUSR" and "Set Cursor Style" here, just like on this page? https://vt100.net/docs/vt510-rm/DECSCUSR.html Thanks, -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands ___ 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: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests
On 05/20, Antoine Brodin wrote: > On Sun, May 20, 2018 at 10:30 PM, Antoine Brodinwrote: > > On Sun, May 20, 2018 at 7:06 AM, Eitan Adler wrote: > >> Author: eadler > >> Date: Sun May 20 05:06:42 2018 > >> New Revision: 333919 > >> URL: https://svnweb.freebsd.org/changeset/base/333919 > >> > >> Log: > >> MFV: file 5.33 > >> > >> Merge the latest file(1) in. > >> > >> Relevent Changelog: > >> - extend the support for ${x?:} expansions for magic descriptions > >> - add support for ${x?:} in mime types to handle pie binaries. > >> - add support for negative offsets (offsets from the end of file) > >> - close the file on error when writing magic > >> > >> Relnotes: yes > > > > Hi, > > > > This breaks the ports tree, please revert and request an exp-run. > > At least revert the changes to contrib/file/magic/Magdir/elf Eitan, please coordinate your efforts with portmgr first (for exp-run) before committing such changes. signature.asc Description: PGP signature
svn commit: r333941 - head/sys/kern
Author: mmacy Date: Sun May 20 21:20:26 2018 New Revision: 333941 URL: https://svnweb.freebsd.org/changeset/base/333941 Log: AF_UNIX: Don't unlock unp/unp2 if they're not locked Reported by: mjg Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c == --- head/sys/kern/uipc_usrreq.c Sun May 20 21:07:29 2018(r333940) +++ head/sys/kern/uipc_usrreq.c Sun May 20 21:20:26 2018(r333941) @@ -1568,7 +1568,7 @@ unp_connectat(int fd, struct socket *so, struct sockad so2 = NULL; if (so2 == NULL) { error = ECONNREFUSED; - goto bad3; + goto bad2; } unp3 = sotounpcb(so2); unp_pcb_lock2(unp2, unp3); ___ 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: r333939 - head/sys/netinet6
Author: mmacy Date: Sun May 20 20:48:26 2018 New Revision: 333939 URL: https://svnweb.freebsd.org/changeset/base/333939 Log: make sure vnet is set when freeing Reported by: pho Modified: head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet6/in6_mcast.c == --- head/sys/netinet6/in6_mcast.c Sun May 20 20:34:15 2018 (r333938) +++ head/sys/netinet6/in6_mcast.c Sun May 20 20:48:26 2018 (r333939) @@ -1626,6 +1626,8 @@ inp_gcmoptions(epoch_context_t ctx) { struct ip6_moptions *imo; struct in6_mfilter *imf; + struct in6_multi *inm; + struct ifnet *ifp; size_t idx, nmships; imo = __containerof(ctx, struct ip6_moptions, imo6_epoch_ctx); @@ -1635,8 +1637,13 @@ inp_gcmoptions(epoch_context_t ctx) imf = imo->im6o_mfilters ? >im6o_mfilters[idx] : NULL; if (imf) im6f_leave(imf); - /* XXX this will thrash the lock(s) */ - (void)in6_leavegroup(imo->im6o_membership[idx], imf); + inm = imo->im6o_membership[idx]; + ifp = inm->in6m_ifp; + if (ifp) + CURVNET_SET(ifp->if_vnet); + (void)in6_leavegroup(inm, imf); + if (ifp) + CURVNET_RESTORE(); if (imf) im6f_purge(imf); } ___ 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: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests
Am 20.05.18 um 22:30 schrieb Antoine Brodin: > On Sun, May 20, 2018 at 7:06 AM, Eitan Adlerwrote: >> Author: eadler >> Date: Sun May 20 05:06:42 2018 >> New Revision: 333919 >> URL: https://svnweb.freebsd.org/changeset/base/333919 >> >> Log: >> MFV: file 5.33 >> >> Merge the latest file(1) in. >> >> Relevent Changelog: >> - extend the support for ${x?:} expansions for magic descriptions >> - add support for ${x?:} in mime types to handle pie binaries. >> - add support for negative offsets (offsets from the end of file) >> - close the file on error when writing magic >> >> Relnotes: yes > > Hi, > > This breaks the ports tree, please revert and request an exp-run. This seems to be the cause of LIB_DEPENDS not being correctly checked. I have fixed this locally with the following patch to find-lib.sh: Index: Mk/Scripts/find-lib.sh === --- Mk/Scripts/find-lib.sh (Revision 470484) +++ Mk/Scripts/find-lib.sh (Arbeitskopie) @@ -27,7 +27,9 @@ for libdir in ${dirs} ; do test -f ${libdir}/${lib} || continue libfile=${libdir}/${lib} - [ `file -b -L --mime-type ${libfile}` = "application/x-sharedlib" ] || continue - echo $libfile - break + case `file -b -L --mime-type ${libfile}` in + application/x-pie-executable|application/x-sharedlib) + echo $libfile + break ;; + esac done This works for amd64 at least ... Regards, STefan ___ 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: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests
On Sun, May 20, 2018 at 10:30 PM, Antoine Brodinwrote: > On Sun, May 20, 2018 at 7:06 AM, Eitan Adler wrote: >> Author: eadler >> Date: Sun May 20 05:06:42 2018 >> New Revision: 333919 >> URL: https://svnweb.freebsd.org/changeset/base/333919 >> >> Log: >> MFV: file 5.33 >> >> Merge the latest file(1) in. >> >> Relevent Changelog: >> - extend the support for ${x?:} expansions for magic descriptions >> - add support for ${x?:} in mime types to handle pie binaries. >> - add support for negative offsets (offsets from the end of file) >> - close the file on error when writing magic >> >> Relnotes: yes > > Hi, > > This breaks the ports tree, please revert and request an exp-run. At least revert the changes to contrib/file/magic/Magdir/elf Antoine ___ 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: r333938 - head/sys/dev/hwpmc
Author: mmacy Date: Sun May 20 20:34:15 2018 New Revision: 333938 URL: https://svnweb.freebsd.org/changeset/base/333938 Log: pmc: detach free_gtask on unload Reported by: pho Modified: head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_mod.c == --- head/sys/dev/hwpmc/hwpmc_mod.c Sun May 20 20:28:17 2018 (r333937) +++ head/sys/dev/hwpmc/hwpmc_mod.c Sun May 20 20:34:15 2018 (r333938) @@ -5557,6 +5557,7 @@ pmc_cleanup(void) mtx_pool_destroy(_mtxpool); mtx_destroy(_processhash_mtx); + taskqgroup_config_gtask_deinit(_gtask); if (pmc_processhash) { #ifdef HWPMC_DEBUG struct pmc_process *pp; ___ 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: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests
On Sun, May 20, 2018 at 7:06 AM, Eitan Adlerwrote: > Author: eadler > Date: Sun May 20 05:06:42 2018 > New Revision: 333919 > URL: https://svnweb.freebsd.org/changeset/base/333919 > > Log: > MFV: file 5.33 > > Merge the latest file(1) in. > > Relevent Changelog: > - extend the support for ${x?:} expansions for magic descriptions > - add support for ${x?:} in mime types to handle pie binaries. > - add support for negative offsets (offsets from the end of file) > - close the file on error when writing magic > > Relnotes: yes Hi, This breaks the ports tree, please revert and request an exp-run. Cheers, Antoine (with hat: portmgr) ___ 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: r333937 - head/lib/libc/sys
Author: sevan (doc committer) Date: Sun May 20 20:28:17 2018 New Revision: 333937 URL: https://svnweb.freebsd.org/changeset/base/333937 Log: Fix a typo and remove an unneeded Tn macro as highlighted by mandoc -Tlint. Submitted by: Mateusz Piotrowski MFC after:1 week Differential Revision:https://reviews.freebsd.org/D15204 Modified: head/lib/libc/sys/recv.2 Modified: head/lib/libc/sys/recv.2 == --- head/lib/libc/sys/recv.2Sun May 20 20:08:21 2018(r333936) +++ head/lib/libc/sys/recv.2Sun May 20 20:28:17 2018(r333937) @@ -28,7 +28,7 @@ .\" @(#)recv.2 8.3 (Berkeley) 2/21/94 .\" $FreeBSD$ .\" -.Dd October 3, 2017 +.Dd May 20, 2018 .Dt RECV 2 .Os .Sh NAME @@ -198,9 +198,7 @@ If no data is available, .Va errno is set to .Er EAGAIN . -This flag is not available in strict -.Tn ANSI -or C99 compilation mode. +This flag is not available in strict ANSI or C99 compilation mode. The .Dv MSG_WAITFORONE flag sets MSG_DONTWAIT after the first message has been received. @@ -298,7 +296,7 @@ system call uses the .Fa mmsghdr structure, defined as follows in the .In sys/socket.h -header : +header: .Bd -literal struct mmsghdr { struct msghdrmsg_hdr; /* message header */ ___ 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: r333936 - head/sys/netinet
Author: mmacy Date: Sun May 20 20:08:21 2018 New Revision: 333936 URL: https://svnweb.freebsd.org/changeset/base/333936 Log: in(s)_moptions: free before tearing down inpcb Modified: head/sys/netinet/in_pcb.c Modified: head/sys/netinet/in_pcb.c == --- head/sys/netinet/in_pcb.c Sun May 20 19:35:24 2018(r333935) +++ head/sys/netinet/in_pcb.c Sun May 20 20:08:21 2018(r333936) @@ -1341,33 +1341,16 @@ in_pcbfree_deferred(epoch_context_t ctx) { struct inpcb *inp; struct inpcbinfo *pcbinfo; -#ifdef INET6 - struct ip6_moptions *im6o = NULL; -#endif -#ifdef INET - struct ip_moptions *imo = NULL; -#endif inp = __containerof(ctx, struct inpcb, inp_epoch_ctx); pcbinfo = inp->inp_pcbinfo; INP_WLOCK(inp); -#ifdef INET - imo = inp->inp_moptions; - inp->inp_moptions = NULL; -#endif /* XXXRW: Do as much as possible here. */ #if defined(IPSEC) || defined(IPSEC_SUPPORT) if (inp->inp_sp != NULL) ipsec_delete_pcbpolicy(inp); #endif -#ifdef INET6 - if (inp->inp_vflag & INP_IPV6PROTO) { - ip6_freepcbopts(inp->in6p_outputopts); - im6o = inp->in6p_moptions; - inp->in6p_moptions = NULL; - } -#endif if (inp->inp_options) (void)m_free(inp->inp_options); @@ -1379,12 +1362,6 @@ in_pcbfree_deferred(epoch_context_t ctx) #endif if (!in_pcbrele_wlocked(inp)) INP_WUNLOCK(inp); -#ifdef INET6 - ip6_freemoptions(im6o); -#endif -#ifdef INET - inp_freemoptions(imo); -#endif } /* @@ -1399,6 +1376,12 @@ in_pcbfree_deferred(epoch_context_t ctx) void in_pcbfree(struct inpcb *inp) { +#ifdef INET6 + struct ip6_moptions *im6o = NULL; +#endif +#ifdef INET + struct ip_moptions *imo = NULL; +#endif struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); @@ -1417,6 +1400,19 @@ in_pcbfree(struct inpcb *inp) } #endif INP_WLOCK_ASSERT(inp); +#ifdef INET + imo = inp->inp_moptions; + inp->inp_moptions = NULL; + inp_freemoptions(imo); +#endif +#ifdef INET6 + if (inp->inp_vflag & INP_IPV6PROTO) { + ip6_freepcbopts(inp->in6p_outputopts); + im6o = inp->in6p_moptions; + inp->in6p_moptions = NULL; + ip6_freemoptions(im6o); + } +#endif /* Remove first from list */ INP_LIST_WLOCK(pcbinfo); inp->inp_gencnt = ++pcbinfo->ipi_gencnt; ___ 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: r333935 - head/sys/dev/hwpmc
Author: mmacy Date: Sun May 20 19:35:24 2018 New Revision: 333935 URL: https://svnweb.freebsd.org/changeset/base/333935 Log: pmc: avoid potential race on shutdown Clear shutdown flag first, conservatively allow 5ms for all hardclock consumers to see flag before drainining Modified: head/sys/dev/hwpmc/hwpmc_logging.c Modified: head/sys/dev/hwpmc/hwpmc_logging.c == --- head/sys/dev/hwpmc/hwpmc_logging.c Sun May 20 18:26:09 2018 (r333934) +++ head/sys/dev/hwpmc/hwpmc_logging.c Sun May 20 19:35:24 2018 (r333935) @@ -872,18 +872,20 @@ pmclog_close(struct pmc_owner *po) pmclog_process_closelog(po); mtx_lock(_kthread_mtx); - /* +* Initiate shutdown: no new data queued, +* thread will close file on last block. +*/ + po->po_flags |= PMC_PO_SHUTDOWN; + /* give time for all to see */ + DELAY(50); + + /* * Schedule the current buffer. */ pmclog_schedule_all(po); wakeup_one(po); - /* -* Initiate shutdown: no new data queued, -* thread will close file on last block. -*/ - po->po_flags |= PMC_PO_SHUTDOWN; mtx_unlock(_kthread_mtx); 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"
Re: svn commit: r333929 - head/usr.bin/top
On 20 May 2018 at 11:33, Yuri Pankovwrote: > Eitan Adler wrote: >> >> Author: eadler >> Date: Sun May 20 17:59:59 2018 >> New Revision: 333929 >> URL: https://svnweb.freebsd.org/changeset/base/333929 >> >> Log: >>top(1): Make lack of "percent" information explicit >> When count is 1, no delta information can be produced. Make this >>explicit. >> PR: 195717 >>Submitted by:fernape >> >> Modified: >>head/usr.bin/top/top.1 >> >> Modified: head/usr.bin/top/top.1 >> >> == >> --- head/usr.bin/top/top.1 Sun May 20 17:58:22 2018(r333928) >> +++ head/usr.bin/top/top.1 Sun May 20 17:59:59 2018(r333929) >> @@ -162,7 +162,10 @@ screen. This option allows the user to select the >> num >> wants to see before >> .I top >> automatically exits. For intelligent terminals, no upper limit >> -is set. The default is 1 for dumb terminals. >> +is set. The default is 1 for dumb terminals. Please, note that for > > > Really minor nit: rest of the man page seems to use double space between > sentences (or just start the sentence from new line to have the proper > auto-spacing). I'm probably going to do a larger-scale formatting pass over the man page. I'll also look it over for anything that is no longer true. Thanks for the comment though! -- 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: r333929 - head/usr.bin/top
Eitan Adler wrote: Author: eadler Date: Sun May 20 17:59:59 2018 New Revision: 333929 URL: https://svnweb.freebsd.org/changeset/base/333929 Log: top(1): Make lack of "percent" information explicit When count is 1, no delta information can be produced. Make this explicit. PR: 195717 Submitted by:fernape Modified: head/usr.bin/top/top.1 Modified: head/usr.bin/top/top.1 == --- head/usr.bin/top/top.1 Sun May 20 17:58:22 2018(r333928) +++ head/usr.bin/top/top.1 Sun May 20 17:59:59 2018(r333929) @@ -162,7 +162,10 @@ screen. This option allows the user to select the num wants to see before .I top automatically exits. For intelligent terminals, no upper limit -is set. The default is 1 for dumb terminals. +is set. The default is 1 for dumb terminals. Please, note that for Really minor nit: rest of the man page seems to use double space between sentences (or just start the sentence from new line to have the proper auto-spacing). ___ 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: r333934 - head/sys/powerpc/pseries
Author: nwhitehorn Date: Sun May 20 18:26:09 2018 New Revision: 333934 URL: https://svnweb.freebsd.org/changeset/base/333934 Log: Fix build with PSERIES but not POWERNV defined. Modified: head/sys/powerpc/pseries/xics.c Modified: head/sys/powerpc/pseries/xics.c == --- head/sys/powerpc/pseries/xics.c Sun May 20 18:18:56 2018 (r333933) +++ head/sys/powerpc/pseries/xics.c Sun May 20 18:26:09 2018 (r333934) @@ -139,7 +139,9 @@ static driver_t xics_driver = { 0 }; +#ifdef POWERNV static uint32_t cpu_xirr[MAXCPU]; +#endif static devclass_t xicp_devclass; static devclass_t xics_devclass; ___ 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: r333933 - head/share/misc
Author: eadler Date: Sun May 20 18:18:56 2018 New Revision: 333933 URL: https://svnweb.freebsd.org/changeset/base/333933 Log: bsd-family-tree: announce DragonFly 5.2.1 See http://lists.dragonflybsd.org/pipermail/commits/2018-May/672214.html Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Sun May 20 18:11:58 2018 (r333932) +++ head/share/misc/bsd-family-tree Sun May 20 18:18:56 2018 (r333933) @@ -370,6 +370,8 @@ FreeBSD 5.2 | | | | | | | | OpenBSD 6.3 | | | | | | | DragonFly 5.2.0 | | | | v | | + | | | | | | DragonFly 5.2.1 + | | | | v | | | v | | | | || | | | FreeBSD 12 -current | NetBSD -current OpenBSD -currentDragonFly -current @@ -743,6 +745,7 @@ NetBSD 7.1.12017-12-22 [NBD] NetBSD 7.1.2 2018-03-15 [NBD] OpenBSD 6.32018-04-02 [OBD] DragonFly 5.2.02018-04-10 [DFB] +DragonFly 5.2.12018-05-20 [DFB] 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: r333932 - head/usr.bin/top
Author: eadler Date: Sun May 20 18:11:58 2018 New Revision: 333932 URL: https://svnweb.freebsd.org/changeset/base/333932 Log: top(1): unconditionally assume we are on FreeBSD (more unifdef) Now that we're our own upstream, remove useless ifdefs. Modified: head/usr.bin/top/screen.c Modified: head/usr.bin/top/screen.c == --- head/usr.bin/top/screen.c Sun May 20 18:03:40 2018(r333931) +++ head/usr.bin/top/screen.c Sun May 20 18:11:58 2018(r333932) @@ -24,27 +24,8 @@ #include #include -#ifdef CBREAK -# include -# define SGTTY -#else -# ifdef TCGETA -# define TERMIO -# include -# else # define TERMIOS # include -# endif -#endif -#if defined(TERMIO) || defined(TERMIOS) -# ifndef TAB3 -# ifdef OXTABS -# define TAB3 OXTABS -# else -# define TAB3 0 -# endif -# endif -#endif #include #include #include "screen.h" @@ -75,23 +56,11 @@ char *end_standout; char *terminal_init; char *terminal_end; -#ifdef SGTTY -static struct sgttyb old_settings; -static struct sgttyb new_settings; -#endif -#ifdef TERMIO -static struct termio old_settings; -static struct termio new_settings; -#endif -#ifdef TERMIOS static struct termios old_settings; static struct termios new_settings; -#endif static char is_a_terminal = No; -#ifdef TOStop static int old_lword; static int new_lword; -#endif #defineSTDIN 0 #defineSTDOUT 1 @@ -217,24 +186,10 @@ int interactive; get_screensize(); /* if stdout is not a terminal, pretend we are a dumb terminal */ -#ifdef SGTTY -if (ioctl(STDOUT, TIOCGETP, _settings) == -1) -{ - smart_terminal = No; -} -#endif -#ifdef TERMIO -if (ioctl(STDOUT, TCGETA, _settings) == -1) -{ - smart_terminal = No; -} -#endif -#ifdef TERMIOS if (tcgetattr(STDOUT, _settings) == -1) { smart_terminal = No; } -#endif } void @@ -242,61 +197,6 @@ init_screen() { /* get the old settings for safe keeping */ -#ifdef SGTTY -if (ioctl(STDOUT, TIOCGETP, _settings) != -1) -{ - /* copy the settings so we can modify them */ - new_settings = old_settings; - - /* turn on CBREAK and turn off character echo and tab expansion */ - new_settings.sg_flags |= CBREAK; - new_settings.sg_flags &= ~(ECHO|XTABS); - (void) ioctl(STDOUT, TIOCSETP, _settings); - - /* remember the erase and kill characters */ - ch_erase = old_settings.sg_erase; - ch_kill = old_settings.sg_kill; - -#ifdef TOStop - /* get the local mode word */ - (void) ioctl(STDOUT, TIOCLGET, _lword); - - /* modify it */ - new_lword = old_lword | LTOSTOP; - (void) ioctl(STDOUT, TIOCLSET, _lword); -#endif - /* remember that it really is a terminal */ - is_a_terminal = Yes; - - /* send the termcap initialization string */ - putcap(terminal_init); -} -#endif -#ifdef TERMIO -if (ioctl(STDOUT, TCGETA, _settings) != -1) -{ - /* copy the settings so we can modify them */ - new_settings = old_settings; - - /* turn off ICANON, character echo and tab expansion */ - new_settings.c_lflag &= ~(ICANON|ECHO); - new_settings.c_oflag &= ~(TAB3); - new_settings.c_cc[VMIN] = 1; - new_settings.c_cc[VTIME] = 0; - (void) ioctl(STDOUT, TCSETA, _settings); - - /* remember the erase and kill characters */ - ch_erase = old_settings.c_cc[VERASE]; - ch_kill = old_settings.c_cc[VKILL]; - - /* remember that it really is a terminal */ - is_a_terminal = Yes; - - /* send the termcap initialization string */ - putcap(terminal_init); -} -#endif -#ifdef TERMIOS if (tcgetattr(STDOUT, _settings) != -1) { /* copy the settings so we can modify them */ @@ -319,7 +219,6 @@ init_screen() /* send the termcap initialization string */ putcap(terminal_init); } -#endif if (!is_a_terminal) { @@ -344,18 +243,7 @@ end_screen() /* if we have settings to reset, then do so */ if (is_a_terminal) { -#ifdef SGTTY - (void) ioctl(STDOUT, TIOCSETP, _settings); -#ifdef TOStop - (void) ioctl(STDOUT, TIOCLSET, _lword); -#endif -#endif -#ifdef TERMIO - (void) ioctl(STDOUT, TCSETA, _settings); -#endif -#ifdef TERMIOS (void) tcsetattr(STDOUT, TCSADRAIN, _settings); -#endif } } @@ -366,18 +254,7 @@ reinit_screen() /* install our settings if it is a terminal */ if (is_a_terminal) { -#ifdef SGTTY - (void) ioctl(STDOUT, TIOCSETP, _settings); -#ifdef TOStop - (void) ioctl(STDOUT, TIOCLSET, _lword); -#endif -#endif -#ifdef TERMIO - (void) ioctl(STDOUT, TCSETA, _settings); -#endif -#ifdef TERMIOS (void) tcsetattr(STDOUT, TCSADRAIN, _settings); -#endif } /* send init string */ @@ -392,7 +269,6 @@ get_screensize() { -#ifdef TIOCGWINSZ struct
svn commit: r333931 - head/usr.bin/top
Author: eadler Date: Sun May 20 18:03:40 2018 New Revision: 333931 URL: https://svnweb.freebsd.org/changeset/base/333931 Log: Retry revert I had a local modification before my revert. Try reverting one more time. Replaced: head/usr.bin/top/top.local.hs - copied unchanged from r333927, head/usr.bin/top/top.local.hs head/usr.bin/top/top.xs - copied unchanged from r333927, head/usr.bin/top/top.xs Modified: head/usr.bin/top/screen.c Modified: head/usr.bin/top/screen.c == --- head/usr.bin/top/screen.c Sun May 20 18:02:40 2018(r333930) +++ head/usr.bin/top/screen.c Sun May 20 18:03:40 2018(r333931) @@ -36,6 +36,7 @@ # include # endif #endif +#if defined(TERMIO) || defined(TERMIOS) # ifndef TAB3 # ifdef OXTABS # define TAB3 OXTABS @@ -43,6 +44,7 @@ # define TAB3 0 # endif # endif +#endif #include #include #include "screen.h" @@ -73,12 +75,18 @@ char *end_standout; char *terminal_init; char *terminal_end; +#ifdef SGTTY static struct sgttyb old_settings; static struct sgttyb new_settings; +#endif +#ifdef TERMIO static struct termio old_settings; static struct termio new_settings; +#endif +#ifdef TERMIOS static struct termios old_settings; static struct termios new_settings; +#endif static char is_a_terminal = No; #ifdef TOStop static int old_lword; @@ -209,18 +217,24 @@ int interactive; get_screensize(); /* if stdout is not a terminal, pretend we are a dumb terminal */ +#ifdef SGTTY if (ioctl(STDOUT, TIOCGETP, _settings) == -1) { smart_terminal = No; } +#endif +#ifdef TERMIO if (ioctl(STDOUT, TCGETA, _settings) == -1) { smart_terminal = No; } +#endif +#ifdef TERMIOS if (tcgetattr(STDOUT, _settings) == -1) { smart_terminal = No; } +#endif } void @@ -228,6 +242,7 @@ init_screen() { /* get the old settings for safe keeping */ +#ifdef SGTTY if (ioctl(STDOUT, TIOCGETP, _settings) != -1) { /* copy the settings so we can modify them */ @@ -256,6 +271,8 @@ init_screen() /* send the termcap initialization string */ putcap(terminal_init); } +#endif +#ifdef TERMIO if (ioctl(STDOUT, TCGETA, _settings) != -1) { /* copy the settings so we can modify them */ @@ -278,6 +295,8 @@ init_screen() /* send the termcap initialization string */ putcap(terminal_init); } +#endif +#ifdef TERMIOS if (tcgetattr(STDOUT, _settings) != -1) { /* copy the settings so we can modify them */ @@ -300,6 +319,7 @@ init_screen() /* send the termcap initialization string */ putcap(terminal_init); } +#endif if (!is_a_terminal) { @@ -324,12 +344,18 @@ end_screen() /* if we have settings to reset, then do so */ if (is_a_terminal) { +#ifdef SGTTY (void) ioctl(STDOUT, TIOCSETP, _settings); #ifdef TOStop (void) ioctl(STDOUT, TIOCLSET, _lword); #endif +#endif +#ifdef TERMIO (void) ioctl(STDOUT, TCSETA, _settings); +#endif +#ifdef TERMIOS (void) tcsetattr(STDOUT, TCSADRAIN, _settings); +#endif } } @@ -340,12 +366,18 @@ reinit_screen() /* install our settings if it is a terminal */ if (is_a_terminal) { +#ifdef SGTTY (void) ioctl(STDOUT, TIOCSETP, _settings); #ifdef TOStop (void) ioctl(STDOUT, TIOCLSET, _lword); #endif +#endif +#ifdef TERMIO (void) ioctl(STDOUT, TCSETA, _settings); +#endif +#ifdef TERMIOS (void) tcsetattr(STDOUT, TCSADRAIN, _settings); +#endif } /* send init string */ @@ -360,6 +392,7 @@ get_screensize() { +#ifdef TIOCGWINSZ struct winsize ws; @@ -375,6 +408,25 @@ get_screensize() } } +#else +#ifdef TIOCGSIZE + +struct ttysize ts; + +if (ioctl (1, TIOCGSIZE, ) != -1) +{ + if (ts.ts_lines != 0) + { + screen_length = ts.ts_lines; + } + if (ts.ts_cols != 0) + { + screen_width = ts.ts_cols - 1; + } +} + +#endif /* TIOCGSIZE */ +#endif /* TIOCGWINSZ */ (void) strncpy(lower_left, tgoto(cursor_motion, 0, screen_length - 1), sizeof(lower_left) - 1); Copied: head/usr.bin/top/top.local.hs (from r333927, head/usr.bin/top/top.local.hs) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/top/top.local.hs Sun May 20 18:03:40 2018 (r333931, copy of r333927, head/usr.bin/top/top.local.hs) @@ -0,0 +1,68 @@ +/* + * Top - a top users display for Berkeley Unix + * + * Definitions for things that might vary between installations. + */ + +/* + * The space command forces an immediate update. Sometimes, on loaded + * systems, this update will take a significant period of time (because all + * the output is buffered). So, if the
svn commit: r333930 - head/usr.bin/top
Author: eadler Date: Sun May 20 18:02:40 2018 New Revision: 333930 URL: https://svnweb.freebsd.org/changeset/base/333930 Log: revert r333928 I had missed a file when testing this, and it does not build. Will try again. Added: head/usr.bin/top/top.local.hs - copied unchanged from r333927, head/usr.bin/top/top.local.hs head/usr.bin/top/top.xs - copied unchanged from r333927, head/usr.bin/top/top.xs Modified: head/usr.bin/top/Makefile head/usr.bin/top/screen.c Modified: head/usr.bin/top/Makefile == --- head/usr.bin/top/Makefile Sun May 20 17:59:59 2018(r333929) +++ head/usr.bin/top/Makefile Sun May 20 18:02:40 2018(r333930) @@ -16,4 +16,15 @@ SIGNAL_H= ${SRCTOP}/sys/sys/signal.h sigdesc.h: sigconv.awk ${SIGNAL_H} awk -f ${SRCTOP}/usr.bin/top/sigconv.awk < ${SIGNAL_H} > ${.TARGET} +.SUFFIXES: .xs .x .hs .h +.xs.x .hs.h: + @${ECHO} Making ${.TARGET} from ${.IMPSRC} + @sed -e's,%LoadMax%,5.0,g' \ + -e's,%TableSize%,20011,g' \ + -e's,%NominalTopn%,18,g' \ + -e's,%topn%,-1,g' \ + -e's,%delay%,2,g' \ + -e's,%random%,1,g' \ + ${.IMPSRC} > ${.TARGET} + .include Modified: head/usr.bin/top/screen.c == --- head/usr.bin/top/screen.c Sun May 20 17:59:59 2018(r333929) +++ head/usr.bin/top/screen.c Sun May 20 18:02:40 2018(r333930) @@ -36,7 +36,6 @@ # include # endif #endif -#if defined(TERMIO) || defined(TERMIOS) # ifndef TAB3 # ifdef OXTABS # define TAB3 OXTABS @@ -44,7 +43,6 @@ # define TAB3 0 # endif # endif -#endif #include #include #include "screen.h" @@ -75,18 +73,12 @@ char *end_standout; char *terminal_init; char *terminal_end; -#ifdef SGTTY static struct sgttyb old_settings; static struct sgttyb new_settings; -#endif -#ifdef TERMIO static struct termio old_settings; static struct termio new_settings; -#endif -#ifdef TERMIOS static struct termios old_settings; static struct termios new_settings; -#endif static char is_a_terminal = No; #ifdef TOStop static int old_lword; @@ -217,24 +209,18 @@ int interactive; get_screensize(); /* if stdout is not a terminal, pretend we are a dumb terminal */ -#ifdef SGTTY if (ioctl(STDOUT, TIOCGETP, _settings) == -1) { smart_terminal = No; } -#endif -#ifdef TERMIO if (ioctl(STDOUT, TCGETA, _settings) == -1) { smart_terminal = No; } -#endif -#ifdef TERMIOS if (tcgetattr(STDOUT, _settings) == -1) { smart_terminal = No; } -#endif } void @@ -242,7 +228,6 @@ init_screen() { /* get the old settings for safe keeping */ -#ifdef SGTTY if (ioctl(STDOUT, TIOCGETP, _settings) != -1) { /* copy the settings so we can modify them */ @@ -271,8 +256,6 @@ init_screen() /* send the termcap initialization string */ putcap(terminal_init); } -#endif -#ifdef TERMIO if (ioctl(STDOUT, TCGETA, _settings) != -1) { /* copy the settings so we can modify them */ @@ -295,8 +278,6 @@ init_screen() /* send the termcap initialization string */ putcap(terminal_init); } -#endif -#ifdef TERMIOS if (tcgetattr(STDOUT, _settings) != -1) { /* copy the settings so we can modify them */ @@ -319,7 +300,6 @@ init_screen() /* send the termcap initialization string */ putcap(terminal_init); } -#endif if (!is_a_terminal) { @@ -344,18 +324,12 @@ end_screen() /* if we have settings to reset, then do so */ if (is_a_terminal) { -#ifdef SGTTY (void) ioctl(STDOUT, TIOCSETP, _settings); #ifdef TOStop (void) ioctl(STDOUT, TIOCLSET, _lword); #endif -#endif -#ifdef TERMIO (void) ioctl(STDOUT, TCSETA, _settings); -#endif -#ifdef TERMIOS (void) tcsetattr(STDOUT, TCSADRAIN, _settings); -#endif } } @@ -366,18 +340,12 @@ reinit_screen() /* install our settings if it is a terminal */ if (is_a_terminal) { -#ifdef SGTTY (void) ioctl(STDOUT, TIOCSETP, _settings); #ifdef TOStop (void) ioctl(STDOUT, TIOCLSET, _lword); #endif -#endif -#ifdef TERMIO (void) ioctl(STDOUT, TCSETA, _settings); -#endif -#ifdef TERMIOS (void) tcsetattr(STDOUT, TCSADRAIN, _settings); -#endif } /* send init string */ @@ -392,7 +360,6 @@ get_screensize() { -#ifdef TIOCGWINSZ struct winsize ws; @@ -408,25 +375,6 @@ get_screensize() } } -#else -#ifdef TIOCGSIZE - -struct ttysize ts; - -if (ioctl (1, TIOCGSIZE, ) != -1) -{ - if (ts.ts_lines != 0) - { - screen_length = ts.ts_lines; - } - if (ts.ts_cols != 0) - { - screen_width = ts.ts_cols - 1; - } -} - -#endif /* TIOCGSIZE */ -#endif /* TIOCGWINSZ */ (void) strncpy(lower_left,
svn commit: r333929 - head/usr.bin/top
Author: eadler Date: Sun May 20 17:59:59 2018 New Revision: 333929 URL: https://svnweb.freebsd.org/changeset/base/333929 Log: top(1): Make lack of "percent" information explicit When count is 1, no delta information can be produced. Make this explicit. PR: 195717 Submitted by: fernape Modified: head/usr.bin/top/top.1 Modified: head/usr.bin/top/top.1 == --- head/usr.bin/top/top.1 Sun May 20 17:58:22 2018(r333928) +++ head/usr.bin/top/top.1 Sun May 20 17:59:59 2018(r333929) @@ -162,7 +162,10 @@ screen. This option allows the user to select the num wants to see before .I top automatically exits. For intelligent terminals, no upper limit -is set. The default is 1 for dumb terminals. +is set. The default is 1 for dumb terminals. Please, note that for +.I count += 1 +no information is available about the percentage of time spent by the CPU in every state. .TP .BI \-s time Set the delay between screen updates to ___ 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: r333928 - head/usr.bin/top
Author: eadler Date: Sun May 20 17:58:22 2018 New Revision: 333928 URL: https://svnweb.freebsd.org/changeset/base/333928 Log: top(1): remove 'xs' and 'xh' source files Now that we're our own upstream these files buy us nothing. Deleted: head/usr.bin/top/top.local.hs head/usr.bin/top/top.xs Modified: head/usr.bin/top/Makefile Modified: head/usr.bin/top/Makefile == --- head/usr.bin/top/Makefile Sun May 20 17:25:52 2018(r333927) +++ head/usr.bin/top/Makefile Sun May 20 17:58:22 2018(r333928) @@ -16,15 +16,4 @@ SIGNAL_H= ${SRCTOP}/sys/sys/signal.h sigdesc.h: sigconv.awk ${SIGNAL_H} awk -f ${SRCTOP}/usr.bin/top/sigconv.awk < ${SIGNAL_H} > ${.TARGET} -.SUFFIXES: .xs .x .hs .h -.xs.x .hs.h: - @${ECHO} Making ${.TARGET} from ${.IMPSRC} - @sed -e's,%LoadMax%,5.0,g' \ - -e's,%TableSize%,20011,g' \ - -e's,%NominalTopn%,18,g' \ - -e's,%topn%,-1,g' \ - -e's,%delay%,2,g' \ - -e's,%random%,1,g' \ - ${.IMPSRC} > ${.TARGET} - .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: r333927 - in head/bin/sh: . tests/expansion
Author: jilles Date: Sun May 20 17:25:52 2018 New Revision: 333927 URL: https://svnweb.freebsd.org/changeset/base/333927 Log: sh: Allow unquoted newlines in word in ${param+word} etc. POSIX requires accepting unquoted newlines in word in parameter expansions like ${param+word}, ${param#word}, although the Bourne shell did not support it, it is not commonly used and might make it harder to find a missing closing brace. It was also strange that something like foo="${bar# }" was rejected. Reported by: Martijn Dekker via Robert Elz Added: head/bin/sh/tests/expansion/plus-minus9.0 (contents, props changed) head/bin/sh/tests/expansion/trim10.0 (contents, props changed) head/bin/sh/tests/expansion/trim11.0 (contents, props changed) Modified: head/bin/sh/parser.c head/bin/sh/tests/expansion/Makefile Modified: head/bin/sh/parser.c == --- head/bin/sh/parser.cSun May 20 16:03:21 2018(r333926) +++ head/bin/sh/parser.cSun May 20 17:25:52 2018(r333927) @@ -1434,7 +1434,8 @@ readtoken1(int firstc, char const *initialsyntax, cons switch(synentry) { case CNL: /* '\n' */ - if (state[level].syntax == BASESYNTAX) + if (level == 0 && + state[level].syntax == BASESYNTAX) goto endword; /* exit outer loop */ USTPUTC(c, out); plinno++; Modified: head/bin/sh/tests/expansion/Makefile == --- head/bin/sh/tests/expansion/MakefileSun May 20 16:03:21 2018 (r333926) +++ head/bin/sh/tests/expansion/MakefileSun May 20 17:25:52 2018 (r333927) @@ -84,6 +84,7 @@ ${PACKAGE}FILES+= plus-minus5.0 ${PACKAGE}FILES+= plus-minus6.0 ${PACKAGE}FILES+= plus-minus7.0 ${PACKAGE}FILES+= plus-minus8.0 +${PACKAGE}FILES+= plus-minus9.0 ${PACKAGE}FILES+= question1.0 ${PACKAGE}FILES+= readonly1.0 ${PACKAGE}FILES+= redir1.0 @@ -101,5 +102,7 @@ ${PACKAGE}FILES+= trim6.0 ${PACKAGE}FILES+= trim7.0 ${PACKAGE}FILES+= trim8.0 ${PACKAGE}FILES+= trim9.0 +${PACKAGE}FILES+= trim10.0 +${PACKAGE}FILES+= trim11.0 .include Added: head/bin/sh/tests/expansion/plus-minus9.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/expansion/plus-minus9.0 Sun May 20 17:25:52 2018 (r333927) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +a=1 +b=${a+ +} +n=' +' +[ "$b" = "$n" ] Added: head/bin/sh/tests/expansion/trim10.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/expansion/trim10.0Sun May 20 17:25:52 2018 (r333927) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +a='z +' +b=${a% +} +[ "$b" = z ] Added: head/bin/sh/tests/expansion/trim11.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/expansion/trim11.0Sun May 20 17:25:52 2018 (r333927) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +a='z +' +b="${a% +}" +[ "$b" = z ] ___ 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: r333872 - head/cddl/contrib/opensolaris/tools/ctf/cvt
On Sun, May 20, 2018 at 10:59:20AM +, Alexey Dokuchaev wrote: > On Sat, May 19, 2018 at 03:44:37PM -0400, Mark Johnston wrote: > > ... > > I don't really think it's important. The main consideration is the > > toolchain. We use illumos as an upstream, which is pretty inactive at > > this point. Joyent's illumos fork has put a lot of work into the CTF > > toolchain, and OpenBSD has made some progress towards an ISC-licensed > > ctfconvert utility. I'd like to import the latter, since the permissive > > license means that we can use it in DDB. It requires more work because > > of some missing functionality, though. > > > > At some point I think we'd like to pursue one of these two upstreams, > > Quick reality check question: why aren't *we* (FreeBSD) upstream, since > Sun was killed by Oracle and we're more alive than illumos and OpenBSD? Most of the non-trivial commits to the CTF toolchain in the past several years were done by me, and they were just bug fixes. AFAIK no one is actively working on improving the CTF toolchain in FreeBSD. The Joyent fork has lots of improvements and cleanups that make the code easier to maintain and more useful (for instance, librarifying ctfmerge(1)), and OpenBSD's ctfconv(1) replaces both ctfconvert(1) and ctfmerge(1), and is simpler. My point was merely that anyone seeking to overhaul the CTF toolchain in FreeBSD should consider rebasing on one of these two potential upstreams. ___ 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: r333922 - head/lib/libmagic
In message
Re: svn commit: r333922 - head/lib/libmagic
On 19 May 2018 at 22:59, Cy Schubertwrote: > Author: cy > Date: Sun May 20 05:59:35 2018 > New Revision: 333922 > URL: https://svnweb.freebsd.org/changeset/base/333922 > > Log: > Fix build post r333919. Thanks! I had tested the build of file(1) but not libmagic as i had separately installed it. Sorry the breakage. -- 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: r333925 - head/sys/teken
Author: dumbbell Date: Sun May 20 14:21:20 2018 New Revision: 333925 URL: https://svnweb.freebsd.org/changeset/base/333925 Log: teken, vt(4): Parse the "Cursor style" escape sequence The escape sequence (e.g. `^[[2 q`) was unsupported before and the letter `q` was displayed as a typed character. The sequence is used by Neovim for instance. Now, it is properly parsed. However, it is ignored, so it won't change the cursor style. Because the escape sequence contains a space character, the `gensequences` script had to be modified to support that. In the `sequences` file, a space is represented as the string `SP`. Modified: head/sys/teken/gensequences head/sys/teken/sequences head/sys/teken/teken_subr.h Modified: head/sys/teken/gensequences == --- head/sys/teken/gensequences Sun May 20 06:14:12 2018(r333924) +++ head/sys/teken/gensequences Sun May 20 14:21:20 2018(r333925) @@ -35,10 +35,19 @@ function die(msg) { function cchar(str) { if (str == "^[") return "\\x1B"; + if (str == "SP") + return " "; return str; } +function csequence(str) { + if (str == "SP") + return " "; + + return str; +} + BEGIN { FS = "\t+" @@ -57,7 +66,7 @@ while (getline > 0) { prefix = ""; l_prefix_name[""] = "teken_state_init"; for (i = 1; i < nsequences; i++) { - n = prefix sequence[i]; + n = prefix csequence(sequence[i]); l_prefix_parent[n] = prefix; l_prefix_suffix[n] = sequence[i]; if (!l_prefix_name[n]) Modified: head/sys/teken/sequences == --- head/sys/teken/sequencesSun May 20 06:14:12 2018(r333924) +++ head/sys/teken/sequencesSun May 20 14:21:20 2018(r333925) @@ -48,6 +48,7 @@ CUF Cursor Forward ^[ [ a n CUPCursor Position ^[ [ H n n CUPCursor Position ^[ [ f n n CUUCursor Up ^[ [ A n +CS Cursor style^[ [ SP q r DA1Primary Device Attributes ^[ [ c r DA2Secondary Device Attributes ^[ [ > cr DC Delete character^[ [ P n Modified: head/sys/teken/teken_subr.h == --- head/sys/teken/teken_subr.h Sun May 20 06:14:12 2018(r333924) +++ head/sys/teken/teken_subr.h Sun May 20 14:21:20 2018(r333925) @@ -372,6 +372,25 @@ teken_subr_cursor_up(teken_t *t, unsigned int nrows) } static void +teken_subr_cursor_style(teken_t *t, unsigned int style) +{ + + /* TODO */ + + /* +* CSI Ps SP q +* Set cursor style (DECSCUSR), VT520. +* Ps = 0 -> blinking block. +* Ps = 1 -> blinking block (default). +* Ps = 2 -> steady block. +* Ps = 3 -> blinking underline. +* Ps = 4 -> steady underline. +* Ps = 5 -> blinking bar (xterm). +* Ps = 6 -> steady bar (xterm). +*/ +} + +static void teken_subr_delete_character(const teken_t *t, unsigned int ncols) { teken_rect_t tr; ___ 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: r333872 - head/cddl/contrib/opensolaris/tools/ctf/cvt
On Sat, May 19, 2018 at 03:44:37PM -0400, Mark Johnston wrote: > ... > I don't really think it's important. The main consideration is the > toolchain. We use illumos as an upstream, which is pretty inactive at > this point. Joyent's illumos fork has put a lot of work into the CTF > toolchain, and OpenBSD has made some progress towards an ISC-licensed > ctfconvert utility. I'd like to import the latter, since the permissive > license means that we can use it in DDB. It requires more work because > of some missing functionality, though. > > At some point I think we'd like to pursue one of these two upstreams, Quick reality check question: why aren't *we* (FreeBSD) upstream, since Sun was killed by Oracle and we're more alive than illumos and OpenBSD? ./danfe ___ 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: r333921 - head/sys/kern
Author: mmacy Date: Sun May 20 05:50:53 2018 New Revision: 333921 URL: https://svnweb.freebsd.org/changeset/base/333921 Log: AF_UNIX: fix LOR introduced by the locking rewrite Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c == --- head/sys/kern/uipc_usrreq.c Sun May 20 05:13:12 2018(r333920) +++ head/sys/kern/uipc_usrreq.c Sun May 20 05:50:53 2018(r333921) @@ -1559,7 +1559,6 @@ unp_connectat(int fd, struct socket *so, struct sockad error = EPROTOTYPE; goto bad2; } - unp_pcb_lock2(unp, unp2); if (so->so_proto->pr_flags & PR_CONNREQUIRED) { if (so2->so_options & SO_ACCEPTCONN) { CURVNET_SET(so2->so_vnet); @@ -1572,9 +1571,7 @@ unp_connectat(int fd, struct socket *so, struct sockad goto bad3; } unp3 = sotounpcb(so2); - UNP_PCB_UNLOCK(unp); - unp_pcb_owned_lock2(unp2, unp3, freed); - MPASS(!freed); + unp_pcb_lock2(unp2, unp3); if (unp2->unp_addr != NULL) { bcopy(unp2->unp_addr, sa, unp2->unp_addr->sun_len); unp3->unp_addr = (struct sockaddr_un *) sa; @@ -1602,12 +1599,17 @@ unp_connectat(int fd, struct socket *so, struct sockad UNP_PCB_UNLOCK(unp2); unp2 = unp3; unp_pcb_owned_lock2(unp2, unp, freed); - MPASS(!freed); + if (__predict_false(freed)) { + UNP_PCB_UNLOCK(unp2); + error = ECONNREFUSED; + goto bad2; + } #ifdef MAC mac_socketpeer_set_from_socket(so, so2); mac_socketpeer_set_from_socket(so2, so); #endif - } + } else + unp_pcb_lock2(unp, unp2); KASSERT(unp2 != NULL && so2 != NULL && unp2->unp_socket == so2 && sotounpcb(so2) == unp2, ___ 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: r333924 - head/sys/fs/nfsclient
Author: mmacy Date: Sun May 20 06:14:12 2018 New Revision: 333924 URL: https://svnweb.freebsd.org/changeset/base/333924 Log: nfsclient: warnings cleanups Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c == --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 05:59:42 2018 (r333923) +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 06:14:12 2018 (r333924) @@ -354,7 +354,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu char *uiocp; struct mbuf *mp, *mp2, *firstmp; int xfer, left, mlen; - int uiosiz, clflg, rem; + int uiosiz, clflg; char *tcp; KASSERT(uiop->uio_iovcnt == 1, ("nfsm_uiotombuf: iovcnt != 1")); @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu clflg = 1; else clflg = 0; - rem = NFSM_RNDUP(siz) - siz; if (clflg != 0) NFSMCLGET(mp, M_WAITOK); else Modified: head/sys/fs/nfsclient/nfs_clrpcops.c == --- head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 05:59:42 2018 (r333923) +++ head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 06:14:12 2018 (r333924) @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 KASSERT(uiop->uio_iovcnt == 1 && (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, ("nfs readdirrpc bad uio")); - + ncookie.lval[0] = ncookie.lval[1] = 0; /* * There is no point in reading a lot more than uio_resid, however * adding one additional DIRBLKSIZ makes sense. Since uio_resid @@ -3288,6 +3288,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsui KASSERT(uiop->uio_iovcnt == 1 && (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, ("nfs readdirplusrpc bad uio")); + ncookie.lval[0] = ncookie.lval[1] = 0; timespecclear(); *attrflagp = 0; if (eofp != NULL) @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp, ui NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); len = fxdr_unsigned(uint32_t, *tl); + str = NULL; if (len > NFSV4_OPAQUELIMIT) { error = NFSERR_BADXDR; goto nfsmout; @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namel struct nfsclsession *tsep; nfsattrbit_t attrbits; nfsv4stateid_t stateid; - uint32_t rflags; struct nfsmount *nmp; nmp = VFSTONFS(dvp->v_mount); @@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namel stateid.other[0] = *tl++; stateid.other[1] = *tl++; stateid.other[2] = *tl; - rflags = fxdr_unsigned(u_int32_t, *(tl + 6)); nfsrv_getattrbits(nd, , NULL, NULL); NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); deleg = fxdr_unsigned(int, *tl); ___ 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: r333923 - head/lib/libmagic
Author: cy Date: Sun May 20 05:59:42 2018 New Revision: 333923 URL: https://svnweb.freebsd.org/changeset/base/333923 Log: Style fixup: A non-functional commit to make adjustment to an aesthetically unpleasing long line. Modified: head/lib/libmagic/Makefile Modified: head/lib/libmagic/Makefile == --- head/lib/libmagic/Makefile Sun May 20 05:59:35 2018(r333922) +++ head/lib/libmagic/Makefile Sun May 20 05:59:42 2018(r333923) @@ -13,8 +13,8 @@ LIBADD= z .endif MAN= libmagic.3 magic.5 -SRCS= apprentice.c apptype.c ascmagic.c buffer.c cdf.c cdf_time.c compress.c \ - der.c encoding.c fsmagic.c funcs.c \ +SRCS= apprentice.c apptype.c ascmagic.c buffer.c cdf.c cdf_time.c \ + compress.c der.c encoding.c fsmagic.c funcs.c \ is_tar.c magic.c print.c readcdf.c readelf.c seccomp.c softmagic.c INCS= magic.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"
svn commit: r333920 - in head/sys: kern sys
Author: mmacy Date: Sun May 20 05:13:12 2018 New Revision: 333920 URL: https://svnweb.freebsd.org/changeset/base/333920 Log: Add additional preinitialized cap_rights Modified: head/sys/kern/subr_capability.c head/sys/kern/vfs_syscalls.c head/sys/sys/capsicum.h Modified: head/sys/kern/subr_capability.c == --- head/sys/kern/subr_capability.c Sun May 20 05:06:42 2018 (r333919) +++ head/sys/kern/subr_capability.c Sun May 20 05:13:12 2018 (r333920) @@ -55,31 +55,47 @@ __FBSDID("$FreeBSD$"); #defineassert(exp) KASSERT((exp), ("%s:%u", __func__, __LINE__)) __read_mostly cap_rights_t cap_accept_rights; __read_mostly cap_rights_t cap_bind_rights; +__read_mostly cap_rights_t cap_chflags_rights; __read_mostly cap_rights_t cap_connect_rights; __read_mostly cap_rights_t cap_event_rights; __read_mostly cap_rights_t cap_fchdir_rights; +__read_mostly cap_rights_t cap_fchflags_rights; +__read_mostly cap_rights_t cap_fchmod_rights; +__read_mostly cap_rights_t cap_fchown_rights; __read_mostly cap_rights_t cap_fcntl_rights; __read_mostly cap_rights_t cap_fexecve_rights; __read_mostly cap_rights_t cap_flock_rights; __read_mostly cap_rights_t cap_fpathconf_rights; __read_mostly cap_rights_t cap_fstat_rights; +__read_mostly cap_rights_t cap_fstatfs_rights; +__read_mostly cap_rights_t cap_fsync_rights; __read_mostly cap_rights_t cap_ftruncate_rights; +__read_mostly cap_rights_t cap_futimes_rights; __read_mostly cap_rights_t cap_getpeername_rights; __read_mostly cap_rights_t cap_getsockopt_rights; __read_mostly cap_rights_t cap_getsockname_rights; __read_mostly cap_rights_t cap_ioctl_rights; __read_mostly cap_rights_t cap_listen_rights; +__read_mostly cap_rights_t cap_linkat_source_rights; +__read_mostly cap_rights_t cap_linkat_target_rights; __read_mostly cap_rights_t cap_mmap_rights; -__read_mostly cap_rights_t cap_fsync_rights; +__read_mostly cap_rights_t cap_mkdirat_rights; +__read_mostly cap_rights_t cap_mkfifoat_rights; +__read_mostly cap_rights_t cap_mknodat_rights; __read_mostly cap_rights_t cap_pdgetpid_rights; __read_mostly cap_rights_t cap_pdkill_rights; __read_mostly cap_rights_t cap_pread_rights; __read_mostly cap_rights_t cap_pwrite_rights; __read_mostly cap_rights_t cap_read_rights; __read_mostly cap_rights_t cap_recv_rights; +__read_mostly cap_rights_t cap_renameat_source_rights; +__read_mostly cap_rights_t cap_renameat_target_rights; +__read_mostly cap_rights_t cap_seek_rights; __read_mostly cap_rights_t cap_send_rights; __read_mostly cap_rights_t cap_setsockopt_rights; __read_mostly cap_rights_t cap_shutdown_rights; +__read_mostly cap_rights_t cap_symlinkat_rights; +__read_mostly cap_rights_t cap_unlinkat_rights; __read_mostly cap_rights_t cap_write_rights; __read_mostly cap_rights_t cap_no_rights; @@ -91,18 +107,28 @@ __cap_rights_sysinit1(void *arg) cap_rights_init(_connect_rights, CAP_CONNECT); cap_rights_init(_event_rights, CAP_EVENT); cap_rights_init(_fchdir_rights, CAP_FCHDIR); + cap_rights_init(_fchflags_rights, CAP_FCHFLAGS); + cap_rights_init(_fchmod_rights, CAP_FCHMOD); + cap_rights_init(_fchown_rights, CAP_FCHOWN); cap_rights_init(_fcntl_rights, CAP_FCNTL); cap_rights_init(_fexecve_rights, CAP_FEXECVE); cap_rights_init(_flock_rights, CAP_FLOCK); cap_rights_init(_fpathconf_rights, CAP_FPATHCONF); cap_rights_init(_fstat_rights, CAP_FSTAT); + cap_rights_init(_fstatfs_rights, CAP_FSTATFS); cap_rights_init(_fsync_rights, CAP_FSYNC); cap_rights_init(_ftruncate_rights, CAP_FTRUNCATE); + cap_rights_init(_futimes_rights, CAP_FUTIMES); cap_rights_init(_getpeername_rights, CAP_GETPEERNAME); cap_rights_init(_getsockname_rights, CAP_GETSOCKNAME); cap_rights_init(_getsockopt_rights, CAP_GETSOCKOPT); cap_rights_init(_ioctl_rights, CAP_IOCTL); + cap_rights_init(_linkat_source_rights, CAP_LINKAT_SOURCE); + cap_rights_init(_linkat_target_rights, CAP_LINKAT_TARGET); cap_rights_init(_listen_rights, CAP_LISTEN); + cap_rights_init(_mkdirat_rights, CAP_MKDIRAT); + cap_rights_init(_mkfifoat_rights, CAP_MKFIFOAT); + cap_rights_init(_mknodat_rights, CAP_MKNODAT); cap_rights_init(_mmap_rights, CAP_MMAP); cap_rights_init(_pdgetpid_rights, CAP_PDGETPID); cap_rights_init(_pdkill_rights, CAP_PDKILL); @@ -110,9 +136,14 @@ __cap_rights_sysinit1(void *arg) cap_rights_init(_pwrite_rights, CAP_PWRITE); cap_rights_init(_read_rights, CAP_READ); cap_rights_init(_recv_rights, CAP_RECV); + cap_rights_init(_renameat_source_rights, CAP_RENAMEAT_SOURCE); + cap_rights_init(_renameat_target_rights, CAP_RENAMEAT_TARGET); + cap_rights_init(_seek_rights, CAP_SEEK); cap_rights_init(_send_rights, CAP_SEND); cap_rights_init(_setsockopt_rights,
svn commit: r333914 - head/sys/kern
Author: mmacy Date: Sun May 20 04:32:48 2018 New Revision: 333914 URL: https://svnweb.freebsd.org/changeset/base/333914 Log: AF_UNIX: make unpcb lock name line up with what's in witness Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c == --- head/sys/kern/uipc_usrreq.c Sun May 20 04:15:12 2018(r333913) +++ head/sys/kern/uipc_usrreq.c Sun May 20 04:32:48 2018(r333914) @@ -282,7 +282,7 @@ static struct mtx unp_defers_lock; #define UNP_REF_LIST_UNLOCK() UNP_DEFERRED_UNLOCK(); #define UNP_PCB_LOCK_INIT(unp) mtx_init(&(unp)->unp_mtx, \ - "unp_mtx", "unp_mtx", \ + "unp", "unp", \ MTX_DUPOK|MTX_DEF) #defineUNP_PCB_LOCK_DESTROY(unp) mtx_destroy(&(unp)->unp_mtx) #defineUNP_PCB_LOCK(unp) mtx_lock(&(unp)->unp_mtx) ___ 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: r333922 - head/lib/libmagic
Author: cy Date: Sun May 20 05:59:35 2018 New Revision: 333922 URL: https://svnweb.freebsd.org/changeset/base/333922 Log: Fix build post r333919. This commit results in an aesthetically unpleasing long line which will be fixed next commit. Modified: head/lib/libmagic/Makefile Modified: head/lib/libmagic/Makefile == --- head/lib/libmagic/Makefile Sun May 20 05:50:53 2018(r333921) +++ head/lib/libmagic/Makefile Sun May 20 05:59:35 2018(r333922) @@ -13,9 +13,9 @@ LIBADD= z .endif MAN= libmagic.3 magic.5 -SRCS= apprentice.c apptype.c ascmagic.c cdf.c cdf_time.c compress.c \ +SRCS= apprentice.c apptype.c ascmagic.c buffer.c cdf.c cdf_time.c compress.c \ der.c encoding.c fsmagic.c funcs.c \ - is_tar.c magic.c print.c readcdf.c readelf.c softmagic.c + is_tar.c magic.c print.c readcdf.c readelf.c seccomp.c softmagic.c INCS= magic.h MAGICPATH?=/usr/share/misc ___ 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: r333916 - head/sys/kern
Author: mjg Date: Sun May 20 04:45:05 2018 New Revision: 333916 URL: https://svnweb.freebsd.org/changeset/base/333916 Log: vfs: simplify vop_stdlock/unlock The interlock pointer is non-NULL by definition and the compiler see through that and eliminates the NULL checks. Just remove them from the code as they play no role. No difference in generated assembly. Modified: head/sys/kern/vfs_default.c Modified: head/sys/kern/vfs_default.c == --- head/sys/kern/vfs_default.c Sun May 20 04:38:04 2018(r333915) +++ head/sys/kern/vfs_default.c Sun May 20 04:45:05 2018(r333916) @@ -505,7 +505,7 @@ vop_stdlock(ap) ilk = VI_MTX(vp); return (lockmgr_lock_fast_path(vp->v_vnlock, ap->a_flags, - (ilk != NULL) ? >lock_object : NULL, ap->a_file, ap->a_line)); + >lock_object, ap->a_file, ap->a_line)); } /* See above. */ @@ -521,7 +521,7 @@ vop_stdunlock(ap) ilk = VI_MTX(vp); return (lockmgr_unlock_fast_path(vp->v_vnlock, ap->a_flags, - (ilk != NULL) ? >lock_object : NULL)); + >lock_object)); } /* See above. */ ___ 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"