Re: Add interface groups for dhcpd, fix whitespaces

2011-05-27 Thread Michal Mazurek
); + if (strcmp(ifg-ifgrq_group, groupname) == 0) { + ret = 1; + break; + } + } + free(ifgr.ifgr_groups); + +end: + close(s); + return (ret); } -- Michal Mazurek

rtadvd crashes after multiple ifconfig create/destroy

2011-05-28 Thread Michal Mazurek
) { + if (ifm-ifm_version == RTM_VERSION) { + (*ifmlist_p)[ifm-ifm_index] = ifm; + } } for (ifam = (struct ifa_msghdr *) ((char *)ifm + ifm-ifm_msglen); -- Michal Mazurek

Re: rtadvd crashes after multiple ifconfig create/destroy

2011-06-05 Thread Michal Mazurek
On Sat, May 28, 2011 at 01:25:15PM +0200, Michal Mazurek wrote: After multiple ifconfig create and destroy of bridge and tun interfaces rtadvd crashed just seconds after being started. Here is a way to recreate the crash: $ cat /etc/rtadvd.conf tun6:addr=fd00:1234::1:prefixlen#64: for I

Invalid parenthesis placement in stdlibs malloc.c

2012-09-13 Thread Michal Mazurek
, NULL); return MAP_FAILED; } -- Michal Mazurek

strlcat usage in realpath.c

2012-09-13 Thread Michal Mazurek
; goto err; -- Michal Mazurek

missing description for strtod(3)

2012-09-14 Thread Michal Mazurek
RETURN VALUES -- Michal Mazurek

missing argument in vaccess.9

2012-09-14 Thread Michal Mazurek
on the +.Fa type , .Fa file_mode , .Fa uid , and -- Michal Mazurek

mention vdrop in vhold.9

2012-09-14 Thread Michal Mazurek
than or equal to zero prior to calling +.Fn vdrop , +the system will panic. +If the vnode is no longer referenced, it will be freed. .Sh SEE ALSO .Xr vnode 9 .Sh AUTHORS -- Michal Mazurek

Re: mention vdrop in vhold.9

2012-09-15 Thread Michal Mazurek
will panic. +If the vnode is no longer referenced, it will be freed. .Sh SEE ALSO .Xr vnode 9 .Sh AUTHORS -- Michal Mazurek

HISTORY and AUTHORS for rs(1), lam(1), jot(1)

2016-01-04 Thread Michal Mazurek
20 Jan 2014 05:07:48 - 1.18 +++ jot/jot.1 4 Jan 2016 19:56:51 - @@ -313,3 +313,10 @@ To print all lines 80 characters or long .Xr yes 1 , .Xr arc4random 3 , .Xr printf 3 +.Sh HISTORY +The +.Nm +utility first appeared in +.Bx 4.2 . +.Sh AUTHORS +.An John A. Kunze -- Michal

Clarify fold(1)

2016-01-04 Thread Michal Mazurek
-- Michal Mazurek

Re: Clarify fold(1)

2016-01-04 Thread Michal Mazurek
(or bytes). +If a space character does not exist within the width, then +a longer line will still be split at the width. .It Fl w Ar width Specifies a line width to use instead of the default 80 characters. .El -- Michal Mazurek

unused proc_ispeer() in proc.c

2016-01-02 Thread Michal Mazurek
struct privsep_proc *procs, unsigned int nproc) -- Michal Mazurek

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

2016-01-02 Thread Michal Mazurek
- @@ -119,7 +119,6 @@ int matchino(const void *, const void *) int matchcache(const void *, const void *); void cacheino(ufsino_t, void *); void *cached(ufsino_t); -int main(int, char *[]); char *rawname(char *); void format_entry(const char *, struct direct *); -- Michal Mazurek

vmd.h typo in comment (VMM_DEBUG -> VMD_DEBUG)

