Don't wrap the cursor in tmux in copy mode

2016-01-26 Thread Michal Mazurek
(args_has(self->args, 'U')) { - src_wl = dst_wl; src_w = dst_w; src_wp = TAILQ_PREV(dst_wp, window_panes, entry); if (src_wp == NULL) -- Michal Mazurek

Re: Mention lang/go and lang/rust in faq8.html

2016-01-26 Thread Michal Mazurek
On 14:58:03, 26.12.15, Michael McConville wrote: > Michal Mazurek wrote: > > Go and Rust are now widely used. It might be worth mentioning them in > > the FAQ. > > ok mmcc@ This was ok'd but never commi

Re: Don't declare main() in fsck, fsck_msdos, fsdb, ncheck_ffs

2016-01-26 Thread Michal Mazurek
On 17:30:27, 2.01.16, Michal Mazurek wrote: > main() does not need to be declared. > > Also mark usage() as __dead in fsck_msdos and fsdb. This was never commited. Below are just the diffs to remove the declaration of main(): Inde

Re: Don't wrap the cursor in tmux in copy mode

2016-01-30 Thread Michal Mazurek
a->cx >= px && py < yy) { window_copy_cursor_start_of_line(wp); window_copy_cursor_down(wp, 0); - } else { + } else if (data->cx < px) { window_copy_update_cursor(wp, data->cx + 1, data->cy); if (window_copy_update_selection(wp, 1)) window_copy_redraw_lines(wp, data->cy, 1); -- Michal Mazurek

Some df(1) cleanup

2016-02-01 Thread Michal Mazurek
src/bin/df/ffs_df.c,v retrieving revision 1.17 diff -u -p -r1.17 ffs_df.c --- ffs_df.c27 Nov 2015 13:49:41 - 1.17 +++ ffs_df.c1 Feb 2016 09:43:38 - @@ -36,13 +36,10 @@ #include #include -#include #include +#include -#include -#include #include -#include intffs_df(int, char *, struct statfs *); -- Michal Mazurek

df(1) - use return, not exit() in main()

2016-02-01 Thread Michal Mazurek
? GNU df returns 1 with an error message "df: no file systems processed". NetBSD returns 0, but only because it doesn't have this commit. Commit 1.39 "Don't print header if we didn't print any usage lines." contained the change: - exit(0); + exit(mntsize ? 0 : 1); -- Michal Mazurek

df(1) - variable width columns

2016-02-03 Thread Michal Mazurek
el : cols[0].c_vals[i]); + printf("%*s", cols[1].c_width, i == -1 ? cols[1].c_label : cols[1].c_vals[i]); + printf("%*s", cols[2].c_width, i == -1 ? cols[2].c_label : cols[2].c_vals[i]); + printf("%*s", cols[3].c_width, i == -1 ? cols[3].c_label : cols[3].c_vals[i]); + printf("%*s", cols[4].c_width, i == -1 ? cols[4].c_label : cols[4].c_vals[i]); + if (iflag) { + printf("%*s", cols[5].c_width, i == -1 ? cols[5].c_label : cols[5].c_vals[i]); + printf("%*s", cols[6].c_width, i == -1 ? cols[6].c_label : cols[6].c_vals[i]); + printf("%*s", cols[7].c_width, i == -1 ? cols[7].c_label : cols[7].c_vals[i]); + } + printf(" %*-s", cols[8].c_width, i == -1 ? cols[8].c_label : cols[8].c_vals[i]); + printf("\n"); + } + } -- Michal Mazurek

hexdump(1) - bug when skip == sb.st_size

2016-02-08 Thread Michal Mazurek
skip -= sb.st_size; } else { This bug was discovered by tdm. -- Michal Mazurek

hexdump(1) - unneeded headers

2016-02-08 Thread Michal Mazurek
43 - @@ -30,13 +30,8 @@ * SUCH DAMAGE. */ -#include -#include - #include #include -#include -#include #include #include #include -- Michal Mazurek

hexdump(1) - don't declare main

2016-02-08 Thread Michal Mazurek
uffer */ - -intmain(int, char **); int main(int argc, char *argv[]) -- Michal Mazurek

hexdump(1) - tidy declarations

2016-02-08 Thread Michal Mazurek
(1, "%%s: requires a precision or a byte count"); } -void +static __dead void badfmt(const char *fmt) { errx(1, "\"%s\": bad format", fmt); } -void +static __dead void badconv(char *ch) { errx(1, "%%%s: bad conversion character", ch); -- Michal Mazurek

df(1) - unneeded headers

2016-02-08 Thread Michal Mazurek
36,10 @@ #include #include -#include #include +#include -#include -#include #include -#include intffs_df(int, char *, struct statfs *); -- Michal Mazurek

tmux/window-copy.c - copy mode scroll behaviour

2016-02-11 Thread Michal Mazurek
return; - } - window_copy_update_selection(wp, 1); - window_copy_redraw_screen(wp); + for (; np != 0; np--) + window_copy_pagedown(wp); break; case MODEKEYCOPY_HALFPAGEUP: n = screen_size_y(s) / 2; -- Michal Mazurek

