CVS commit: src/libexec/ld.elf_so/arch/riscv
Module Name:src Committed By: skrll Date: Mon Dec 5 07:33:43 UTC 2022 Modified Files: src/libexec/ld.elf_so/arch/riscv: rtld_start.S Log Message: Use the SZREG symbol instead of __SIZEOF_POINTER__ as its shorter. Assert that they're the same just in case. Sprinkle some KNF whitespace while I'm here. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/libexec/ld.elf_so/arch/riscv/rtld_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/arch/riscv/rtld_start.S diff -u src/libexec/ld.elf_so/arch/riscv/rtld_start.S:1.4 src/libexec/ld.elf_so/arch/riscv/rtld_start.S:1.5 --- src/libexec/ld.elf_so/arch/riscv/rtld_start.S:1.4 Sun Dec 4 17:04:06 2022 +++ src/libexec/ld.elf_so/arch/riscv/rtld_start.S Mon Dec 5 07:33:43 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld_start.S,v 1.4 2022/12/04 17:04:06 skrll Exp $ */ +/* $NetBSD: rtld_start.S,v 1.5 2022/12/05 07:33:43 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -34,6 +34,10 @@ .globl _C_LABEL(_rtld_relocate_nonplt_self) .globl _C_LABEL(_rtld) +#if __SIZEOF_POINTER__ != SZREG +#error SZREG is the wrong size +#endif + /* * void * ___start(void (*cleanup)(void), @@ -42,10 +46,10 @@ */ ENTRY(_rtld_start) mv s0, sp # save stack pointer - addi sp, sp, -4*__SIZEOF_POINTER__ + addi sp, sp, -4 * SZREG # adjust stack pointer - # -> 2*PTR_SIZE(sp) for atexit - # -> 3*PTR_SIZE(sp) for obj_main + # -> 2 * PTR_SIZE(sp) for atexit + # -> 3 * PTR_SIZE(sp) for obj_main mv s1, a2 # save ps_strings pointer .L0: auipc gp, %pcrel_hi(_GLOBAL_OFFSET_TABLE_) @@ -57,28 +61,28 @@ ENTRY(_rtld_start) call _C_LABEL(_rtld_relocate_nonplt_self) mv a1, s2 # relocbase - addi a0, sp, 2*__SIZEOF_POINTER__ # sp + addi a0, sp, 2 * SZREG # sp call _C_LABEL(_rtld) # a0 = _rtld(sp, relocbase) mv t0, a0 - PTR_L a0, 2*__SIZEOF_POINTER__(sp) # cleanup function - PTR_L a1, 3*__SIZEOF_POINTER__(sp) # obj_main entry + PTR_L a0, 2 * SZREG(sp) # cleanup function + PTR_L a1, 3 * SZREG(sp) # obj_main entry mv a2, s1 # restore ps_strings mv sp, s0 # readjust stack mv s0, zero # break stack chain jr t0 # _start(cleanup, obj_main, ps_strings); END(_rtld_start) -#define XCALLFRAME_SIZ (12*SZREG) -#define XCALLFRAME_RA (8*SZREG) -#define XCALLFRAME_A7 (7*SZREG) -#define XCALLFRAME_A6 (6*SZREG) -#define XCALLFRAME_A5 (5*SZREG) -#define XCALLFRAME_A4 (4*SZREG) -#define XCALLFRAME_A3 (3*SZREG) -#define XCALLFRAME_A2 (2*SZREG) -#define XCALLFRAME_A1 (1*SZREG) -#define XCALLFRAME_A0 (0*SZREG) +#define XCALLFRAME_SIZ (12 * SZREG) +#define XCALLFRAME_RA ( 8 * SZREG) +#define XCALLFRAME_A7 ( 7 * SZREG) +#define XCALLFRAME_A6 ( 6 * SZREG) +#define XCALLFRAME_A5 ( 5 * SZREG) +#define XCALLFRAME_A4 ( 4 * SZREG) +#define XCALLFRAME_A3 ( 3 * SZREG) +#define XCALLFRAME_A2 ( 2 * SZREG) +#define XCALLFRAME_A1 ( 1 * SZREG) +#define XCALLFRAME_A0 ( 0 * SZREG) /* * t0 = obj pointer
CVS commit: src/libexec/ld.elf_so/arch/riscv
Module Name:src Committed By: skrll Date: Mon Dec 5 07:33:43 UTC 2022 Modified Files: src/libexec/ld.elf_so/arch/riscv: rtld_start.S Log Message: Use the SZREG symbol instead of __SIZEOF_POINTER__ as its shorter. Assert that they're the same just in case. Sprinkle some KNF whitespace while I'm here. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/libexec/ld.elf_so/arch/riscv/rtld_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/libexec/ld.elf_so/arch/riscv
Module Name:src Committed By: skrll Date: Mon Dec 5 07:26:25 UTC 2022 Modified Files: src/libexec/ld.elf_so/arch/riscv: mdreloc.c Log Message: RISC-V is RELA To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/libexec/ld.elf_so/arch/riscv/mdreloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/libexec/ld.elf_so/arch/riscv
Module Name:src Committed By: skrll Date: Mon Dec 5 07:26:25 UTC 2022 Modified Files: src/libexec/ld.elf_so/arch/riscv: mdreloc.c Log Message: RISC-V is RELA To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/libexec/ld.elf_so/arch/riscv/mdreloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/arch/riscv/mdreloc.c diff -u src/libexec/ld.elf_so/arch/riscv/mdreloc.c:1.6 src/libexec/ld.elf_so/arch/riscv/mdreloc.c:1.7 --- src/libexec/ld.elf_so/arch/riscv/mdreloc.c:1.6 Sat Dec 3 09:39:44 2022 +++ src/libexec/ld.elf_so/arch/riscv/mdreloc.c Mon Dec 5 07:26:25 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: mdreloc.c,v 1.6 2022/12/03 09:39:44 skrll Exp $ */ +/* $NetBSD: mdreloc.c,v 1.7 2022/12/05 07:26:25 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: mdreloc.c,v 1.6 2022/12/03 09:39:44 skrll Exp $"); +__RCSID("$NetBSD: mdreloc.c,v 1.7 2022/12/05 07:26:25 skrll Exp $"); #endif /* not lint */ #include @@ -206,15 +206,15 @@ _rtld_relocate_plt_lazy(Obj_Entry *obj) } static int -_rtld_relocate_plt_object(const Obj_Entry *obj, const Elf_Rel *rel, +_rtld_relocate_plt_object(const Obj_Entry *obj, const Elf_Rela *rela, Elf_Addr *tp) { const Obj_Entry *defobj; Elf_Addr new_value; -assert(ELF_R_TYPE(rel->r_info) == R_TYPE(JMP_SLOT)); +assert(ELF_R_TYPE(rela->r_info) == R_TYPE(JMP_SLOT)); - const Elf_Sym *def = _rtld_find_plt_symdef(ELF_R_SYM(rel->r_info), + const Elf_Sym *def = _rtld_find_plt_symdef(ELF_R_SYM(rela->r_info), obj, , tp != NULL); if (__predict_false(def == NULL)) return -1; @@ -230,7 +230,7 @@ _rtld_relocate_plt_object(const Obj_Entr } rdbg(("bind now/fixup in %s --> new=%p", defobj->strtab + def->st_name, (void *)new_value)); - *(Elf_Addr *)(obj->relocbase + rel->r_offset) = new_value; + *(Elf_Addr *)(obj->relocbase + rela->r_offset) = new_value; if (tp) *tp = new_value; @@ -240,7 +240,7 @@ _rtld_relocate_plt_object(const Obj_Entr void * _rtld_bind(const Obj_Entry *obj, Elf_Word reloff) { - const Elf_Rel *pltrel = (const Elf_Rel *)(obj->pltrel + reloff); + const Elf_Rela *pltrel = (const Elf_Rela *)(obj->pltrel + reloff); Elf_Addr new_value; int err; @@ -257,8 +257,8 @@ int _rtld_relocate_plt_objects(const Obj_Entry *obj) { - for (const Elf_Rel *rel = obj->pltrel; rel < obj->pltrellim; rel++) { - if (_rtld_relocate_plt_object(obj, rel, NULL) < 0) + for (const Elf_Rela *rela = obj->pltrela; rela < obj->pltrelalim; rela++) { + if (_rtld_relocate_plt_object(obj, rela, NULL) < 0) return -1; }
CVS commit: src/sys/kern
Module Name:src Committed By: skrll Date: Mon Dec 5 07:09:04 UTC 2022 Modified Files: src/sys/kern: kern_mutex.c Log Message: Simplify. Same code before and after. To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/sys/kern/kern_mutex.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_mutex.c diff -u src/sys/kern/kern_mutex.c:1.100 src/sys/kern/kern_mutex.c:1.101 --- src/sys/kern/kern_mutex.c:1.100 Wed Oct 26 23:21:19 2022 +++ src/sys/kern/kern_mutex.c Mon Dec 5 07:09:04 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_mutex.c,v 1.100 2022/10/26 23:21:19 riastradh Exp $ */ +/* $NetBSD: kern_mutex.c,v 1.101 2022/12/05 07:09:04 skrll Exp $ */ /*- * Copyright (c) 2002, 2006, 2007, 2008, 2019 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ #define __MUTEX_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.100 2022/10/26 23:21:19 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.101 2022/12/05 07:09:04 skrll Exp $"); #include #include @@ -145,20 +145,18 @@ do {\ #define MUTEX_SPIN_SPLRAISE(mtx) \ do { \ - struct cpu_info *x__ci; \ - int x__cnt, s; \ - s = splraiseipl(MUTEX_SPIN_IPL(mtx));\ - x__ci = curcpu(); \ - x__cnt = x__ci->ci_mtx_count--; \ + const int s = splraiseipl(MUTEX_SPIN_IPL(mtx)); \ + struct cpu_info * const x__ci = curcpu(); \ + const int x__cnt = x__ci->ci_mtx_count--; \ __insn_barrier(); \ if (x__cnt == 0) \ - x__ci->ci_mtx_oldspl = (s);\ + x__ci->ci_mtx_oldspl = s;\ } while (/* CONSTCOND */ 0) #define MUTEX_SPIN_SPLRESTORE(mtx) \ do { \ - struct cpu_info *x__ci = curcpu();\ - int s = x__ci->ci_mtx_oldspl; \ + struct cpu_info * const x__ci = curcpu(); \ + const int s = x__ci->ci_mtx_oldspl;\ __insn_barrier(); \ if (++(x__ci->ci_mtx_count) == 0)\ splx(s); \
CVS commit: src/sys/kern
Module Name:src Committed By: skrll Date: Mon Dec 5 07:09:04 UTC 2022 Modified Files: src/sys/kern: kern_mutex.c Log Message: Simplify. Same code before and after. To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/sys/kern/kern_mutex.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: skrll Date: Mon Dec 5 05:56:20 UTC 2022 Modified Files: src/sys/sys: param.h Log Message: Fix a comment. To generate a diff of this commit: cvs rdiff -u -r1.721 -r1.722 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.721 src/sys/sys/param.h:1.722 --- src/sys/sys/param.h:1.721 Thu Dec 1 00:48:05 2022 +++ src/sys/sys/param.h Mon Dec 5 05:56:20 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.721 2022/12/01 00:48:05 ryo Exp $ */ +/* $NetBSD: param.h,v 1.722 2022/12/05 05:56:20 skrll Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -259,7 +259,7 @@ /* * Round p (pointer or byte index) up to a correctly-aligned value for all - * data types (int, long, ...). The result is u_int and must be cast to + * data types (int, long, ...). The result is uintptr_t and must be cast to * any desired pointer type. * * ALIGNED_POINTER is a boolean macro that checks whether an address
CVS commit: src/sys/sys
Module Name:src Committed By: skrll Date: Mon Dec 5 05:56:20 UTC 2022 Modified Files: src/sys/sys: param.h Log Message: Fix a comment. To generate a diff of this commit: cvs rdiff -u -r1.721 -r1.722 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/tprof
Module Name:src Committed By: ryo Date: Mon Dec 5 05:02:45 UTC 2022 Modified Files: src/usr.sbin/tprof: tprof.c Log Message: fix build error with llvm To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/tprof/tprof.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/tprof/tprof.c diff -u src/usr.sbin/tprof/tprof.c:1.16 src/usr.sbin/tprof/tprof.c:1.17 --- src/usr.sbin/tprof/tprof.c:1.16 Thu Dec 1 00:43:27 2022 +++ src/usr.sbin/tprof/tprof.c Mon Dec 5 05:02:45 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: tprof.c,v 1.16 2022/12/01 00:43:27 ryo Exp $ */ +/* $NetBSD: tprof.c,v 1.17 2022/12/05 05:02:45 ryo Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ #include #ifndef lint -__RCSID("$NetBSD: tprof.c,v 1.16 2022/12/01 00:43:27 ryo Exp $"); +__RCSID("$NetBSD: tprof.c,v 1.17 2022/12/05 05:02:45 ryo Exp $"); #endif /* not lint */ #include @@ -98,8 +98,8 @@ u_int eventnamewidth[TPROF_MAXCOUNTERS]; static void tprof_list(int, char **); static void tprof_monitor_common(bool, int, char **) __dead; -static void tprof_monitor(int, char **); -static void tprof_count(int, char **); +static void tprof_monitor(int, char **) __dead; +static void tprof_count(int, char **) __dead; static struct cmdtab { const char *label;
CVS commit: src/usr.sbin/tprof
Module Name:src Committed By: ryo Date: Mon Dec 5 05:02:45 UTC 2022 Modified Files: src/usr.sbin/tprof: tprof.c Log Message: fix build error with llvm To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/tprof/tprof.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/rpc
Module Name:src Committed By: uwe Date: Sun Dec 4 23:02:57 UTC 2022 Modified Files: src/lib/libc/rpc: getnetpath.3 Log Message: getnetpath(3): Sprinkle some markup To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/rpc/getnetpath.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/rpc/getnetpath.3 diff -u src/lib/libc/rpc/getnetpath.3:1.6 src/lib/libc/rpc/getnetpath.3:1.7 --- src/lib/libc/rpc/getnetpath.3:1.6 Wed Apr 16 13:34:43 2003 +++ src/lib/libc/rpc/getnetpath.3 Sun Dec 4 23:02:57 2022 @@ -1,5 +1,5 @@ .\" @(#)getnetpath.3n 1.26 93/05/07 SMI; from SVr4 -.\" $NetBSD: getnetpath.3,v 1.6 2003/04/16 13:34:43 wiz Exp $ +.\" $NetBSD: getnetpath.3,v 1.7 2022/12/04 23:02:57 uwe Exp $ .\" Copyright 1989 AT .Dd April 22, 2000 .Dt GETNETPATH 3 @@ -25,37 +25,51 @@ network configuration database, .Pa /etc/netconfig , as it is .Dq filtered -by the NETPATH -environment variable (see -.Xr environ 7 ) . +by the +.Ev NETPATH +environment variable +.Po see +.Xr environ 7 +.Pc . See .Xr getnetconfig 3 for other routines that also access the network configuration database directly. -The NETPATH variable is a list of colon-separated network identifiers. +The +.Ev NETPATH +variable is a list of colon-separated network identifiers. .Pp .Fn getnetpath returns a pointer to the netconfig database entry corresponding to the first valid -NETPATH component. -The netconfig entry is formatted as a struct netconfig. +.Ev NETPATH +component. +The netconfig entry is formatted as a +.Vt struct netconfig . On each subsequent call, .Fn getnetpath returns a pointer to the netconfig entry that corresponds to the next -valid NETPATH component. +valid +.Ev NETPATH +component. .Fn getnetpath can thus be used to search the netconfig database for all networks -included in the NETPATH variable. -When NETPATH has been exhausted, +included in the +.Ev NETPATH +variable. +When +.Ev NETPATH +has been exhausted, .Fn getnetpath -returns NULL. +returns +.Dv NULL . .Pp A call to .Fn setnetpath .Dq binds to or .Dq rewinds -NETPATH. +.Ev NETPATH . .Fn setnetpath must be called before the first call to .Fn getnetpath @@ -64,14 +78,20 @@ It returns a handle that is used by .Fn getnetpath . .Pp .Fn getnetpath -silently ignores invalid NETPATH +silently ignores invalid +.Ev NETPATH components. -A NETPATH component is invalid if there is no corresponding +A +.Ev NETPATH +component is invalid if there is no corresponding entry in the netconfig database. .Pp -If the NETPATH variable is unset, +If the +.Ev NETPATH +variable is unset, .Fn getnetpath -behaves as if NETPATH +behaves as if +.Ev NETPATH were set to the sequence of .Dq default or @@ -84,26 +104,32 @@ order in which they are listed. .Fn endnetpath may be called to .Dq unbind -from NETPATH +from +.Ev NETPATH when processing is complete, releasing resources for reuse. Programmers should be aware, however, that .Fn endnetpath frees all memory allocated by .Fn getnetpath -for the struct netconfig data structure. +for the +.Vt struct netconfig +data structure. .Sh RETURN VALUES .Fn setnetpath returns a handle that is used by .Fn getnetpath . In case of an error, .Fn setnetpath -returns NULL. +returns +.Dv NULL . .Pp .Fn endnetpath -returns 0 on success and -1 on failure -(for example, if +returns 0 on success and \-1 on failure +.Po +for example, if .Fn setnetpath -was not called previously). +was not called previously +.Pc . .Fn nc_perror or .Fn nc_sperror @@ -114,10 +140,15 @@ See When first called, .Fn getnetpath returns a pointer to the netconfig database entry corresponding to the first -valid NETPATH component. -When NETPATH has been exhausted, +valid +.Ev NETPATH +component. +When +.Ev NETPATH +has been exhausted, .Fn getnetpath -returns NULL. +returns +.Dv NULL . .Sh SEE ALSO .Xr getnetconfig 3 , .Xr netconfig 5 ,
CVS commit: src/lib/libc/rpc
Module Name:src Committed By: uwe Date: Sun Dec 4 23:02:57 UTC 2022 Modified Files: src/lib/libc/rpc: getnetpath.3 Log Message: getnetpath(3): Sprinkle some markup To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/rpc/getnetpath.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libutil
Module Name:src Committed By: uwe Date: Sun Dec 4 22:51:43 UTC 2022 Modified Files: src/lib/libutil: login_cap.3 Log Message: login_cap(3): Markup fixes To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/libutil/login_cap.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libutil/login_cap.3 diff -u src/lib/libutil/login_cap.3:1.23 src/lib/libutil/login_cap.3:1.24 --- src/lib/libutil/login_cap.3:1.23 Sat Jan 23 07:21:18 2016 +++ src/lib/libutil/login_cap.3 Sun Dec 4 22:51:43 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: login_cap.3,v 1.23 2016/01/23 07:21:18 wiz Exp $ +.\" $NetBSD: login_cap.3,v 1.24 2022/12/04 22:51:43 uwe Exp $ .\" .\" Copyright (c) 1996,1997 Berkeley Software Design, Inc. All rights reserved. .\" @@ -76,25 +76,27 @@ The .Fn login_getclass function extracts the entry specified by -.Ar class +.Fa class (or -.Li default +.Ql default if -.Ar class +.Fa class is .Dv NULL or the empty string) from .Pa /etc/login.conf -(see -.Xr login.conf 5 ) . +.Po +see +.Xr login.conf 5 +.Pc . If the entry is found, a -.Li login_cap_t +.Vt login_cap_t pointer is returned. .Dv NULL is returned if the user class is not found. When the -.Li login_cap_t +.Vt login_cap_t structure is no longer needed, it should be freed by the .Fn login_close function. @@ -102,10 +104,11 @@ function. The .Fn login_getpwclass function is equivalent to: +.Pp .Dl login_getclass(pwd\ ? pwd->pw_class\ : NULL) .Pp Once -.Ar lc +.Fa lc has been returned by .Fn login_getclass , any of the other @@ -119,13 +122,13 @@ The and .Fn login_getcaptime functions all query the database entry for a field named -.Ar cap . +.Fa cap . If the field is found, its value is returned. If the field is not found, the value specified by -.Ar def +.Fa def is returned. If an error is encountered while trying to find the field, -.Ar err +.Fa err is returned. See .Xr login.conf 5 @@ -134,23 +137,26 @@ The .Fn login_getcapbool function is slightly different. It returns -.Ar def -if no capabilities were found for this class (typically meaning that +.Fa def +if no capabilities were found for this class +.Po +typically meaning that the default class was used and the -.Li /etc/login.conf -file is missing). +.Pa /etc/login.conf +file is missing +.Pc . It returns a non-zero value if -.Ar cap , +.Fa cap , with no value, was found, zero otherwise. .Pp The .Fn setclasscontext function takes -.Ar class , +.Fa class , the name of a user class, and sets the resources defined by that class according to -.Ar flags . +.Fa flags . Only the .Dv LOGIN_SETPATH , .Dv LOGIN_SETPRIORITY , @@ -158,88 +164,89 @@ Only the and .Dv LOGIN_SETUMASK bits are used. -(See +.Po +See .Fn setusercontext -below). -It returns 0 on success and -1 on failure. +below +.Pc . +It returns 0 on success and \-1 on failure. .Pp The .Fn setusercontext function sets the resources according to -.Ar flags . +.Fa flags . The -.Ar lc +.Fa lc argument, if not .Dv NULL , contains the class information that should be used. The -.Ar pwd +.Fa pwd argument, if not .Dv NULL , provides information about the user. -Both -.Ar lc +.Fa lc and -.Ar pwd -cannot be +.Fa pwd +cannot both be .Dv NULL . The -.Ar uid +.Fa uid argument is used in place of the user id contained in the -.Ar pwd +.Fa pwd structure when calling .Xr setuid 2 . The various bits available to be or-ed together to make up -.Ar flags +.Fa flags are: -.Bl -tag -width LOGIN_SETRESOURCESXX -.It LOGIN_SETGID +.Bl -tag -width Dv +.It Dv LOGIN_SETGID Set the group id. Requires the -.Ar pwd +.Fa pwd field be specified. -.It LOGIN_SETGROUPS +.It Dv LOGIN_SETGROUPS Set the group membership list by calling .Xr initgroups 3 . Requires the -.Ar pwd +.Fa pwd field be specified. -.It LOGIN_SETGROUP +.It Dv LOGIN_SETGROUP Set the group id and call .Xr initgroups 3 . Requires the -.Ar pwd +.Fa pwd field be specified. -.It LOGIN_SETLOGIN +.It Dv LOGIN_SETLOGIN Sets the login name by .Xr setlogin 2 . Requires the -.Ar pwd +.Fa pwd field be specified. -.It LOGIN_SETPATH +.It Dv LOGIN_SETPATH Sets the .Ev PATH environment variable. -.It LOGIN_SETPRIORITY +.It Dv LOGIN_SETPRIORITY Sets the priority by .Xr setpriority 2 . -.It LOGIN_SETRESOURCES +.It Dv LOGIN_SETRESOURCES Sets the various system resources by .Xr setrlimit 2 . -.It LOGIN_SETUMASK +.It Dv LOGIN_SETUMASK Sets the umask by .Xr umask 2 . -.It LOGIN_SETUSER +.It Ev LOGIN_SETUSER Sets the user id to -.Ar uid +.Fa uid by .Xr setuid 2 . -.It LOGIN_SETENV +.It Dv LOGIN_SETENV Sets the environment variables as defined by the setenv keyword, by .Xr setenv 3 . -.It LOGIN_SETALL +.It Dv LOGIN_SETALL Sets all of the above. .El .Sh SEE ALSO
CVS commit: src/lib/libutil
Module Name:src Committed By: uwe Date: Sun Dec 4 22:51:43 UTC 2022 Modified Files: src/lib/libutil: login_cap.3 Log Message: login_cap(3): Markup fixes To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/libutil/login_cap.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: jakllsch Date: Sun Dec 4 22:35:15 UTC 2022 Modified Files: src/doc: HACKS src/lib/libc/gdtoa: Makefile.inc Log Message: On VAX, compile gdtoa/misc.c at -O0 to avoid incorrect machine code resulting in some doubles printing as garbage. To generate a diff of this commit: cvs rdiff -u -r1.231 -r1.232 src/doc/HACKS cvs rdiff -u -r1.11 -r1.12 src/lib/libc/gdtoa/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/HACKS diff -u src/doc/HACKS:1.231 src/doc/HACKS:1.232 --- src/doc/HACKS:1.231 Mon Sep 12 08:11:51 2022 +++ src/doc/HACKS Sun Dec 4 22:35:15 2022 @@ -1,4 +1,4 @@ -# $NetBSD: HACKS,v 1.231 2022/09/12 08:11:51 rin Exp $ +# $NetBSD: HACKS,v 1.232 2022/12/04 22:35:15 jakllsch Exp $ # # This file is intended to document workarounds for currently unsolved # (mostly) compiler bugs. @@ -592,6 +592,14 @@ port vax unitialized with -O1, works with -O0 kcah + hack gdtoa/misc.c miscompile + cdate Sun Dec 4 22:27:26 UTC 2022 + who jakllsch + file src/lib/libc/gdtoa/Makefile.inc : 1.11 + descr + some doubles print as garbage if gdtoa/misc.c isn't compiled at -O0 + kcah + port arm hack gcc-unsigned-compare Index: src/lib/libc/gdtoa/Makefile.inc diff -u src/lib/libc/gdtoa/Makefile.inc:1.11 src/lib/libc/gdtoa/Makefile.inc:1.12 --- src/lib/libc/gdtoa/Makefile.inc:1.11 Thu Aug 1 02:06:31 2019 +++ src/lib/libc/gdtoa/Makefile.inc Sun Dec 4 22:35:15 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.11 2019/08/01 02:06:31 riastradh Exp $ +# $NetBSD: Makefile.inc,v 1.12 2022/12/04 22:35:15 jakllsch Exp $ # gdtoa sources .PATH: ${.CURDIR}/gdtoa @@ -44,3 +44,10 @@ SRCS+= dmisc.c \ .if ${MACHINE_ARCH} != "vax" SRCS+= strtord.c .endif + +# XXX revisit with newer GCC. +# Ensure numbers like 0x319f5fa95963 print correctly +# ("999.98", not garbage like "?A>C>@>C:BA;A><.:<") +.if ${MACHINE_ARCH} == "vax" && defined(HAVE_GCC) +COPTS.misc.c+= -O0 +.endif
CVS commit: src
Module Name:src Committed By: jakllsch Date: Sun Dec 4 22:35:15 UTC 2022 Modified Files: src/doc: HACKS src/lib/libc/gdtoa: Makefile.inc Log Message: On VAX, compile gdtoa/misc.c at -O0 to avoid incorrect machine code resulting in some doubles printing as garbage. To generate a diff of this commit: cvs rdiff -u -r1.231 -r1.232 src/doc/HACKS cvs rdiff -u -r1.11 -r1.12 src/lib/libc/gdtoa/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/sys
Module Name:src Committed By: uwe Date: Sun Dec 4 19:01:19 UTC 2022 Modified Files: src/lib/libc/sys: fcntl.2 Log Message: fcntl(2): Fix wrong markup in a couple of places To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/lib/libc/sys/fcntl.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/fcntl.2 diff -u src/lib/libc/sys/fcntl.2:1.48 src/lib/libc/sys/fcntl.2:1.49 --- src/lib/libc/sys/fcntl.2:1.48 Sun Dec 4 11:25:09 2022 +++ src/lib/libc/sys/fcntl.2 Sun Dec 4 19:01:19 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: fcntl.2,v 1.48 2022/12/04 11:25:09 uwe Exp $ +.\" $NetBSD: fcntl.2,v 1.49 2022/12/04 19:01:19 uwe Exp $ .\" .\" Copyright (c) 1983, 1993 .\" The Regents of the University of California. All rights reserved. @@ -143,7 +143,7 @@ The argument is interpreted as an int. .It Dv F_CLOSEM Close all file descriptors greater than or equal to -.Ar fd . +.Fa fd . .It Dv F_MAXFD Return the maximum file descriptor number currently open by the process. .It Dv F_GETNOSIGPIPE @@ -161,7 +161,7 @@ in the buffer pointed to by .Fa arg . .Fa arg should be pointing to a buffer of at least -.Fa MAXPATHLEN . +.Dv MAXPATHLEN . .El .Pp The set of valid flags for the
CVS commit: src/lib/libc/sys
Module Name:src Committed By: uwe Date: Sun Dec 4 19:01:19 UTC 2022 Modified Files: src/lib/libc/sys: fcntl.2 Log Message: fcntl(2): Fix wrong markup in a couple of places To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/lib/libc/sys/fcntl.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: skrll Date: Sun Dec 4 17:04:07 UTC 2022 Modified Files: src/lib/libc/arch/riscv/gen: __setjmp14.S _setjmp.S src/lib/libc/arch/riscv/sys: brk.S sbrk.S src/libexec/ld.elf_so/arch/riscv: rtld_start.S Log Message: Consistently use the 'mv' instrucation (which is itself an alias) instead of the (old) alternative alias 'move'. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/riscv/gen/__setjmp14.S \ src/lib/libc/arch/riscv/gen/_setjmp.S cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/riscv/sys/brk.S \ src/lib/libc/arch/riscv/sys/sbrk.S cvs rdiff -u -r1.3 -r1.4 src/libexec/ld.elf_so/arch/riscv/rtld_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/riscv/gen/__setjmp14.S diff -u src/lib/libc/arch/riscv/gen/__setjmp14.S:1.2 src/lib/libc/arch/riscv/gen/__setjmp14.S:1.3 --- src/lib/libc/arch/riscv/gen/__setjmp14.S:1.2 Fri Mar 27 06:44:28 2015 +++ src/lib/libc/arch/riscv/gen/__setjmp14.S Sun Dec 4 17:04:06 2022 @@ -1,10 +1,10 @@ -/* $NetBSD: __setjmp14.S,v 1.2 2015/03/27 06:44:28 matt Exp $ */ +/* $NetBSD: __setjmp14.S,v 1.3 2022/12/04 17:04:06 skrll Exp $ */ #include "SYS.h" #include "assym.h" #if defined(LIBC_SCCS) -__RCSID("$NetBSD: __setjmp14.S,v 1.2 2015/03/27 06:44:28 matt Exp $") +__RCSID("$NetBSD: __setjmp14.S,v 1.3 2022/12/04 17:04:06 skrll Exp $") #endif /* @@ -94,7 +94,7 @@ ENTRY(__longjmp14) fld fs10, JB_FS10(a0) /* restore callee saved register */ fld fs11, JB_FS11(a0) /* restore callee saved register */ #endif - move t1, a1 /* save return value */ + mv t1, a1 /* save return value */ li a2, 0 addi a1, a0, JB_SIGMASK /* */ li a0, SIG_SETMASK @@ -102,6 +102,6 @@ ENTRY(__longjmp14) nop /* error */ li a0, 1 /* success */ /* default return value */ beqz t1, 1f /* test return value */ - move a0, t1 /* use it if not 0 */ + mv a0, t1 /* use it if not 0 */ 1: ret END(__longjmp14) Index: src/lib/libc/arch/riscv/gen/_setjmp.S diff -u src/lib/libc/arch/riscv/gen/_setjmp.S:1.2 src/lib/libc/arch/riscv/gen/_setjmp.S:1.3 --- src/lib/libc/arch/riscv/gen/_setjmp.S:1.2 Fri Mar 27 06:44:28 2015 +++ src/lib/libc/arch/riscv/gen/_setjmp.S Sun Dec 4 17:04:06 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: _setjmp.S,v 1.2 2015/03/27 06:44:28 matt Exp $ */ +/* $NetBSD: _setjmp.S,v 1.3 2022/12/04 17:04:06 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include "assym.h" #if defined(LIBC_SCCS) -__RCSID("$NetBSD: _setjmp.S,v 1.2 2015/03/27 06:44:28 matt Exp $") +__RCSID("$NetBSD: _setjmp.S,v 1.3 2022/12/04 17:04:06 skrll Exp $") #endif /* @@ -119,6 +119,6 @@ ENTRY(_longjmp) #endif li a0, 1 /* default return value */ beqz a1, 1f /* test return value */ - move a0, a1 /* use it if not 0 */ + mv a0, a1 /* use it if not 0 */ 1: ret END(_longjmp) Index: src/lib/libc/arch/riscv/sys/brk.S diff -u src/lib/libc/arch/riscv/sys/brk.S:1.4 src/lib/libc/arch/riscv/sys/brk.S:1.5 --- src/lib/libc/arch/riscv/sys/brk.S:1.4 Tue Mar 31 11:59:41 2015 +++ src/lib/libc/arch/riscv/sys/brk.S Sun Dec 4 17:04:06 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: brk.S,v 1.4 2015/03/31 11:59:41 matt Exp $ */ +/* $NetBSD: brk.S,v 1.5 2022/12/04 17:04:06 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: brk.S,v 1.4 2015/03/31 11:59:41 matt Exp $") + RCSID("$NetBSD: brk.S,v 1.5 2022/12/04 17:04:06 skrll Exp $") #endif /* LIBC_SCCS and not lint */ .hidden _C_LABEL(__minbrk) @@ -58,11 +58,11 @@ ENTRY(_brk) lla t1, _C_LABEL(__minbrk) PTR_L t5, 0(t1) bgeu a0, t5, 1f - move a0, t5 # dont allow break < minbrk + mv a0, t5 # dont allow break < minbrk 1: SYSTRAP(break) JUMP_TO_CERROR()/* error */ PTR_S a0, __SIZEOF_POINTER__(t1) /* success */ - move a0, zero + mv a0, zero ret END(_brk) Index: src/lib/libc/arch/riscv/sys/sbrk.S diff -u src/lib/libc/arch/riscv/sys/sbrk.S:1.4 src/lib/libc/arch/riscv/sys/sbrk.S:1.5 --- src/lib/libc/arch/riscv/sys/sbrk.S:1.4 Tue Mar 31 11:59:41 2015 +++ src/lib/libc/arch/riscv/sys/sbrk.S Sun Dec 4 17:04:06 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: sbrk.S,v 1.4 2015/03/31 11:59:41 matt Exp $ */ +/* $NetBSD: sbrk.S,v 1.5 2022/12/04 17:04:06 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ ENTRY(_sbrk) SYSTRAP(break) JUMP_TO_CERROR() /* error */ PTR_S a0, 0(t1) // save current val of curbrk from above - move a0, t2 // return old val of curbrk from above + mv a0, t2 // return old val of curbrk from above ret 1: END(_sbrk) Index: src/libexec/ld.elf_so/arch/riscv/rtld_start.S diff -u src/libexec/ld.elf_so/arch/riscv/rtld_start.S:1.3 src/libexec/ld.elf_so/arch/riscv/rtld_start.S:1.4 --- src/libexec/ld.elf_so/arch/riscv/rtld_start.S:1.3 Sat Dec 3 09:39:44
CVS commit: src
Module Name:src Committed By: skrll Date: Sun Dec 4 17:04:07 UTC 2022 Modified Files: src/lib/libc/arch/riscv/gen: __setjmp14.S _setjmp.S src/lib/libc/arch/riscv/sys: brk.S sbrk.S src/libexec/ld.elf_so/arch/riscv: rtld_start.S Log Message: Consistently use the 'mv' instrucation (which is itself an alias) instead of the (old) alternative alias 'move'. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/riscv/gen/__setjmp14.S \ src/lib/libc/arch/riscv/gen/_setjmp.S cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/riscv/sys/brk.S \ src/lib/libc/arch/riscv/sys/sbrk.S cvs rdiff -u -r1.3 -r1.4 src/libexec/ld.elf_so/arch/riscv/rtld_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/regex
Module Name:src Committed By: uwe Date: Sun Dec 4 16:52:49 UTC 2022 Modified Files: src/lib/libc/regex: re_format.7 Log Message: re_format(7): Add subsection headings for ERE and BRE The first paragraph could use some rewording. While BRE may be obsolete, it's still the default for regcomp(3) and the default for grep(1), sed(1), etc. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/regex/re_format.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/regex/re_format.7 diff -u src/lib/libc/regex/re_format.7:1.15 src/lib/libc/regex/re_format.7:1.16 --- src/lib/libc/regex/re_format.7:1.15 Sun Aug 28 12:59:50 2022 +++ src/lib/libc/regex/re_format.7 Sun Dec 4 16:52:48 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: re_format.7,v 1.15 2022/08/28 12:59:50 uwe Exp $ +.\" $NetBSD: re_format.7,v 1.16 2022/12/04 16:52:48 uwe Exp $ .\" .\" Copyright (c) 1992, 1993, 1994 Henry Spencer. .\" Copyright (c) 1992, 1993, 1994 @@ -69,7 +69,7 @@ leaves some aspects of RE syntax and sem may not be fully portable to other .St -p1003.2 implementations. -.Pp +.Ss Extended regular expressions A (modern) RE is one\*(DG or more non-empty\*(DG .Em branches , separated by @@ -383,7 +383,7 @@ Programs intended to be portable should than 256 bytes, as an implementation can refuse to accept such REs and remain POSIX-compliant. -.Pp +.Ss Basic regular expressions Obsolete .Pq Dq basic regular expressions differ in several respects.
CVS commit: src/lib/libc/regex
Module Name:src Committed By: uwe Date: Sun Dec 4 16:52:49 UTC 2022 Modified Files: src/lib/libc/regex: re_format.7 Log Message: re_format(7): Add subsection headings for ERE and BRE The first paragraph could use some rewording. While BRE may be obsolete, it's still the default for regcomp(3) and the default for grep(1), sed(1), etc. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/regex/re_format.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/riscv/riscv
Module Name:src Committed By: skrll Date: Sun Dec 4 16:29:35 UTC 2022 Modified Files: src/sys/arch/riscv/riscv: cpu_switch.S Log Message: Restore t5 and t6 from the correct locations in exception_kernexit. >From Simon. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/riscv/riscv/cpu_switch.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/riscv/riscv/cpu_switch.S diff -u src/sys/arch/riscv/riscv/cpu_switch.S:1.1 src/sys/arch/riscv/riscv/cpu_switch.S:1.2 --- src/sys/arch/riscv/riscv/cpu_switch.S:1.1 Fri Oct 14 07:58:30 2022 +++ src/sys/arch/riscv/riscv/cpu_switch.S Sun Dec 4 16:29:35 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_switch.S,v 1.1 2022/10/14 07:58:30 skrll Exp $ */ +/* $NetBSD: cpu_switch.S,v 1.2 2022/12/04 16:29:35 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -278,8 +278,8 @@ exception_kernexit: REG_L t2, TF_T2(sp) // restore t2 REG_L t3, TF_T3(sp) // restore t3 REG_L t4, TF_T4(sp) // restore t4 - REG_L t5, TF_T3(sp) // restore t5 - REG_L t6, TF_T4(sp) // restore t6 + REG_L t5, TF_T5(sp) // restore t5 + REG_L t6, TF_T6(sp) // restore t6 REG_L t0, TF_PC(sp) // fetch exception PC REG_L t1, TF_SR(sp) // fetch status
CVS commit: src/sys/arch/riscv/riscv
Module Name:src Committed By: skrll Date: Sun Dec 4 16:29:35 UTC 2022 Modified Files: src/sys/arch/riscv/riscv: cpu_switch.S Log Message: Restore t5 and t6 from the correct locations in exception_kernexit. >From Simon. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/riscv/riscv/cpu_switch.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/riscv/riscv
Module Name:src Committed By: skrll Date: Sun Dec 4 16:23:48 UTC 2022 Modified Files: src/sys/arch/riscv/riscv: vm_machdep.c Log Message: ASSERT that md_astpending it zero for the new lwp. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/riscv/riscv/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/riscv/riscv/vm_machdep.c diff -u src/sys/arch/riscv/riscv/vm_machdep.c:1.6 src/sys/arch/riscv/riscv/vm_machdep.c:1.7 --- src/sys/arch/riscv/riscv/vm_machdep.c:1.6 Tue Nov 15 14:33:33 2022 +++ src/sys/arch/riscv/riscv/vm_machdep.c Sun Dec 4 16:23:48 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.6 2022/11/15 14:33:33 simonb Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.7 2022/12/04 16:23:48 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.6 2022/11/15 14:33:33 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.7 2022/12/04 16:23:48 skrll Exp $"); #define _PMAP_PRIVATE @@ -77,8 +77,7 @@ cpu_lwp_fork(struct lwp *l1, struct lwp struct trapframe *tf; KASSERT(l1 == curlwp || l1 == ); - - l2->l_md.md_astpending = 0; + KASSERT(l2->l_md.md_astpending == 0); /* Copy the PCB from parent. */ *pcb2 = *pcb1;
CVS commit: src/sys/arch/riscv/riscv
Module Name:src Committed By: skrll Date: Sun Dec 4 16:23:48 UTC 2022 Modified Files: src/sys/arch/riscv/riscv: vm_machdep.c Log Message: ASSERT that md_astpending it zero for the new lwp. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/riscv/riscv/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/sys
Module Name:src Committed By: uwe Date: Sun Dec 4 16:21:54 UTC 2022 Modified Files: src/lib/libc/sys: _lwp_suspend.2 _lwp_wait.2 _lwp_wakeup.2 Log Message: Bump date for the fixed RETURN VALUES in previous To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/sys/_lwp_suspend.2 cvs rdiff -u -r1.6 -r1.7 src/lib/libc/sys/_lwp_wait.2 \ src/lib/libc/sys/_lwp_wakeup.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/sys
Module Name:src Committed By: uwe Date: Sun Dec 4 16:21:54 UTC 2022 Modified Files: src/lib/libc/sys: _lwp_suspend.2 _lwp_wait.2 _lwp_wakeup.2 Log Message: Bump date for the fixed RETURN VALUES in previous To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/sys/_lwp_suspend.2 cvs rdiff -u -r1.6 -r1.7 src/lib/libc/sys/_lwp_wait.2 \ src/lib/libc/sys/_lwp_wakeup.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/_lwp_suspend.2 diff -u src/lib/libc/sys/_lwp_suspend.2:1.5 src/lib/libc/sys/_lwp_suspend.2:1.6 --- src/lib/libc/sys/_lwp_suspend.2:1.5 Sun Dec 4 16:17:50 2022 +++ src/lib/libc/sys/_lwp_suspend.2 Sun Dec 4 16:21:54 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: _lwp_suspend.2,v 1.5 2022/12/04 16:17:50 uwe Exp $ +.\" $NetBSD: _lwp_suspend.2,v 1.6 2022/12/04 16:21:54 uwe Exp $ .\" .\" Copyright (c) 2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 13, 2003 +.Dd December 4, 2022 .Dt _LWP_SUSPEND 2 .Os .Sh NAME Index: src/lib/libc/sys/_lwp_wait.2 diff -u src/lib/libc/sys/_lwp_wait.2:1.6 src/lib/libc/sys/_lwp_wait.2:1.7 --- src/lib/libc/sys/_lwp_wait.2:1.6 Sun Dec 4 16:17:50 2022 +++ src/lib/libc/sys/_lwp_wait.2 Sun Dec 4 16:21:54 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: _lwp_wait.2,v 1.6 2022/12/04 16:17:50 uwe Exp $ +.\" $NetBSD: _lwp_wait.2,v 1.7 2022/12/04 16:21:54 uwe Exp $ .\" .\" Copyright (c) 2003, 2020 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 23, 2020 +.Dd December 4, 2022 .Dt _LWP_WAIT 2 .Os .Sh NAME Index: src/lib/libc/sys/_lwp_wakeup.2 diff -u src/lib/libc/sys/_lwp_wakeup.2:1.6 src/lib/libc/sys/_lwp_wakeup.2:1.7 --- src/lib/libc/sys/_lwp_wakeup.2:1.6 Sun Dec 4 16:17:50 2022 +++ src/lib/libc/sys/_lwp_wakeup.2 Sun Dec 4 16:21:54 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: _lwp_wakeup.2,v 1.6 2022/12/04 16:17:50 uwe Exp $ +.\" $NetBSD: _lwp_wakeup.2,v 1.7 2022/12/04 16:21:54 uwe Exp $ .\" .\" Copyright (c) 2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 13, 2003 +.Dd December 4, 2022 .Dt _LWP_WAKEUP 2 .Os .Sh NAME
CVS commit: src/lib/libc/sys
Module Name:src Committed By: uwe Date: Sun Dec 4 16:17:50 UTC 2022 Modified Files: src/lib/libc/sys: _lwp_create.2 _lwp_ctl.2 _lwp_detach.2 _lwp_getname.2 _lwp_kill.2 _lwp_park.2 _lwp_setname.2 _lwp_suspend.2 _lwp_unpark.2 _lwp_unpark_all.2 _lwp_wait.2 _lwp_wakeup.2 Log Message: Tweak markup in _lwp_*(2) manual pages Use .Rv where possible. Some manual pages claimed that the error "is returned", but RTFS and some quick testing indicate that this is wrong. The commit message from 2003 says that: Note our current implementation mis-matches [man pages] slightly (error codes are stuffed into errno, where they should simply be returned by these calls). This will be addressed shortly. That hasn't happened in the 20 years, so we might as well make the man pages reflect the reality. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/sys/_lwp_create.2 cvs rdiff -u -r1.5 -r1.6 src/lib/libc/sys/_lwp_ctl.2 \ src/lib/libc/sys/_lwp_wait.2 src/lib/libc/sys/_lwp_wakeup.2 cvs rdiff -u -r1.4 -r1.5 src/lib/libc/sys/_lwp_detach.2 \ src/lib/libc/sys/_lwp_kill.2 src/lib/libc/sys/_lwp_suspend.2 \ src/lib/libc/sys/_lwp_unpark.2 cvs rdiff -u -r1.2 -r1.3 src/lib/libc/sys/_lwp_getname.2 \ src/lib/libc/sys/_lwp_setname.2 cvs rdiff -u -r1.12 -r1.13 src/lib/libc/sys/_lwp_park.2 cvs rdiff -u -r1.7 -r1.8 src/lib/libc/sys/_lwp_unpark_all.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/_lwp_create.2 diff -u src/lib/libc/sys/_lwp_create.2:1.10 src/lib/libc/sys/_lwp_create.2:1.11 --- src/lib/libc/sys/_lwp_create.2:1.10 Sun Dec 4 11:25:09 2022 +++ src/lib/libc/sys/_lwp_create.2 Sun Dec 4 16:17:50 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: _lwp_create.2,v 1.10 2022/12/04 11:25:09 uwe Exp $ +.\" $NetBSD: _lwp_create.2,v 1.11 2022/12/04 16:17:50 uwe Exp $ .\" .\" Copyright (c) 2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -51,20 +51,23 @@ The signal stack of the newly created li disabled. If this context specifies invalid register values (for example privilege escalation by setting machine dependent bits forbidden for user processes), -or does not specify cpu register values (uc_flags does not have the -_UC_CPU bit set), the call will fail and errno will be set to +or does not specify cpu register values +.Fa ( uc_flags +does not have the +.Dv _UC_CPU +bit set), the call will fail and errno will be set to .Er EINVAL . .Pp The following flags affect the creation of the new LWP: -.Bl -tag -width LWP_SUSPENDED -.It LWP_DETACHED +.Bl -tag -width Dv +.It Dv LWP_DETACHED The LWP is created detached. The resources associated with a detached LWP will be automatically reclaimed by the system when the LWP exits. Otherwise, a terminated LWP's resources will not be reclaimed until its status is reported to another LWP via .Xr _lwp_wait 2 . -.It LWP_SUSPENDED +.It Dv LWP_SUSPENDED The LWP is created suspended, and will not begin execution until it is resumed by another LWP via .Xr _lwp_continue 2 . @@ -74,15 +77,11 @@ it is resumed by another LWP via The LWP ID of the new LWP is stored in the location pointed to by .Fa new_lwp . .Sh RETURN VALUES -Upon successful completion, -.Fn _lwp_create -returns a value of 0. -Otherwise, a value of -1 is returned and errno is set to one of the values -documented below. +.Rv -std _lwp_create .Sh ERRORS .Fn _lwp_create will fail and no LWP will be created if: -.Bl -tag -width 10n +.Bl -tag -width Er .It Bq Er EAGAIN The system-imposed limit on the total number of LWPs under execution would be exceeded. @@ -94,7 +93,9 @@ or .Fa new_lwp is outside the process's allocated address space. .It Bq Er EINVAL -The ucontext_t passed is invalid. +The +.Vt ucontext_t +passed is invalid. .It Bq Er ENOMEM There is insufficient swap space for the new LWP. .El Index: src/lib/libc/sys/_lwp_ctl.2 diff -u src/lib/libc/sys/_lwp_ctl.2:1.5 src/lib/libc/sys/_lwp_ctl.2:1.6 --- src/lib/libc/sys/_lwp_ctl.2:1.5 Fri Apr 13 15:14:58 2012 +++ src/lib/libc/sys/_lwp_ctl.2 Sun Dec 4 16:17:50 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: _lwp_ctl.2,v 1.5 2012/04/13 15:14:58 yamt Exp $ +.\" $NetBSD: _lwp_ctl.2,v 1.6 2022/12/04 16:17:50 uwe Exp $ .\" .\" Copyright (c)2007 YAMAMOTO Takashi, .\" All rights reserved. @@ -49,7 +49,7 @@ It takes the following arguments. .Bl -tag -width features .It Fa features The bitwise-OR of the following flags. -.Bl -tag -width LWPCTL_FEATURE_CURCPU +.Bl -tag -width Dv .It Dv LWPCTL_FEATURE_CURCPU Request .Vt lc_curcpu . @@ -68,8 +68,8 @@ The per-LWP communication area is descri structure. It has following members, depending on .Fa features . -.Bl -tag -width int_lc_curcpu -.It Vt int lc_curcpu +.Bl -tag -width Fa +.It Vt int Fa lc_curcpu The integral identifier of the CPU on which the LWP is running, or .Dv LWPCTL_CPU_NONE @@ -79,10 +79,13 @@ userland. It's
CVS commit: src/lib/libc/sys
Module Name:src Committed By: uwe Date: Sun Dec 4 16:17:50 UTC 2022 Modified Files: src/lib/libc/sys: _lwp_create.2 _lwp_ctl.2 _lwp_detach.2 _lwp_getname.2 _lwp_kill.2 _lwp_park.2 _lwp_setname.2 _lwp_suspend.2 _lwp_unpark.2 _lwp_unpark_all.2 _lwp_wait.2 _lwp_wakeup.2 Log Message: Tweak markup in _lwp_*(2) manual pages Use .Rv where possible. Some manual pages claimed that the error "is returned", but RTFS and some quick testing indicate that this is wrong. The commit message from 2003 says that: Note our current implementation mis-matches [man pages] slightly (error codes are stuffed into errno, where they should simply be returned by these calls). This will be addressed shortly. That hasn't happened in the 20 years, so we might as well make the man pages reflect the reality. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/sys/_lwp_create.2 cvs rdiff -u -r1.5 -r1.6 src/lib/libc/sys/_lwp_ctl.2 \ src/lib/libc/sys/_lwp_wait.2 src/lib/libc/sys/_lwp_wakeup.2 cvs rdiff -u -r1.4 -r1.5 src/lib/libc/sys/_lwp_detach.2 \ src/lib/libc/sys/_lwp_kill.2 src/lib/libc/sys/_lwp_suspend.2 \ src/lib/libc/sys/_lwp_unpark.2 cvs rdiff -u -r1.2 -r1.3 src/lib/libc/sys/_lwp_getname.2 \ src/lib/libc/sys/_lwp_setname.2 cvs rdiff -u -r1.12 -r1.13 src/lib/libc/sys/_lwp_park.2 cvs rdiff -u -r1.7 -r1.8 src/lib/libc/sys/_lwp_unpark_all.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib
Module Name:src Committed By: uwe Date: Sun Dec 4 11:25:09 UTC 2022 Modified Files: src/lib/libc/compat-43: sigpause.3 sigvec.3 src/lib/libc/gen: glob.3 popen.3 siginterrupt.3 sysctl.3 vis.3 src/lib/libc/net: rcmd.3 src/lib/libc/stdlib: reallocarray.3 strtod.3 src/lib/libc/sys: _lwp_create.2 fcntl.2 wait.2 src/lib/libc/time: tzset.3 src/lib/libm/man: acos.3 acosh.3 atanh.3 cosh.3 sqrt.3 src/lib/libossaudio: ossaudio.3 src/lib/librmt: rmtops.3 src/lib/libutil: sockaddr_snprintf.3 Log Message: lib: Mark up error names in man pages with .Er To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/compat-43/sigpause.3 cvs rdiff -u -r1.26 -r1.27 src/lib/libc/compat-43/sigvec.3 cvs rdiff -u -r1.44 -r1.45 src/lib/libc/gen/glob.3 cvs rdiff -u -r1.24 -r1.25 src/lib/libc/gen/popen.3 cvs rdiff -u -r1.11 -r1.12 src/lib/libc/gen/siginterrupt.3 cvs rdiff -u -r1.206 -r1.207 src/lib/libc/gen/sysctl.3 cvs rdiff -u -r1.49 -r1.50 src/lib/libc/gen/vis.3 cvs rdiff -u -r1.29 -r1.30 src/lib/libc/net/rcmd.3 cvs rdiff -u -r1.6 -r1.7 src/lib/libc/stdlib/reallocarray.3 cvs rdiff -u -r1.29 -r1.30 src/lib/libc/stdlib/strtod.3 cvs rdiff -u -r1.9 -r1.10 src/lib/libc/sys/_lwp_create.2 cvs rdiff -u -r1.47 -r1.48 src/lib/libc/sys/fcntl.2 cvs rdiff -u -r1.41 -r1.42 src/lib/libc/sys/wait.2 cvs rdiff -u -r1.43 -r1.44 src/lib/libc/time/tzset.3 cvs rdiff -u -r1.18 -r1.19 src/lib/libm/man/acos.3 cvs rdiff -u -r1.17 -r1.18 src/lib/libm/man/acosh.3 src/lib/libm/man/atanh.3 cvs rdiff -u -r1.15 -r1.16 src/lib/libm/man/cosh.3 cvs rdiff -u -r1.14 -r1.15 src/lib/libm/man/sqrt.3 cvs rdiff -u -r1.27 -r1.28 src/lib/libossaudio/ossaudio.3 cvs rdiff -u -r1.16 -r1.17 src/lib/librmt/rmtops.3 cvs rdiff -u -r1.8 -r1.9 src/lib/libutil/sockaddr_snprintf.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib
Module Name:src Committed By: uwe Date: Sun Dec 4 11:25:09 UTC 2022 Modified Files: src/lib/libc/compat-43: sigpause.3 sigvec.3 src/lib/libc/gen: glob.3 popen.3 siginterrupt.3 sysctl.3 vis.3 src/lib/libc/net: rcmd.3 src/lib/libc/stdlib: reallocarray.3 strtod.3 src/lib/libc/sys: _lwp_create.2 fcntl.2 wait.2 src/lib/libc/time: tzset.3 src/lib/libm/man: acos.3 acosh.3 atanh.3 cosh.3 sqrt.3 src/lib/libossaudio: ossaudio.3 src/lib/librmt: rmtops.3 src/lib/libutil: sockaddr_snprintf.3 Log Message: lib: Mark up error names in man pages with .Er To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/compat-43/sigpause.3 cvs rdiff -u -r1.26 -r1.27 src/lib/libc/compat-43/sigvec.3 cvs rdiff -u -r1.44 -r1.45 src/lib/libc/gen/glob.3 cvs rdiff -u -r1.24 -r1.25 src/lib/libc/gen/popen.3 cvs rdiff -u -r1.11 -r1.12 src/lib/libc/gen/siginterrupt.3 cvs rdiff -u -r1.206 -r1.207 src/lib/libc/gen/sysctl.3 cvs rdiff -u -r1.49 -r1.50 src/lib/libc/gen/vis.3 cvs rdiff -u -r1.29 -r1.30 src/lib/libc/net/rcmd.3 cvs rdiff -u -r1.6 -r1.7 src/lib/libc/stdlib/reallocarray.3 cvs rdiff -u -r1.29 -r1.30 src/lib/libc/stdlib/strtod.3 cvs rdiff -u -r1.9 -r1.10 src/lib/libc/sys/_lwp_create.2 cvs rdiff -u -r1.47 -r1.48 src/lib/libc/sys/fcntl.2 cvs rdiff -u -r1.41 -r1.42 src/lib/libc/sys/wait.2 cvs rdiff -u -r1.43 -r1.44 src/lib/libc/time/tzset.3 cvs rdiff -u -r1.18 -r1.19 src/lib/libm/man/acos.3 cvs rdiff -u -r1.17 -r1.18 src/lib/libm/man/acosh.3 src/lib/libm/man/atanh.3 cvs rdiff -u -r1.15 -r1.16 src/lib/libm/man/cosh.3 cvs rdiff -u -r1.14 -r1.15 src/lib/libm/man/sqrt.3 cvs rdiff -u -r1.27 -r1.28 src/lib/libossaudio/ossaudio.3 cvs rdiff -u -r1.16 -r1.17 src/lib/librmt/rmtops.3 cvs rdiff -u -r1.8 -r1.9 src/lib/libutil/sockaddr_snprintf.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/compat-43/sigpause.3 diff -u src/lib/libc/compat-43/sigpause.3:1.15 src/lib/libc/compat-43/sigpause.3:1.16 --- src/lib/libc/compat-43/sigpause.3:1.15 Thu Aug 7 16:42:40 2003 +++ src/lib/libc/compat-43/sigpause.3 Sun Dec 4 11:25:08 2022 @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)sigpause.2 8.1 (Berkeley) 6/2/93 -.\" $NetBSD: sigpause.3,v 1.15 2003/08/07 16:42:40 agc Exp $ +.\" $NetBSD: sigpause.3,v 1.16 2022/12/04 11:25:08 uwe Exp $ .\" .Dd June 2, 1993 .Dt SIGPAUSE 3 @@ -59,7 +59,7 @@ signals are to be blocked. always terminates by being interrupted, returning -1 with .Va errno set to -.Dv EINTR . +.Er EINTR . .Sh SEE ALSO .Xr kill 2 , .Xr sigaction 2 , Index: src/lib/libc/compat-43/sigvec.3 diff -u src/lib/libc/compat-43/sigvec.3:1.26 src/lib/libc/compat-43/sigvec.3:1.27 --- src/lib/libc/compat-43/sigvec.3:1.26 Mon Mar 22 19:30:53 2010 +++ src/lib/libc/compat-43/sigvec.3 Sun Dec 4 11:25:08 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: sigvec.3,v 1.26 2010/03/22 19:30:53 joerg Exp $ +.\" $NetBSD: sigvec.3,v 1.27 2022/12/04 11:25:08 uwe Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -189,7 +189,7 @@ the call may be restarted, the call may return with a data transfer shorter than requested, or the call may be forced to terminate with the error -.Dv EINTR . +.Er EINTR . Interrupting of pending calls is requested by setting the .Dv SV_INTERRUPT Index: src/lib/libc/gen/glob.3 diff -u src/lib/libc/gen/glob.3:1.44 src/lib/libc/gen/glob.3:1.45 --- src/lib/libc/gen/glob.3:1.44 Wed May 29 01:21:33 2019 +++ src/lib/libc/gen/glob.3 Sun Dec 4 11:25:08 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: glob.3,v 1.44 2019/05/29 01:21:33 christos Exp $ +.\" $NetBSD: glob.3,v 1.45 2022/12/04 11:25:08 uwe Exp $ .\" .\" Copyright (c) 1989, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -316,9 +316,9 @@ is not a directory, resulting in a call to .Fa errfunc . The error routine can suppress this action by testing for -.Dv ENOENT +.Er ENOENT and -.Dv ENOTDIR ; +.Er ENOTDIR ; however, the .Dv GLOB_ERR flag will still cause an immediate Index: src/lib/libc/gen/popen.3 diff -u src/lib/libc/gen/popen.3:1.24 src/lib/libc/gen/popen.3:1.25 --- src/lib/libc/gen/popen.3:1.24 Sun Mar 27 00:32:15 2022 +++ src/lib/libc/gen/popen.3 Sun Dec 4 11:25:08 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: popen.3,v 1.24 2022/03/27 00:32:15 gutteridge Exp $ +.\" $NetBSD: popen.3,v 1.25 2022/12/04 11:25:08 uwe Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -163,7 +163,7 @@ command, if has already been .Dq pclosed , setting errno to -.Dv ESRCH , +.Er ESRCH , or if .Xr wait4 2 returns an error, preserving the errno returned by Index: src/lib/libc/gen/siginterrupt.3 diff -u src/lib/libc/gen/siginterrupt.3:1.11 src/lib/libc/gen/siginterrupt.3:1.12 --- src/lib/libc/gen/siginterrupt.3:1.11 Thu
CVS commit: src/lib/libc/sys
Module Name:src Committed By: uwe Date: Sun Dec 4 11:18:58 UTC 2022 Modified Files: src/lib/libc/sys: flock.2 Log Message: flock(2): s/Eq/Er/ typo in the ERRORS section To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/lib/libc/sys/flock.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/flock.2 diff -u src/lib/libc/sys/flock.2:1.24 src/lib/libc/sys/flock.2:1.25 --- src/lib/libc/sys/flock.2:1.24 Wed Jul 28 11:31:06 2021 +++ src/lib/libc/sys/flock.2 Sun Dec 4 11:18:58 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: flock.2,v 1.24 2021/07/28 11:31:06 wiz Exp $ +.\" $NetBSD: flock.2,v 1.25 2022/12/04 11:18:58 uwe Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -137,7 +137,7 @@ does not include exactly one of .Dv LOCK_SH , or .Dv LOCK_UN . -.It Bq Eq ENOMEM +.It Bq Er ENOMEM The file lock limit for the current unprivileged user has been reached. It can be modified using the
CVS commit: src/lib/libc/sys
Module Name:src Committed By: uwe Date: Sun Dec 4 11:18:58 UTC 2022 Modified Files: src/lib/libc/sys: flock.2 Log Message: flock(2): s/Eq/Er/ typo in the ERRORS section To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/lib/libc/sys/flock.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libutil
Module Name:src Committed By: uwe Date: Sun Dec 4 11:16:39 UTC 2022 Modified Files: src/lib/libutil: pw_init.3 Log Message: pw_init(3): Use .Ev for EDITOR To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libutil/pw_init.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libutil/pw_init.3 diff -u src/lib/libutil/pw_init.3:1.16 src/lib/libutil/pw_init.3:1.17 --- src/lib/libutil/pw_init.3:1.16 Mon Jul 3 21:32:51 2017 +++ src/lib/libutil/pw_init.3 Sun Dec 4 11:16:39 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: pw_init.3,v 1.16 2017/07/03 21:32:51 wiz Exp $ +.\" $NetBSD: pw_init.3,v 1.17 2022/12/04 11:16:39 uwe Exp $ .\" .\" Copyright (c) 1995 .\" The Regents of the University of California. All rights reserved. @@ -78,9 +78,13 @@ disabling most signals. .Pp The .Fn pw_edit -function runs an editor (named by the environment variable EDITOR, or +function runs an editor (named by the environment variable +.Ev EDITOR , +or .Pa /usr/bin/vi -if EDITOR is not set) on the file +if +.Ev EDITOR +is not set) on the file .Fa filename (or .Pa /etc/ptmp
CVS commit: src/lib/libutil
Module Name:src Committed By: uwe Date: Sun Dec 4 11:16:39 UTC 2022 Modified Files: src/lib/libutil: pw_init.3 Log Message: pw_init(3): Use .Ev for EDITOR To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libutil/pw_init.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: mlelstv Date: Sun Dec 4 09:25:04 UTC 2022 Modified Files: src/sys/dev/ic: bwfm.c Log Message: Make power save mode configurable by ifconfig, now defaults to non-powersave like other interfaces. Remove cargo-culted check for manual roaming. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/dev/ic/bwfm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/bwfm.c diff -u src/sys/dev/ic/bwfm.c:1.33 src/sys/dev/ic/bwfm.c:1.34 --- src/sys/dev/ic/bwfm.c:1.33 Sat Dec 3 16:06:20 2022 +++ src/sys/dev/ic/bwfm.c Sun Dec 4 09:25:04 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bwfm.c,v 1.33 2022/12/03 16:06:20 mlelstv Exp $ */ +/* $NetBSD: bwfm.c,v 1.34 2022/12/04 09:25:04 mlelstv Exp $ */ /* $OpenBSD: bwfm.c,v 1.5 2017/10/16 22:27:16 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation @@ -379,6 +379,7 @@ bwfm_attach(struct bwfm_softc *sc) IEEE80211_C_TKIP | IEEE80211_C_AES | IEEE80211_C_AES_CCM | + IEEE80211_C_PMGT | #if notyet IEEE80211_C_MONITOR | /* monitor mode supported */ IEEE80211_C_IBSS | @@ -635,11 +636,16 @@ bwfm_init(struct ifnet *ifp) * Use CAM (constantly awake) when we are running as AP * otherwise use fast power saving. */ - sc->sc_pm = BWFM_PM_FAST_PS; + + if (ic->ic_flags & IEEE80211_F_PMGTON) { + sc->sc_pm = BWFM_PM_FAST_PS; #ifndef IEEE80211_STA_ONLY - if (ic->ic_opmode == IEEE80211_M_HOSTAP) - sc->sc_pm = BWFM_PM_CAM; + if (ic->ic_opmode == IEEE80211_M_HOSTAP) + sc->sc_pm = BWFM_PM_CAM; #endif + } else { + sc->sc_pm = BWFM_PM_CAM; + } sc->sc_setpm = true; bwfm_fwvar_var_set_int(sc, "txbf", 1); @@ -694,8 +700,8 @@ bwfm_stop(struct ifnet *ifp, int disable memset(, 0, sizeof(join)); bwfm_fwvar_cmd_set_data(sc, BWFM_C_SET_SSID, , sizeof(join)); - bwfm_fwvar_cmd_set_int(sc, BWFM_C_DOWN, 1); bwfm_fwvar_cmd_set_int(sc, BWFM_C_SET_PM, 0); + bwfm_fwvar_cmd_set_int(sc, BWFM_C_DOWN, 1); bwfm_fwvar_cmd_set_int(sc, BWFM_C_SET_AP, 0); bwfm_fwvar_cmd_set_int(sc, BWFM_C_SET_INFRA, 0); bwfm_fwvar_cmd_set_int(sc, BWFM_C_UP, 1); @@ -777,8 +783,7 @@ bwfm_ioctl(struct ifnet *ifp, u_long cmd if (error == ENETRESET) { if ((ifp->if_flags & IFF_UP) != 0 && - (ifp->if_flags & IFF_RUNNING) != 0 && - ic->ic_roaming != IEEE80211_ROAMING_MANUAL) { + (ifp->if_flags & IFF_RUNNING) != 0) { bwfm_init(ifp); } error = 0;
CVS commit: src/sys/dev/ic
Module Name:src Committed By: mlelstv Date: Sun Dec 4 09:25:04 UTC 2022 Modified Files: src/sys/dev/ic: bwfm.c Log Message: Make power save mode configurable by ifconfig, now defaults to non-powersave like other interfaces. Remove cargo-culted check for manual roaming. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/dev/ic/bwfm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.