2016-01-02 Thread Michal Mazurek
dprintf(x...) do { log_debug(x); } while(0) #else #define dprintf(x...) -#endif /* VMM_DEBUG */ +#endif /* VMD_DEBUG */ enum imsg_type { IMSG_VMDOP_START_VM_REQUEST = IMSG_PROC_MAX, -- Michal Mazurek

Potential null pointer dereference in malloc.c if 'A' is cleared

2015-12-29 Thread Michal Mazurek
time of failure, rather than when the bogus pointer was used. +.It Cm a +.Dq Never Abort . +Never call +.Xr abort 3 , +even if +.Dq xmalloc +or +.Dq Junk +is set. .It Cm C .Dq Canaries . Add canaries at the end of allocations in order to detect The alternative would be to call abort() i

Add C11 stdalign.h and stdnoreturn.h

2015-12-30 Thread Michal Mazurek
stdnoreturn.h diff -N include/stdnoreturn.h --- /dev/null 1 Jan 1970 00:00:00 - +++ include/stdnoreturn.h 30 Dec 2015 16:43:53 - @@ -0,0 +1,12 @@ +/* $OpenBSD$ */ + +/* + * Public domain. + */ + +#ifndef_STDNORETURN_H_ +#define_STDNORETURN_H_ + +#define noreturn _Noreturn + +#endif /* _STDNORETURN_H_ */ -- Michal Mazurek

Clarify vmctl(8) console

2015-12-31 Thread Michal Mazurek
create Ar path Fl s Ar size Creates a VM disk image file with the specified -- Michal Mazurek

A cleanup block for virtio.c vionet_notifyq()

2015-12-31 Thread Michal Mazurek
"%d", errno); - free(pkt); - free(vr); - return (0); + goto out; } ret = 1; @@ -1170,6 +1158,7 @@ vionet_notifyq(struct vionet_dev *dev) log_warnx("vionet: tx error writing vio ring"); } +out: free(vr); free(pkt); -- Michal Mazurek

Mark some functions as static in vmd.c

2016-01-01 Thread Michal Mazurek
_getbyvmid(uint32_t); struct vmd_vm *vm_getbyid(uint32_t); struct vmd_vm *vm_getbyname(const char *); -- Michal Mazurek

OpenBSDVMM58 -> OpenBSDVMM59 in vmmvar.h

2016-01-01 Thread Michal Mazurek
@@ #ifndef _MACHINE_VMMVAR_H_ #define _MACHINE_VMMVAR_H_ -#define VMM_HV_SIGNATURE "OpenBSDVMM58" +#define VMM_HV_SIGNATURE "OpenBSDVMM59" #define VMM_MAX_DISKS_PER_VM 2 #define VMM_MAX_PATH_DISK 128 -- Michal Mazurek

Don't declare main() in pax, adventure, battlestar

2016-01-01 Thread Michal Mazurek
battlestar.c --- games/battlestar/battlestar.c 4 Dec 2015 17:34:40 - 1.18 +++ games/battlestar/battlestar.c 1 Jan 2016 15:28:07 - @@ -40,8 +40,6 @@ #include "extern.h" #include "pathnames.h" -int main(int, char *[]); - int main(int argc, char *argv

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

2015-12-26 Thread Michal Mazurek
438,14 @@ Plenty of subpackages are available for Ruby http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/ruby;>lang/ruby + + + + + +Rust + +http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/rust;>lang/rust -- Michal Mazurek

Clarify factor(6)

2015-12-26 Thread Michal Mazurek
a number is factored, it is printed and the list of factors on a single line. Factors are listed in ascending order, and are preceded by a space. If a factor divides a value more than once, it will be printed -more than once. +that number of times. .Pp When .Nm -- Michal Mazurek

pledge in /usr/bin/ktrace

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

documentation: valid KTRPOINT() arguments