Re: tmux/window-copy.c - copy mode scroll behaviour

2016-02-11 Thread Michal Mazurek
On 20:24:02, 11.02.16, Nicholas Marriott wrote: > Hi > > On Thu, Feb 11, 2016 at 08:05:54PM +0100, Michal Mazurek wrote: > > Hello, > > > > I know the code is now locked, but I'd like to ask for comments on the > > following diff. > > > > I be

Re: diff(1) performance

2016-02-13 Thread Michal Mazurek
On 18:26:46, 13.02.16, Edd Barrett wrote: > Hey, > > I've not looked into this at all, but looks like diff(1) could be > optimised: It looks like both NetBSD and FreeBSD use GNU diff. -- Michal Mazurek

"Abort trap" when pledge()d and compiled with -pg

2016-02-13 Thread Michal Mazurek
(I was told to resend this to tech@) When compiling a program that calls pledge(2) with "-pg" the resulting binary will execute seemingly fine, but at the very end die with: Abort trap (core dumped) I think the problem lies in a call to profil(2). Is this a bug or a feature?

boot_amd64(8) - mention biosboot(8)

2016-02-24 Thread Michal Mazurek
d can chain-load the .Ox @@ -172,6 +173,7 @@ PXE bootstrap .Sh SEE ALSO .Xr ddb 4 , .Xr boot 8 , +.Xr biosboot 8 , .Xr halt 8 , .Xr init 8 , .Xr installboot 8 , -- Michal Mazurek

Re: boot_amd64(8) - mention biosboot(8)

2016-02-25 Thread Michal Mazurek
Other bootstrapping software may be used, and can chain-load the .Ox @@ -171,6 +172,7 @@ PXE bootstrap .El .Sh SEE ALSO .Xr ddb 4 , +.Xr biosboot 8 , .Xr boot 8 , .Xr halt 8 , .Xr init 8 , -- Michal Mazurek

Variable width columns in df(1)

2016-02-29 Thread Michal Mazurek
red, blocksizep); + } + } + } + + return header; +} + +#define VAL(idx, col) \ + ((idx) == -1 ? cols[(col)].c_label : cols[(col)].c_vals[(idx)]) +static void +print_table(struct col *cols, int mntsize) +{ + int i; + + for (i = -1; i < mntsize; i++) { + printf("%*-s", cols[0].c_width, VAL(i, 0)); + printf("%*s", cols[1].c_width, VAL(i, 1)); + printf("%*s", cols[2].c_width, VAL(i, 2)); + printf("%*s", cols[3].c_width, VAL(i, 3)); + printf("%*s", cols[4].c_width, VAL(i, 4)); + if (iflag) { + printf("%*s", cols[5].c_width, VAL(i, 5)); + printf("%*s", cols[6].c_width, VAL(i, 6)); + printf("%*s", cols[7].c_width, VAL(i, 7)); + } + printf(" %*-s", cols[8].c_width, VAL(i, 8)); + printf("\n"); + } } -- Michal Mazurek

Re: Variable width columns in df(1)

2016-02-29 Thread Michal Mazurek
On 13:59:09, 29.02.16, Theo de Raadt wrote: > > On 2016-02-29, Michal Mazurek wrote: > > > > > If the number of filesystem inodes or blocks is too big, the columns in > > > the > > > output of df will become misaligned. > > > > > > I

df(1): remove unneeded includes

2016-03-01 Thread Michal Mazurek
diff -u -p -r1.18 ffs_df.c --- bin/df/ffs_df.c 8 Feb 2016 16:23:54 - 1.18 +++ bin/df/ffs_df.c 1 Mar 2016 11:26:06 - @@ -39,8 +39,6 @@ #include #include -#include -#include #include intffs_df(int, char *, struct statfs *); -- Michal Mazurek

df(1): return from main() and simplify maxwidth

2016-03-01 Thread Michal Mazurek
maxwidth); } - exit(mntsize ? 0 : 1); + return (mntsize ? 0 : 1); } char * -- Michal Mazurek

df(1): tidy function declarations and definitions

2016-03-01 Thread Michal Mazurek
tic int raw_df(char *file, struct statfs *sfsp) { int rfd, ret = -1; @@ -456,7 +456,7 @@ bread(int rfd, off_t off, void *buf, int return (1); } -void +static __dead void usage(void) { (void)fprintf(stderr, -- Michal Mazurek

df(1): replace __progname with getprogname()

2016-03-01 Thread Michal Mazurek
__progname); + getprogname()); exit(1); } -- Michal Mazurek

Re: df(1): tidy function declarations and definitions

2016-03-01 Thread Michal Mazurek
uf, int return (1); } -void +static __dead void usage(void) { (void)fprintf(stderr, -- Michal Mazurek

sched_bsd.c update comment

2016-03-01 Thread Michal Mazurek
their job. +* We setup the timeouts here and kick schedcpu once to make it do +* its job. */ timeout_set(&schedcpu_to, schedcpu, &schedcpu_to); -- Michal Mazurek

cpu.h: parens in macros

2016-03-01 Thread Michal Mazurek
t;p_md.md_astpending = 1 +#defineaston(p)((p)->p_md.md_astpending = 1) #ifdef CPU_R8000 #definemips_sync() __asm__ volatile ("lw $0, 0(%0)" :: \ -- Michal Mazurek

kern_sched.c: unused functions

2016-03-02 Thread Michal Mazurek
*); -void cpuset_complement(struct cpuset *, struct cpuset *, struct cpuset *); -struct cpu_info *cpuset_first(struct cpuset *); +voidcpuset_add(struct cpuset *, struct cpu_info *); +int cpuset_isset(struct cpuset *, struct cpu_info *); #endif /* _KERNEL */ #endif /* !_SYS_PROC_H_ */ - -- Michal Mazurek

kern_fork.c: oldpids[] size

2016-03-02 Thread Michal Mazurek
,7 +563,7 @@ fork1(struct proc *curp, int flags, void /* * Checks for current use of a pid, either as a pid or pgid. */ -pid_t oldpids[100]; +pid_t oldpids[128]; int ispidtaken(pid_t pid) { -- Michal Mazurek

Re: kern_sched.c: unused functions

2016-03-02 Thread Michal Mazurek
On 17:19:39, 2.03.16, Martin Natano wrote: > On Wed, Mar 02, 2016 at 05:07:21PM +0100, Michal Mazurek wrote: > > kern_sched.c: > > - remove unused functions > > - mark static functions as static > > Functions shouldn't be static in the kernel. "In userland, &

kern_exit.c: move declarations from proc.h

2016-03-03 Thread Michal Mazurek
@@ int single_thread_check(struct proc *, i void child_return(void *); intproc_cansugid(struct proc *); -void proc_finish_wait(struct proc *, struct proc *); -void process_zap(struct process *); -void proc_free(struct proc *); struct sleep_state { int sls_s; -- Michal

kern_proc.c: fix comment

2016-03-04 Thread Michal Mazurek
ern_proc.c11 Sep 2015 08:27:39 - 1.65 +++ sys/kern/kern_proc.c4 Mar 2016 12:36:26 - @@ -150,7 +150,7 @@ chgproccnt(uid_t uid, int diff) } /* - * Is p an inferior of parent? + * Is pr an inferior of parent? */ int inferior(struct process *pr, struct process *parent) -- Michal Mazurek

proc.h: fix comment

2016-03-04 Thread Michal Mazurek
PS_BITS \ ("\20" "\01CONTROLT" "\02EXEC" "\03INEXEC" "\04EXITING" "\05SUGID" \ -- Michal Mazurek

sys_process.c: remove relebad

2016-03-04 Thread Michal Mazurek
or init */ @@ -522,9 +522,6 @@ sys_ptrace(struct proc *p, void *v, regi } return (0); - - relebad: - return (error); case PT_KILL: if (SCARG(uap, pid) < THREAD_PID_OFFSET && tr->ps_single) -- Michal Mazurek

ptrace.2: document PT_GET_THREAD_FIRST and PT_GET_THREAD_NEXT

2016-03-05 Thread Michal Mazurek
urns the thread ID of the subsequent thread. +The +.Dq Li struct ptrace_thread_state +pointed to by +.Fa addr +must be initialized by a previous +.Dv PT_GET_THREAD_FIRST +or +.Dv PT_GET_THREAD_NEXT +request. .El .Pp Additionally, machine-specific requests can exist. -- Michal Mazurek

Re: sched_bsd.c update comment

2016-03-05 Thread Michal Mazurek
On 16:20:11, 1.03.16, Michal Mazurek wrote: > > Index: sys/kern/sched_bsd.c > === > RCS file: /cvs/src/sys/kern/sched_bsd.c,v > retrieving revision 1.42 > diff -u -p -r1.42 sched_bsd.c > --- sys/kern/sched_bsd

proc.h: update PID_MAX after sys/compat is gone

2016-03-05 Thread Michal Mazurek
ess group". - * We set PID_MAX to (SHRT_MAX - 1) so we don't break sys/compat. + * We set PID_MAX to (SHRT_MAX - 1) for historical reasons. */ #definePID_MAX 32766 #defineNO_PID (PID_MAX+1) -- Michal Mazurek

Re: proc.h: update PID_MAX after sys/compat is gone

2016-03-06 Thread Michal Mazurek
On 11:32:04, 5.03.16, Philip Guenther wrote: > On Sat, Mar 5, 2016 at 8:10 AM, Michal Mazurek wrote: > > sys/compat is gone. I don't know if PID_MAX can or should be increased, > > but I don't think the comment is now useful. > > I think we can go a bit further n

sched_bsd.c: update comment

2016-03-07 Thread Michal Mazurek
EP || p->p_stat == SSTOP) p->p_slptime++; @@ -715,4 +714,3 @@ sysctl_hwperfpolicy(void *oldp, size_t * return 0; } #endif - -- Michal Mazurek

sched_bsd.c: update comment about p_pctcpu

2016-03-07 Thread Michal Mazurek
#if(FSHIFT >= CCPU_SHIFT) p->p_pctcpu += (phz == 100)? -- Michal Mazurek

update comment about p_usrpri

2016-03-08 Thread Michal Mazurek
_nice;/* U_CHAR: Process "nice" value. */ u_int16_t p_xstat; /* U_SHORT: Exit status for wait; also stop signal. */ -- Michal Mazurek

Re: update comment about p_usrpri

2016-03-09 Thread Michal Mazurek
On 22:47:08, 8.03.16, Martin Pieuchot wrote: > On 08/03/16(Tue) 10:01, Michal Mazurek wrote: > > p_cpu exists, but p_usrpri isn't based on it. > > Michal I lost track of all your comment fixes. One of the accepted > rules when we read code is that comments are always lyin

Re: update comment about p_usrpri

2016-03-09 Thread Michal Mazurek
On 09:42:32, 9.03.16, Michal Mazurek wrote: > On 22:47:08, 8.03.16, Martin Pieuchot wrote: > > On 08/03/16(Tue) 10:01, Michal Mazurek wrote: > > > p_cpu exists, but p_usrpri isn't based on it. > > > > Michal I lost track of all your comment fixes. One of

scheduler: abstract away spc_whichqs

2016-03-11 Thread Michal Mazurek
fine cpu_is_idle(ci)((ci)->ci_schedstate.spc_whichqs == 0) void sched_init_runqueues(void); void setrunqueue(struct proc *); -- Michal Mazurek

New scheduler for OpenBSD

2016-03-12 Thread Michal Mazurek
* !_SYS_PROC_H_ */ - Index: sys/sys/sched.h === RCS file: /cvs/src/sys/sys/sched.h,v retrieving revision 1.40 diff -u -p -r1.40 sched.h --- sys/sys/sched.h 9 Mar 2016 13:38:50 - 1.40 +++ sys/sys/sched.h 12 Mar 2016 15:48:37 - @@ -70,

queue.3, tree.3 - SEE ALSO

2016-03-13 Thread Michal Mazurek
ee.3 13 Mar 2016 09:57:24 - @@ -549,6 +549,8 @@ main() return (0); } .Ed +.Sh SEE ALSO +.Xr queue 3 .Sh NOTES Trying to free a tree in the following way is a common error: .Bd -literal -offset indent -- Michal Mazurek

Re: New scheduler for OpenBSD

2016-03-14 Thread Michal Mazurek
x27;t know how to replace the call to sched_yield(), or whether it is a good idea to do so. Any advice? -- Michal Mazurek

Re: New scheduler for OpenBSD

2016-03-14 Thread Michal Mazurek
On 16:35:49, 13.03.16, Martin Pieuchot wrote: > On 12/03/16(Sat) 17:36, Michal Mazurek wrote: > > [...] > > Some notes: > > > > Chrome is still not very usable. > > Are you wanting to improve the browser experience on OpenBSD? If that's > your goal t

Re: hexdump(1) - unneeded headers

2016-03-14 Thread Michal Mazurek
This was sent during the freeze. On 14:13:40, 8.02.16, Michal Mazurek wrote: > These headers appear to be unneeded: > > Index: conv.c > === > RCS file: /cvs/src/usr.bin/hexdump/conv.c,v > retrieving revision

Re: hexdump(1) - tidy declarations

2016-03-14 Thread Michal Mazurek
This was sent during the freeze. On 15:04:28, 8.02.16, Michal Mazurek wrote: > Move some declarations out of hexdump.h > Mark some declarations as __dead or static > Remove a commented out declaration > Convert some spaces to tabs > >

Re: update comment about p_usrpri

2016-03-14 Thread Michal Mazurek
On 16:41:37, 9.03.16, Michal Mazurek wrote: > Sorry, I forgot one: > > > Index: sys/sys/sysctl.h > === > RCS file: /cvs/src/sys/sys/sysctl.h,v > retrieving revision 1.158 > diff -u -p -r1.158 sysctl.h > -

Re: New scheduler for OpenBSD

2016-03-15 Thread Michal Mazurek
== RCS file: /cvs/src/sys/sys/sched.h,v retrieving revision 1.40 diff -u -p -r1.40 sched.h --- sys/sched.h 9 Mar 2016 13:38:50 - 1.40 +++ sys/sched.h 15 Mar 2016 13:56:58 - @@ -70,6 +70,7 @@ #define_SYS_SCHED_H_ #include +#include /* * Posix defines a which may want to include @@ -99,6 +100,7 @@ struct schedstate_percpu { u_int spc_schedticks; /* ticks for schedclock() */ u_int64_t spc_cp_time[CPUSTATES]; /* CPU state statistics */ u_char spc_curpriority; /* usrpri of curproc */ + u_int64_t spc_curdeadline; int spc_rrticks;/* ticks until roundrobin() */ int spc_pscnt; /* prof/stat counter */ int spc_psdiv; /* prof/stat divisor */ @@ -109,6 +111,8 @@ struct schedstate_percpu { TAILQ_HEAD(prochead, proc) spc_qs[SCHED_NQS]; volatile uint32_t spc_whichqs; + + RB_HEAD(prochead2, proc) spc_rq; #ifdef notyet struct proc *spc_reaper;/* dead proc reaper */ -- Michal Mazurek

Re: New scheduler for OpenBSD

2016-03-15 Thread Michal Mazurek
On 14:57:40, 15.03.16, Alexandre Ratchov wrote: > On Sat, Mar 12, 2016 at 05:36:21PM +0100, Michal Mazurek wrote: > > > > p_usrpri and p_priority will go away, so userland utilities like 'ps' > > will need to be changed. > > > > AFAIU, this would hurt

Re: New scheduler for OpenBSD

2016-03-19 Thread Michal Mazurek
second. When running tests with it I sometimes observe one cpu is 0.5-1 second behind another, so I think this is a good next step for this scheduler. BFS has one shared queue for all CPUs, maybe there is a very good reason for that, we'll see. I'd like to thank everyone for all the feedb

ps: remove emul support

2016-03-26 Thread Michal Mazurek
- @@ -209,8 +209,6 @@ CPU ID (zero on single processor systems Current working directory. .It Cm dsiz Data size, in Kilobytes. -.It Cm emul -Name of system call emulation environment. .It Cm flags Alias: .Cm f . -- Michal Mazurek

sys_process.c: remove relebad

2016-04-06 Thread Michal Mazurek
or init */ @@ -522,9 +522,6 @@ sys_ptrace(struct proc *p, void *v, regi } return (0); - - relebad: - return (error); case PT_KILL: if (SCARG(uap, pid) < THREAD_PID_OFFSET && tr->ps_single) -- Michal Mazurek

document NOLOCK in syscalls.master

2016-04-06 Thread Michal Mazurek
soever. +; OBSOL obsolete, not included in system. +; STD always included. +; UNIMPL unimplemented, not included in system. ; ; The compat options are defined in the syscalls.conf file, and the ; compat option name is prefixed to the syscall name. Other than -- Michal Mazurek

remove MPSAFE from makesyscalls.sh

2016-04-06 Thread Michal Mazurek
RDER == _BIG_ENDIAN #define SCARG(p, k)((p)->k.be.datum) /* get arg from args pointer */ -- Michal Mazurek

tidy syscall_mi.h

2016-04-07 Thread Michal Mazurek
n (error); } #endif + if (lock) + KERNEL_LOCK(); error = (*callp->sy_call)(p, argp, retval); -#if NSYSTRACE > 0 -done: -#endif if (lock) KERNEL_UNLOCK(); -- Michal Mazurek

Re: sys_process.c: remove relebad

2016-04-09 Thread Michal Mazurek
On 10:13:06, 7.04.16, Martin Natano wrote: > On Wed, Apr 06, 2016 at 09:47:35AM +0200, Michal Mazurek wrote: > > relebad used to have more body: > > relebad: > > PRELE(t); > > return (error); > > But then PRELE(t); was removed. This

Re: remove MPSAFE from makesyscalls.sh

2016-05-02 Thread Michal Mazurek
On 10:22:58, 7.04.16, Martin Natano wrote: > On Wed, Apr 06, 2016 at 03:42:20PM +0200, Michal Mazurek wrote: > > MPSAFE is never used, and doesn't look like it's even supported (no > > matching SY_MPSAFE anywhere). > > SY_MPSAFE seems to be unused since it's i

Re: document NOLOCK in syscalls.master

2016-05-02 Thread Michal Mazurek
d, but don't define the syscall args structure, -; and allow it to be "really" varargs. ; ; The compat options are defined in the syscalls.conf file, and the ; compat option name is prefixed to the syscall name. Other than -- Michal Mazurek

vm.conf.5 - number of sections

2016-05-04 Thread Michal Mazurek
: +is divided into two main sections: .Bl -tag -width .It Sy Macros User-defined variables may be defined and used later, simplifying the -- Michal Mazurek

tidy strstr.3

2016-05-11 Thread Michal Mazurek
o Bar Baz"; +const char *smallstring = "Bar"; +char *ptr; + +ptr = strstr(largestring, smallstring); +.Ed .Sh SEE ALSO .Xr memchr 3 , +.Xr memmem 3 , .Xr strchr 3 , .Xr strcspn 3 , .Xr strpbrk 3 , -- Michal Mazurek

Re: Allow top(1) to search arguments (again)

2016-05-11 Thread Michal Mazurek
har *arg; /* argument that caused the error */ }; extern struct errs errs[]; -- Michal Mazurek

Re: tidy strstr.3

2016-05-11 Thread Michal Mazurek
On 19:55:48, 11.05.16, Ingo Schwarze wrote: > Hi, > > Michal Mazurek wrote on Wed, May 11, 2016 at 10:41:03AM +0200: > > > * add explicit RETURN VALUES section > > * add an EXAMPLES section, from NetBSD and FreeBSD > > * mention memmem(3) > > Committed with

pfctl/pfctl_osfp.c: mark functions as static

2017-05-27 Thread Michal Mazurek
*line, size_t *len, int *fieldlen) { char *ret, *ptr = *line; @@ -989,8 +987,7 @@ get_field(char **line, size_t *len, int return (ret); } - -const char * +static const char * print_ioctl(struct pf_osfp_ioctl *fp) { static char buf[1024]; -- Michal Mazurek

pfctl/pfctl_osfp.c: print_ioctl() used only in debug mode

2017-05-27 Thread Michal Mazurek
fdef OSFP_DEBUG const char * print_ioctl(struct pf_osfp_ioctl *fp) { @@ -1091,3 +1095,4 @@ print_ioctl(struct pf_osfp_ioctl *fp) return (buf); } +#endif -- Michal Mazurek

pfctl/pfctl_osfp.c: move includes

2017-05-27 Thread Michal Mazurek
-- Michal Mazurek

tcpdump/pfctl_osfp.c: catch up

2017-05-27 Thread Michal Mazurek
* rip the next field ouf of a formatted config file line */ +/* rip the next field out of a formatted config file line */ char * get_field(u_char **line, size_t *len, int *fieldlen) { -- Michal Mazurek

tcpdump/pfctl_osfp.c: catch up 2

2017-05-28 Thread Michal Mazurek
erprint_count = 0; class_count = 0; } @@ -980,6 +984,7 @@ get_field(u_char **line, size_t *len, in } +#ifdef OSFP_DEBUG const char * print_ioctl(struct pf_osfp_ioctl *fp) { @@ -1081,3 +1086,4 @@ print_ioctl(struct pf_osfp_ioctl *fp) return (buf); } +#endif -- Michal Mazurek

tcpdump/pfctl_osfp.c: comment out pfctl_show_fingerprints()

2017-05-28 Thread Michal Mazurek
("-\t---\t---\n"); + sort_name_list(opts, &classes); + print_name_list(opts, &classes, ""); + } + } } +#endif /* Lookup a fingerprint */ pf_osfp_t -- Michal Mazurek