2016-06-15 Thread Michal Mazurek
type -argument are a mask of the KTRFAC_ values described in +must be a KTR_ value matching the respective KTRFAC_ value described in .Xr ktrace 2 . .Pp .Fn ktremul -- Michal Mazurek

ktremul() no longer exists

2016-06-15 Thread Michal Mazurek
ar *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

check KTRPOINT() before calling ktrpledge()

2016-06-21 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(, 0, sizeof sa); -- Michal Mazurek

hexdump(1) - don't declare main

2016-02-08 Thread Michal Mazurek
*/ - -intmain(int, char **); int main(int argc, char *argv[]) -- 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

df(1) - unneeded headers

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

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

2016-02-08 Thread Michal Mazurek
} else { This bug was discovered by tdm. -- Michal Mazurek

hexdump(1) - tidy declarations

2016-02-08 Thread Michal Mazurek
rx(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

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

2016-02-11 Thread Michal Mazurek
e_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 bel

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

df(1) - variable width columns

2016-02-03 Thread Michal Mazurek
].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

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

2016-01-30 Thread Michal Mazurek
gt;= 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

boot_amd64(8) - mention biosboot(8)

2016-02-24 Thread Michal Mazurek
, and 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
bel : 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

Don't wrap the cursor in tmux in copy mode

2016-01-26 Thread Michal Mazurek
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 commited.

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

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

cpu.h: parens in macros

2016-03-01 Thread Michal Mazurek
d.md_astpending = 1 +#defineaston(p)((p)->p_md.md_astpending = 1) #ifdef CPU_R8000 #definemips_sync() __asm__ volatile ("lw $0, 0(%0)" :: \ -- 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 <akf...@jasminek.net> wrote: > > > > > If the number of filesystem inodes or blocks is too big, the columns in > > > the > > > output of df will become misaligned. > >

Re: New scheduler for OpenBSD

2016-03-14 Thread Michal Mazurek
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 then I

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: 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 interactiv

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 the a

scheduler: abstract away spc_whichqs

2016-03-11 Thread Michal Mazurek
pc_whichqs == 0) void sched_init_runqueues(void); void setrunqueue(struct proc *); -- Michal Mazurek

New scheduler for OpenBSD

2016-03-12 Thread Michal Mazurek
+#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

queue.3, tree.3 - SEE ALSO

2016-03-13 Thread Michal Mazurek
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-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 feedback. --

tidy syscall_mi.h

2016-04-07 Thread Michal Mazurek
rror); } #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. T

remove MPSAFE from makesyscalls.sh

2016-04-06 Thread Michal Mazurek
IG_ENDIAN #define SCARG(p, k)((p)->k.be.datum) /* get arg from args pointer */ -- 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
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

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

update comment about p_usrpri

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

kern_proc.c: fix comment

2016-03-04 Thread Michal Mazurek
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

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 <akf...@jasminek.net> 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