pfctl/parse.y: don't check np->port for NULL

2017-05-28 Thread Michal Mazurek
); if (isrdr) { - if (!rs->rdr->rport.b && rs->rdr->rport.t && np->port != NULL) { + if (!rs->rdr->rport.b && rs->rdr->rport.t) { rpool->proxy_port[1] = ntohs(rs->rdr->rport.a) + (ntohs(np->port[1]) - ntohs(np->port[0])); } else -- Michal Mazurek

tcpdump: drop atalk support

2017-05-28 Thread Michal Mazurek
nerating them rather than .Nm tcpdump . -.Pp -Apple Ethertalk DDP packets could be dumped as easily as KIP DDP packets -but aren't. -Even if we were inclined to do anything to promote the use of Ethertalk -(we aren't, LBL doesn't allow Ethertalk on any of its -networks so we'd have no way of testing this code). .Pp A packet trace that crosses a daylight saving time change will give skewed time stamps -- Michal Mazurek

tcpdump: enable some more bgp info

2017-05-29 Thread Michal Mazurek
r_update[0]), - 0, - 0, + sizeof(bgpnotify_minor_holdtime)/sizeof(bgpnotify_minor_holdtime[0]), + sizeof(bgpnotify_minor_fsm)/sizeof(bgpnotify_minor_fsm[0]), sizeof(bgpnotify_minor_cease)/sizeof(bgpnotify_minor_cease[0]), sizeof(bgpnotify_minor_cap)/sizeof(bgpnotify_minor_cap[0]), }; -- Michal Mazurek

tcpdump: fix some clang warnings

2017-05-29 Thread Michal Mazurek
) ph = (const struct pkt_hdr *)hdr; len -= sizeof(*ph); - if (len < 0 || (u_char *)(ph + 1) <= snapend) { + if ((u_char *)(ph + 1) <= snapend) { if (ph->ph_flags) printf("*"); switch (ph->ph_type) { -- Michal Mazurek

Re: tcpdump: enable some more bgp info

2017-05-30 Thread Michal Mazurek
gpnotify_minor_fsm)/sizeof(bgpnotify_minor_fsm[0]), sizeof(bgpnotify_minor_cease)/sizeof(bgpnotify_minor_cease[0]), sizeof(bgpnotify_minor_cap)/sizeof(bgpnotify_minor_cap[0]), }; -- Michal Mazurek

Re: tcpdump: drop atalk support

2017-05-30 Thread Michal Mazurek
them rather than .Nm tcpdump . -.Pp -Apple Ethertalk DDP packets could be dumped as easily as KIP DDP packets -but aren't. -Even if we were inclined to do anything to promote the use of Ethertalk -(we aren't, LBL doesn't allow Ethertalk on any of its -networks so we'd have no way of testing this code). .Pp A packet trace that crosses a daylight saving time change will give skewed time stamps -- Michal Mazurek