kern_sched.c: unused functions

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

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
aw_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
return (1); } -void +static __dead void usage(void) { (void)fprintf(stderr, -- Michal Mazurek

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

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

sched_bsd.c: update comment

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

ptrace.2: document PT_GET_THREAD_FIRST and PT_GET_THREAD_NEXT

2016-03-05 Thread Michal Mazurek
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
quot;. - * 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

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(_to, schedcpu, _to); -- 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 lying. S

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

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

Re: tidy strstr.3

2016-05-12 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

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

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

Re: document NOLOCK in syscalls.master

2016-05-02 Thread Michal Mazurek
compat options are defined in the syscalls.conf file, and the ; compat option name is prefixed to the syscall name. Other than -- Michal Mazurek

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 introduction in

Futexes for OpenBSD

2016-09-02 Thread Michal Mazurek
,15 @@ struct sys___set_tcb_args { syscallarg(void *) tcb; }; +struct sys_futex_args { + syscallarg(void *) uaddr; + syscallarg(int) futex_op; + syscallarg(int) val; + syscallarg(const struct timespec *) tp; + syscallarg(int *) uaddr2; + syscallarg(int) val3; +}; + /* * System call prototypes. */ @@ -1347,3 +1356,4 @@ int sys_symlinkat(struct proc *, void *, intsys_unlinkat(struct proc *, void *, register_t *); intsys___set_tcb(struct proc *, void *, register_t *); intsys___get_tcb(struct proc *, void *, register_t *); +intsys_futex(struct proc *, void *, register_t *); -- Michal Mazurek

Better wording in ping error messages

2016-09-02 Thread Michal Mazurek
errx(1, "rtable value is %s: %s; provide a " + "value between 0 and %d inclusive", errstr, + optarg, RT_TABLEID_MAX); if (setsockopt(s, SOL_SOCKET, SO_RTABLE, , sizeof(rtableid)) == -1) err(1, "setsockopt SO_RTABLE"); -- Michal Mazurek

Re: Better wording in ping error messages

2016-09-02 Thread Michal Mazurek
On 12:12:11, 2.09.16, Ted Unangst wrote: > Michal Mazurek wrote: > > worms(6) does this more concisely: > > > > errx(1, "length (2-1024) is %s: %s", errstr, > > there's multiple schools of thought here, but i've always preferred somewhat > shorter e

Mention the maximum packet size in ping.8

2016-09-02 Thread Michal Mazurek
@@ -176,6 +176,7 @@ Specifies the number of data bytes to be The default is 56, which translates into 64 ICMP data bytes when combined with the 8 bytes of ICMP header data. +The maximum packet size is 65467. .It Fl T Ar toskeyword Change IPv4 TOS value. .Ar toskeyword -- Michal Mazurek

Remove mention of deprecated flags in ping6.8

2016-09-02 Thread Michal Mazurek
v -- Michal Mazurek

Re: thrsleep: remove ticket lock support

2016-09-03 Thread Michal Mazurek
_VISIBLE -#define__CLOCK_USE_TICKET_LOCKS8 /* flag for __thrsleep() */ - /* * Per-process and per-thread clocks encode the PID or TID into the * high bits, with the type in the bottom bits -- Michal Mazurek

thrsleep: remove ticket lock support

2016-09-03 Thread Michal Mazurek
/* flag for __thrsleep() */ - /* * Per-process and per-thread clocks encode the PID or TID into the * high bits, with the type in the bottom bits -- Michal Mazurek

Remove _USING_TICKETS from librthreads

2016-09-03 Thread Michal Mazurek
error = __thrsleep(self, 0 | _USING_TICKETS, NULL, - >lock.ticket, >delayed_cancel); + error = __thrsleep(self, 0, NULL, >lock.ticket, + >delayed_cancel); /* * If we took a normal signal (not from -- Michal Mazurek

Mention the maximum packet size in ping6.8

2016-09-03 Thread Michal Mazurek
going packets. .It Fl v -- Michal Mazurek

__thrsleep.2 tweak

2016-09-03 Thread Michal Mazurek
clock_gettime 2 +clock id. .El .Pp .Fn __thrwakeup -- Michal Mazurek

Remove tickets from librthreads

2016-09-03 Thread Michal Mazurek
000 1.17 +++ lib/librthread/rthread_tls.c3 Sep 2016 19:41:55 - @@ -27,7 +27,7 @@ #include "rthread.h" static struct rthread_key rkeys[PTHREAD_KEYS_MAX]; -static struct _spinlock rkeyslock = _SPINLOCK_UNLOCKED; +static _atomic_lock_t rkeyslock = _SPINLOCK_UNLOCKED; int pthread_key_create(pthread_key_t *key, void (*destructor)(void*)) -- Michal Mazurek

sys_process.c: remove relebad

2016-09-01 Thread Michal Mazurek
(uap, pid) < THREAD_PID_OFFSET && tr->ps_single) -- Michal Mazurek

  1   2   >