Re: tcpdump: enable some more bgp info

2017-05-30 Thread Michal Mazurek
f(bgpnotify_minor_cease)/sizeof(bgpnotify_minor_cease[0]), sizeof(bgpnotify_minor_cap)/sizeof(bgpnotify_minor_cap[0]), }; -- Michal Mazurek

tcpdump: print-bgp.c: update error code 7

2017-05-30 Thread Michal Mazurek
otify_minor_holdtime[0]), sizeof(bgpnotify_minor_fsm)/sizeof(bgpnotify_minor_fsm[0]), sizeof(bgpnotify_minor_cease)/sizeof(bgpnotify_minor_cease[0]), - sizeof(bgpnotify_minor_cap)/sizeof(bgpnotify_minor_cap[0]), + sizeof(bgpnotify_minor_err)/sizeof(bgpnotify_minor_err[0]), }; static const char *bgpattr_origin[] = { -- Michal Mazurek

Re: htpasswd: use crypt_newhash instead of bcrypt API

2017-06-06 Thread Michal Mazurek
Dq blowfish +can be used as an alias for +.Dq bcrypt . .El .Sh RETURN VALUES .Rv -std crypt_checkpass crypt_newhash @@ -89,7 +101,9 @@ to .Er EINVAL if .Fa pref -is unsupported. +is unsupported, or the value of +.Fa hashsize +is insufficient. .Sh SEE ALSO .Xr crypt 3 , .Xr login.conf 5 , -- Michal Mazurek

Re: htpasswd: use crypt_newhash instead of bcrypt API

2017-06-06 Thread Michal Mazurek
to change it. Judging by the commit message the author was aware of this discrepancy though, and marked is as "for now", so let's see what others say. -- Michal Mazurek

Re: tcpdump: drop atalk support

2017-06-08 Thread Michal Mazurek
d as easily as KIP DDP packets -but aren't. -Even if we were inclined to do anything to promote the use of Ethertalk -(we aren't, LBL doesn't allow Ethertalk on any of its -networks so we'd have no way of testing this code). .Pp A packet trace that crosses a daylight saving time change will give skewed time stamps -- Michal Mazurek

Re: htpasswd: use crypt_newhash instead of bcrypt API

2017-06-10 Thread Michal Mazurek
On 21:16:08, 6.06.17, Michal Mazurek wrote: > When talking about this with mulander@ it came out that the docs could > use a touch. > > The commit message for the diff that didn't update the docs was: > > permit "bcrypt" as an alias for "blowfish"

viocon.4: mention all ttyVI devices

2017-06-11 Thread Michal Mazurek
+.It Pa /dev/ttyVI30 +.It Pa /dev/ttyVI40 .El .Sh SEE ALSO .Xr intro 4 , -- Michal Mazurek

games/hunt: /usr/games/lib doesn't exist

2017-06-12 Thread Michal Mazurek
ver value you used here as well. In /etc/inetd.conf, add the line - huntdgram udp waitnobody /usr/games/lib/huntdhuntd + huntdgram udp waitnobody /usr/games/huntd huntd This works for 4.3BSD. I don't remember the configuration file format for 4.2BSD inetd. -- Michal Mazurek

games/fortune: /usr/games/lib doesn't exist

2017-06-12 Thread Michal Mazurek
-- E. E. CUMMINGS % -HELP I'm being held prisoner in /usr/games/lib! +HELP I'm being held prisoner in /usr/share/games! % Help stamp out Mickey-Mouse computer interfaces -- Menus are for Restaurants! % -- Michal Mazurek

locate: remove /usr/libexec/locate.concatdb

2017-06-12 Thread Michal Mazurek
- -trap 'rm -f $bigrams' 0 1 2 3 5 10 15 - -for db -do - $locate -d $db / -done | $bigram | $sort -nr | awk 'BEGIN { ORS = "" } NR <= 128 { print $2 }' > $bigrams - -for db -do - $locate -d $db / -done | $code $bigrams -- Michal Mazurek

locate/mklocatedb.sh: remove unused option

2017-06-12 Thread Michal Mazurek
"$TMPDIR" > $filelist; then +$bigram < $filelist | sort -Hnr | awk -Ft 'BEGIN { ORS = "" } NR <= 128 { print $2 }' > $bigrams && $code $bigrams < $filelist else -- Michal Mazurek

Re: games/fortune: /usr/games/lib doesn't exist

2017-06-12 Thread Michal Mazurek
On 18:50:26, 12.06.17, Jason McIntyre wrote: > On Mon, Jun 12, 2017 at 07:13:43PM +0200, Michal Mazurek wrote: > > Can't have outdated paths in fortunes. > > > > OK? > > > > Index: games/fortune//datfiles/fortunes2 > > ===

Re: games/hunt: /usr/games/lib doesn't exist

2017-06-13 Thread Michal Mazurek
inetd.conf, add the line - huntdgram udp waitnobody /usr/games/lib/huntdhuntd + huntdgram udp waitnobody /usr/games/huntdhuntd This works for 4.3BSD. I don't remember the configuration file format for 4.2BSD inetd. -- Michal Mazurek

Re: htpasswd: use crypt_newhash instead of bcrypt API

2017-06-13 Thread Michal Mazurek
encryptedlen < BCRYPT_HASHSPACE) goto inval; BCRYPT_HASHSPACE is defined thus: libc/crypt/bcrypt.c:#define BCRYPT_HASHSPACE61 -- Michal Mazurek

Re: tcpdump: drop atalk support

2017-06-13 Thread Michal Mazurek
2,7 @@ #define TCPDUMP_MAGIC 0xa1b2c3d4 /* file ids used by priv_getlines */ -#define FTAB_APPLETALK 0 -#define FTAB_PFOSFP1 +#define FTAB_PFOSFP0 enum cmd_types { PRIV_OPEN_BPF, /* open a bpf descriptor */ -- Michal Mazurek

hack: fix paths, remove hack.sh

2017-06-15 Thread Michal Mazurek
in - -s*) - exec $HACK $@ - ;; - *) - exec $HACK $@ $MAXNROFPLAYERS - ;; -esac -- Michal Mazurek

crypt_checkpass.3: clarify cetrain points

2017-06-19 Thread Michal Mazurek
INVAL if .Fa pref -is unsupported. +is unsupported, or the value of +.Fa hashsize +is insufficient. .Sh SEE ALSO .Xr crypt 3 , .Xr login.conf 5 , -- Michal Mazurek

Re: locate/mklocatedb.sh: remove unused option

2017-06-20 Thread Michal Mazurek
Bump. These scripts could use a little refreshing. On 22:34:57, 12.06.17, Michal Mazurek wrote: > This script has an option called -presort or -nosort, that appears to > never be used, so remove it. This makes the $sort* options unneeded, > remove them too. > > The script it

documentation: valid KTRPOINT() arguments

2016-06-15 Thread Michal Mazurek
_ value described in .Xr ktrace 2 . .Pp .Fn ktremul -- Michal Mazurek

ktremul() no longer exists

2016-06-15 Thread Michal Mazurek
*path" @@ -70,12 +67,6 @@ Possible values for the .Fa type argument are a mask of the KTRFAC_ values described in .Xr ktrace 2 . -.Pp -.Fn ktremul -should be called every time emulation for the execution environment -is changed and thus the name of which is given in the -.Fa name -argument. .Pp .Fn ktrgenio should be called for each generic input/output transaction that is -- Michal Mazurek

pledge in /usr/bin/ktrace

2016-06-15 Thread Michal Mazurek
#x27;: + facs |= KTRFAC_PLEDGE; break; case '+': facs |= DEF_POINTS; -- Michal Mazurek

check KTRPOINT() before calling ktrpledge()

2016-06-20 Thread Michal Mazurek
ktrpledge(p, error, code, p->p_pledge_syscall); + if (KTRPOINT(p, KTR_PLEDGE)) + ktrpledge(p, error, code, p->p_pledge_syscall); #endif /* Send uncatchable SIGABRT for coredump */ memset(&sa, 0, sizeof sa); -- Michal Mazurek

  1   2   >