Re: svn commit: r368789 - head/libexec/rtld-elf/rtld-libc

2020-12-19 Thread Konstantin Belousov
On Sat, Dec 19, 2020 at 08:27:31PM -0800, Ryan Libby wrote:
> On a tangent, it might be neat to split out an rtld_bootstrap
> (everything through init_rtld()) so that only the bootstrap code needs
> to be compiled and linked with no-SSP.  I looked at this some but I
> figured there might not be appetite for a bunch of reorganization of
> rtld just to enable SSP.  Anyway the bootstrap code would still need
> these particular libcompiler_rt functions to be no-SSP, as they get used
> in the printf procedure, which I am guessing the bootstrap may need.

Just my opinion.  SSP is not too useful itself, and I believe it is useless
in rtld, simply due to what rtld typically executes (matching static strings).
Rototiling early rtld stages to get another bullet on the list of doubtful
features should not be done.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r368789 - head/libexec/rtld-elf/rtld-libc

2020-12-19 Thread Ryan Libby
On Sat, Dec 19, 2020 at 7:23 PM John Baldwin  wrote:
>
> On 12/19/20 12:38 AM, Ryan Libby wrote:
> > Author: rlibby
> > Date: Sat Dec 19 08:38:31 2020
> > New Revision: 368789
> > URL: https://svnweb.freebsd.org/changeset/base/368789
> >
> > Log:
> >   rtld-elf: link udivmoddi4 from compiler_rt
> >
> >   This fixes the gcc9 build of rtld-elf32 on amd64, which needed an
> >   implementation of udivmoddi4.
> >
> >   rtld-elf uses certain functions normally found in libc, and so it
> >   includes certain files from libc in its own build.  It has two
> >   mechanisms to include files from libc: one that rebuilds source files in
> >   the rtld-elf environment, and one that extracts object files from a
> >   purpose-built no-SSP PIC archive.
> >
> >   In addition to libc functions, rtld-elf may need to link functions
> >   normally found in libcompiler_rt (formerly libgcc).  Now, add an ability
> >   to rebuild libcompiler_rt source files in the rtld-elf environment.  We
> >   don't yet have a need for an object file extraction mechanism.
> >
> >   libcompiler_rt could also supply udivdi3 and umoddi3, but leave them
> >   alone for now.
> >
> >   Reviewed by:arichardson, kib
> >   Sponsored by:   Dell EMC Isilon
> >   Differential Revision:  https://reviews.freebsd.org/D27665
>
> Hmm, I had just linked against libcompiler_rt directly as we do on arm:
>
> https://reviews.freebsd.org/D26199
>
> It was stuck waiting for review feedback.
>
> Given libcompiler_rt is a static archive, we could probably safely link
> against it directly unlike libc where we have to pick specific object
> files.
>
> --
> John Baldwin

Sorry, I wasn't aware of your review.  Do you want this backed out?

I did see the arm path.  I think it is not quite right, because
libcompiler_rt is compiled with -fstack-protector-strong, which is not
compatible with rtld.  However, it will work in practice if stack
protection doesn't actually get used on any linked function.

We could build a special libcompiler_rt with no stack protection like we
do just for rtld with libc, but since we'd only want this no-SSP library
for rtld, that's not much different from just rebuilding its source
files in rtld.  In addition, by rebuilding specific files we avoid
overlinking--although that may not be a big deal (?), and there may be
other cleaner ways to avoid that (?).

On a tangent, it might be neat to split out an rtld_bootstrap
(everything through init_rtld()) so that only the bootstrap code needs
to be compiled and linked with no-SSP.  I looked at this some but I
figured there might not be appetite for a bunch of reorganization of
rtld just to enable SSP.  Anyway the bootstrap code would still need
these particular libcompiler_rt functions to be no-SSP, as they get used
in the printf procedure, which I am guessing the bootstrap may need.

Ryan
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r368789 - head/libexec/rtld-elf/rtld-libc

2020-12-19 Thread John Baldwin
On 12/19/20 12:38 AM, Ryan Libby wrote:
> Author: rlibby
> Date: Sat Dec 19 08:38:31 2020
> New Revision: 368789
> URL: https://svnweb.freebsd.org/changeset/base/368789
> 
> Log:
>   rtld-elf: link udivmoddi4 from compiler_rt
>   
>   This fixes the gcc9 build of rtld-elf32 on amd64, which needed an
>   implementation of udivmoddi4.
>   
>   rtld-elf uses certain functions normally found in libc, and so it
>   includes certain files from libc in its own build.  It has two
>   mechanisms to include files from libc: one that rebuilds source files in
>   the rtld-elf environment, and one that extracts object files from a
>   purpose-built no-SSP PIC archive.
>   
>   In addition to libc functions, rtld-elf may need to link functions
>   normally found in libcompiler_rt (formerly libgcc).  Now, add an ability
>   to rebuild libcompiler_rt source files in the rtld-elf environment.  We
>   don't yet have a need for an object file extraction mechanism.
>   
>   libcompiler_rt could also supply udivdi3 and umoddi3, but leave them
>   alone for now.
>   
>   Reviewed by:arichardson, kib
>   Sponsored by:   Dell EMC Isilon
>   Differential Revision:  https://reviews.freebsd.org/D27665

Hmm, I had just linked against libcompiler_rt directly as we do on arm:

https://reviews.freebsd.org/D26199

It was stuck waiting for review feedback.

Given libcompiler_rt is a static archive, we could probably safely link
against it directly unlike libc where we have to pick specific object
files.

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368820 - head

2020-12-19 Thread Li-Wen Hsu
Author: lwhsu
Date: Sun Dec 20 02:59:44 2020
New Revision: 368820
URL: https://svnweb.freebsd.org/changeset/base/368820

Log:
  Mark the repository as being converted to Git.
  
  This is the last Subversion commit to src.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/README
  head/README.md

Modified: head/README
==
--- head/README Sat Dec 19 22:04:46 2020(r368819)
+++ head/README Sun Dec 20 02:59:44 2020(r368820)
@@ -1,3 +1,5 @@
+This repository is being converted from Subversion to Git.
+
 This is the top level of the FreeBSD source directory.  This file
 was last revised on:
 $FreeBSD$

Modified: head/README.md
==
--- head/README.md  Sat Dec 19 22:04:46 2020(r368819)
+++ head/README.md  Sun Dec 20 02:59:44 2020(r368820)
@@ -1,3 +1,5 @@
+This repository is being converted from Subversion to Git.
+
 FreeBSD Source:
 ---
 This is the top level of the FreeBSD source directory.  This file
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r368817 - in head/lib/libc: locale net stdlib sys x86/sys

2020-12-19 Thread Konstantin Belousov
On Sat, Dec 19, 2020 at 02:54:28PM +, Gordon Bergling wrote:
> Modified: head/lib/libc/sys/thr_self.2
> ==
> --- head/lib/libc/sys/thr_self.2  Sat Dec 19 13:56:19 2020
> (r368816)
> +++ head/lib/libc/sys/thr_self.2  Sat Dec 19 14:54:28 2020
> (r368817)
> @@ -71,12 +71,12 @@ The memory pointed to by the
>  argument is not valid.
>  .El
>  .Sh SEE ALSO
> +.Xr _umtx_op 2 ,
>  .Xr thr_exit 2 ,
>  .Xr thr_kill 2 ,
>  .Xr thr_kill2 2 ,
>  .Xr thr_new 2 ,
>  .Xr thr_set_name 2 ,
> -.Xr _umtx_op 2 ,
>  .Xr pthread_getthreadid_np 3 ,
>  .Xr pthread_self 3
>  .Sh STANDARDS
Why this reordering ?
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368819 - in head: share/man/man4 sys/netinet sys/netinet6

2020-12-19 Thread Andrew Gallatin
Author: gallatin
Date: Sat Dec 19 22:04:46 2020
New Revision: 368819
URL: https://svnweb.freebsd.org/changeset/base/368819

Log:
  Filter TCP connections to SO_REUSEPORT_LB listen sockets by NUMA domain
  
  In order to efficiently serve web traffic on a NUMA
  machine, one must avoid as many NUMA domain crossings as
  possible. With SO_REUSEPORT_LB, a number of workers can share a
  listen socket. However, even if a worker sets affinity to a core
  or set of cores on a NUMA domain, it will receive connections
  associated with all NUMA domains in the system. This will lead to
  cross-domain traffic when the server writes to the socket or
  calls sendfile(), and memory is allocated on the server's local
  NUMA node, but transmitted on the NUMA node associated with the
  TCP connection. Similarly, when the server reads from the socket,
  he will likely be reading memory allocated on the NUMA domain
  associated with the TCP connection.
  
  This change provides a new socket ioctl, TCP_REUSPORT_LB_NUMA. A
  server can now tell the kernel to filter traffic so that only
  incoming connections associated with the desired NUMA domain are
  given to the server. (Of course, in the case where there are no
  servers sharing the listen socket on some domain, then as a
  fallback, traffic will be hashed as normal to all servers sharing
  the listen socket regardless of domain). This allows a server to
  deal only with traffic that is local to its NUMA domain, and
  avoids cross-domain traffic in most cases.
  
  This patch, and a corresponding small patch to nginx to use
  TCP_REUSPORT_LB_NUMA allows us to serve 190Gb/s of kTLS encrypted
  https media content from dual-socket Xeons with only 13% (as
  measured by pcm.x) cross domain traffic on the memory controller.
  
  Reviewed by:  jhb, bz (earlier version), bcr (man page)
  Tested by: gonzo
  Sponsored by: Netfix
  Differential Revision:https://reviews.freebsd.org/D21636

Modified:
  head/share/man/man4/tcp.4
  head/sys/netinet/in_pcb.c
  head/sys/netinet/in_pcb.h
  head/sys/netinet/tcp.h
  head/sys/netinet/tcp_usrreq.c
  head/sys/netinet6/in6_pcb.c
  head/sys/netinet6/in6_pcb.h

Modified: head/share/man/man4/tcp.4
==
--- head/share/man/man4/tcp.4   Sat Dec 19 21:46:09 2020(r368818)
+++ head/share/man/man4/tcp.4   Sat Dec 19 22:04:46 2020(r368819)
@@ -34,7 +34,7 @@
 .\" From: @(#)tcp.48.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd November 25, 2020
+.Dd December 19, 2020
 .Dt TCP 4
 .Os
 .Sh NAME
@@ -314,6 +314,21 @@ Enable in-kernel TLS for data read from this socket.
 See
 .Xr ktls 4
 for more details.
+.It Dv TCP_REUSPORT_LB_NUMA
+Changes NUMA affinity filtering for an established TCP listen
+socket.
+This option takes a single integer argument which specifies
+the NUMA domain to filter on for this listen socket.
+The argument can also have the follwing special values:
+.Bl -tag -width "Dv TCP_REUSPORT_LB_NUMA"
+.It Dv TCP_REUSPORT_LB_NUMA_NODOM
+Remove NUMA filtering for this listen socket.
+.It Dv TCP_REUSPORT_LB_NUMA_CURDOM
+Filter traffic associated with the domain where the calling thread is
+currently executing.
+This is typically used after a process or thread inherits a listen
+socket from its parent, and sets its CPU affinity to a particular core.
+.El
 .El
 .Pp
 The option level for the

Modified: head/sys/netinet/in_pcb.c
==
--- head/sys/netinet/in_pcb.c   Sat Dec 19 21:46:09 2020(r368818)
+++ head/sys/netinet/in_pcb.c   Sat Dec 19 22:04:46 2020(r368819)
@@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$");
 #endif
 
 #include 
+#include 
 
 #include 
 #include 
@@ -150,7 +151,8 @@ static void in_pcbremlists(struct inpcb *inp);
 static struct inpcb*in_pcblookup_hash_locked(struct inpcbinfo *pcbinfo,
struct in_addr faddr, u_int fport_arg,
struct in_addr laddr, u_int lport_arg,
-   int lookupflags, struct ifnet *ifp);
+   int lookupflags, struct ifnet *ifp,
+   uint8_t numa_domain);
 
 #define RANGECHK(var, min, max) \
if ((var) < (min)) { (var) = (min); } \
@@ -248,7 +250,8 @@ SYSCTL_COUNTER_U64(_net_inet_ip_rl, OID_AUTO, set_ok, 
 
 static struct inpcblbgroup *
 in_pcblbgroup_alloc(struct inpcblbgrouphead *hdr, u_char vflag,
-uint16_t port, const union in_dependaddr *addr, int size)
+uint16_t port, const union in_dependaddr *addr, int size,
+uint8_t numa_domain)
 {
struct inpcblbgroup *grp;
size_t bytes;
@@ -259,6 +262,7 @@ in_pcblbgroup_alloc(struct inpcblbgrouphead *hdr, u_ch
return (NULL);
grp->il_vflag = vflag;
grp->il_lport = port;
+   grp->il_numa_domain = numa_domain;
grp->il_dependladdr = *addr;
grp->il_inpsiz = size;

svn commit: r368818 - head/sys/kern

2020-12-19 Thread Andrew Gallatin
Author: gallatin
Date: Sat Dec 19 21:46:09 2020
New Revision: 368818
URL: https://svnweb.freebsd.org/changeset/base/368818

Log:
  Optionally bind ktls threads to NUMA domains
  
  When ktls_bind_thread is 2, we pick a ktls worker thread that is
  bound to the same domain as the TCP connection associated with
  the socket. We use roughly the same code as netinet/tcp_hpts.c to
  do this. This allows crypto to run on the same domain as the TCP
  connection is associated with. Assuming TCP_REUSPORT_LB_NUMA
  (D21636) is in place & in use, this ensures that the crypto source
  and destination buffers are local to the same NUMA domain as we're
  running crypto on.
  
  This change (when TCP_REUSPORT_LB_NUMA, D21636, is used) reduces
  cross-domain traffic from over 37% down to about 13% as measured
  by pcm.x on a dual-socket Xeon using nginx and a Netflix workload.
  
  Reviewed by:  jhb
  Sponsored by: Netflix
  Differential Revision:https://reviews.freebsd.org/D21648

Modified:
  head/sys/kern/uipc_ktls.c

Modified: head/sys/kern/uipc_ktls.c
==
--- head/sys/kern/uipc_ktls.c   Sat Dec 19 14:54:28 2020(r368817)
+++ head/sys/kern/uipc_ktls.c   Sat Dec 19 21:46:09 2020(r368818)
@@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -83,6 +84,12 @@ struct ktls_wq {
boolrunning;
 } __aligned(CACHE_LINE_SIZE);
 
+struct ktls_domain_info {
+   int count;
+   int cpu[MAXCPU];
+};
+
+struct ktls_domain_info ktls_domains[MAXMEMDOM];
 static struct ktls_wq *ktls_wq;
 static struct proc *ktls_proc;
 LIST_HEAD(, ktls_crypto_backend) ktls_backends;
@@ -316,6 +323,9 @@ static u_int
 ktls_get_cpu(struct socket *so)
 {
struct inpcb *inp;
+#ifdef NUMA
+   struct ktls_domain_info *di;
+#endif
u_int cpuid;
 
inp = sotoinpcb(so);
@@ -330,7 +340,13 @@ ktls_get_cpu(struct socket *so)
 * serialization provided by having the same connection use
 * the same queue.
 */
-   cpuid = ktls_cpuid_lookup[inp->inp_flowid % ktls_number_threads];
+#ifdef NUMA
+   if (ktls_bind_threads > 1 && inp->inp_numa_domain != M_NODOM) {
+   di = _domains[inp->inp_numa_domain];
+   cpuid = di->cpu[inp->inp_flowid % di->count];
+   } else
+#endif
+   cpuid = ktls_cpuid_lookup[inp->inp_flowid % 
ktls_number_threads];
return (cpuid);
 }
 #endif
@@ -341,7 +357,7 @@ ktls_init(void *dummy __unused)
struct thread *td;
struct pcpu *pc;
cpuset_t mask;
-   int error, i;
+   int count, domain, error, i;
 
ktls_tasks_active = counter_u64_alloc(M_WAITOK);
ktls_cnt_tx_queued = counter_u64_alloc(M_WAITOK);
@@ -397,7 +413,11 @@ ktls_init(void *dummy __unused)
if (ktls_bind_threads) {
if (ktls_bind_threads > 1) {
pc = pcpu_find(i);
-   CPU_COPY(_domain[pc->pc_domain], );
+   domain = pc->pc_domain;
+   CPU_COPY(_domain[domain], );
+   count = ktls_domains[domain].count;
+   ktls_domains[domain].cpu[count] = i;
+   ktls_domains[domain].count++;
} else {
CPU_SETOF(i, );
}
@@ -410,6 +430,18 @@ ktls_init(void *dummy __unused)
ktls_cpuid_lookup[ktls_number_threads] = i;
ktls_number_threads++;
}
+
+   /*
+* If we somehow have an empty domain, fall back to choosing
+* among all KTLS threads.
+*/
+   for (i = 0; i < vm_ndomains; i++) {
+   if (ktls_domains[i].count == 0) {
+   ktls_bind_threads = 0;
+   break;
+   }
+   }
+
printf("KTLS: Initialized %d threads\n", ktls_number_threads);
 }
 SYSINIT(ktls, SI_SUB_SMP + 1, SI_ORDER_ANY, ktls_init, NULL);
@@ -2093,6 +2125,10 @@ ktls_work_thread(void *ctx)
STAILQ_HEAD(, mbuf) local_m_head;
STAILQ_HEAD(, socket) local_so_head;
 
+   if (ktls_bind_threads > 1) {
+   curthread->td_domain.dr_policy =
+   DOMAINSET_PREF(PCPU_GET(domain));
+   }
 #if defined(__aarch64__) || defined(__amd64__) || defined(__i386__)
fpu_kern_thread(0);
 #endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r368714 - head/lib/libc/string

2020-12-19 Thread Steffen Nurpmeso
Konstantin Belousov wrote in
 :
 |On Sat, Dec 19, 2020 at 02:52:25PM +0100, Steffen Nurpmeso wrote:
 |> Kevin Bowling wrote in
 |>  :
 |>|On Thu, Dec 17, 2020 at 9:33 AM Ian Lepore  wrote:
 |>|> On Thu, 2020-12-17 at 18:22 +0200, Konstantin Belousov wrote:
 |>|>> On Thu, Dec 17, 2020 at 01:01:01PM +, Jessica Clarke wrote:
 |>|>>> On 17 Dec 2020, at 12:53, Konstantin Belousov 
 |>|>>> wrote:
 |>| On Thu, Dec 17, 2020 at 12:41:47PM +, Mateusz Piotrowski
 |>| wrote:
 |>|> Author: 0mp (doc,ports committer)
 |>|> Date: Thu Dec 17 12:41:47 2020
 |>|> New Revision: 368714
 |>|> URL: https://svnweb.freebsd.org/changeset/base/368714
 |>  ...
 |>|> +   return (0);
 |>|
 |>| return (0) is redundand.
 |>  ...
 |>|>> Why it is bad practice ?
 |>|>>
 |>|>> C is a small language, and while knowing some quirks (like this one)
 |>|>> seems to be optional, others are not. And worse, that other quirks are
 |>  ...
 |>|> How obscure is this quirk?  I've been writing C code since 1983,
 |>|> including having released a freeware compiler (pre-gcc days) and
 |>|> working on a commercial C compiler.  I used to moderate the c_language
 |>|> conference on BIX (back when that was a thing).  I make my living
 |>|> writing C and C++ code every day.  And yet, I had completely forgotten
 |>|> about this quirk.
 |>  ...
 |>|In Kib’s defense I think this is commonly mentioned in C99 books \
 |>|(at least
 |>|that’s where I learned of it) so it depends on when and where someone
 |>|learned.  There are merits approaches of being explicit or brief.  I have
 |> 
 |> Nicely said.  K C 2nd Ed. explicitly uses return(0) many times.
 |
 |We are long after K in any of its form.
 |
 |My point was that the example if of very low quality, and return (0); is
 |an indicator.  Perhaps even more interesting point to make is the mix of
 |return from main() and exit(3) use in same 4 lines.  Besides inconsistency,
 |exit(3) from main() should probably not used in examples or recommended
 |to novices at all.

I .. cannot see this from the context above?

I personally use _?exit only if execution must not continue aka
control cannot be given back to code flow.
For me .. not.  C89 can be used here.  (It is annoying only for
field initializers, and there especially that the order must be
correct in C89 mode, when FIELD_INIT[IN]() expands to nothing.)

(Yes, one of the things i personally was out for was
restartability without leaks for at least development, ie, it was
only "fine" if one could have entered sf_main() multiple times
without causing problems.  This required "atexit_uninstall" and
two distinct priorities for exit handlers, and a clean order of
the "final" ones, also atcrash_uninstall, but it was nice to see
"SF: memcache empty!" messages in debug code, knowing it is nice.
Today i only do this a bit as i link other libraries anyway, and
everybody uses ctors and dtors and it is all dynamically linked,
.. and all that.)

--steffen
|
|Der Kragenbaer,The moon bear,
|der holt sich munter   he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368817 - in head/lib/libc: locale net stdlib sys x86/sys

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 14:54:28 2020
New Revision: 368817
URL: https://svnweb.freebsd.org/changeset/base/368817

Log:
  libc: Fix most issues reported by mandoc
  
  - varios "new sentence, new line" warnings
  - varios "sections out of conventional order" warnings
  - varios "unusual Xr order" warnings
  - varios "missing section argument" warnings
  - varios "no blank before trailing delimiter" warnings
  - varios "normalizing date format" warnings
  
  MFC after:1 month

Modified:
  head/lib/libc/locale/setlocale.3
  head/lib/libc/net/gethostbyname.3
  head/lib/libc/stdlib/system.3
  head/lib/libc/sys/_umtx_op.2
  head/lib/libc/sys/copy_file_range.2
  head/lib/libc/sys/execve.2
  head/lib/libc/sys/fhlink.2
  head/lib/libc/sys/open.2
  head/lib/libc/sys/pdfork.2
  head/lib/libc/sys/ptrace.2
  head/lib/libc/sys/revoke.2
  head/lib/libc/sys/rtprio.2
  head/lib/libc/sys/sendfile.2
  head/lib/libc/sys/thr_exit.2
  head/lib/libc/sys/thr_new.2
  head/lib/libc/sys/thr_self.2
  head/lib/libc/sys/thr_set_name.2
  head/lib/libc/sys/thr_suspend.2
  head/lib/libc/sys/thr_wake.2
  head/lib/libc/x86/sys/pkru.3

Modified: head/lib/libc/locale/setlocale.3
==
--- head/lib/libc/locale/setlocale.3Sat Dec 19 13:56:19 2020
(r368816)
+++ head/lib/libc/locale/setlocale.3Sat Dec 19 14:54:28 2020
(r368817)
@@ -157,6 +157,15 @@ if the given combination of
 and
 .Fa locale
 makes no sense.
+.Sh FILES
+.Bl -tag -width /usr/share/locale/locale/category -compact
+.It Pa $PATH_LOCALE/ Ns Em locale/category
+.It Pa /usr/share/locale/ Ns Em locale/category
+locale file for the locale
+.Em locale
+and the category
+.Em category .
+.El
 .Sh EXAMPLES
 The following code illustrates how a program can initialize the
 international environment for one language, while selectively
@@ -176,15 +185,6 @@ following manner before using any of the locale-specif
 .Bd -literal
 setlocale(LC_ALL, "");
 .Ed
-.Sh FILES
-.Bl -tag -width /usr/share/locale/locale/category -compact
-.It Pa $PATH_LOCALE/ Ns Em locale/category
-.It Pa /usr/share/locale/ Ns Em locale/category
-locale file for the locale
-.Em locale
-and the category
-.Em category .
-.El
 .Sh ERRORS
 No errors are defined.
 .Sh SEE ALSO

Modified: head/lib/libc/net/gethostbyname.3
==
--- head/lib/libc/net/gethostbyname.3   Sat Dec 19 13:56:19 2020
(r368816)
+++ head/lib/libc/net/gethostbyname.3   Sat Dec 19 14:54:28 2020
(r368817)
@@ -303,8 +303,27 @@ for example, a mail-forwarder may be registered for th
 .Xr hosts 5 ,
 .Xr hostname 7 ,
 .Xr named 8
-.Sh CAVEAT
+.Sh HISTORY
 The
+.Fn herror
+function appeared in
+.Bx 4.3 .
+The
+.Fn endhostent ,
+.Fn gethostbyaddr ,
+.Fn gethostbyname ,
+.Fn gethostent ,
+and
+.Fn sethostent
+functions appeared in
+.Bx 4.2 .
+The
+.Fn gethostbyname2
+function first appeared in
+.Tn BIND
+version 4.9.4.
+.Sh CAVEATS
+The
 .Fn gethostent
 function
 is defined, and
@@ -343,25 +362,6 @@ The
 .Fn endhostent
 function
 closes the file.
-.Sh HISTORY
-The
-.Fn herror
-function appeared in
-.Bx 4.3 .
-The
-.Fn endhostent ,
-.Fn gethostbyaddr ,
-.Fn gethostbyname ,
-.Fn gethostent ,
-and
-.Fn sethostent
-functions appeared in
-.Bx 4.2 .
-The
-.Fn gethostbyname2
-function first appeared in
-.Tn BIND
-version 4.9.4.
 .Sh BUGS
 These functions use a thread-specific data storage;
 if the data is needed for future use, it should be

Modified: head/lib/libc/stdlib/system.3
==
--- head/lib/libc/stdlib/system.3   Sat Dec 19 13:56:19 2020
(r368816)
+++ head/lib/libc/stdlib/system.3   Sat Dec 19 14:54:28 2020
(r368817)
@@ -108,4 +108,4 @@ because all meta-characters supported by
 would be honored.
 User supplied parameters should always be carefully santized
 before they appear in
-.Fa string.
+.Fa string .

Modified: head/lib/libc/sys/_umtx_op.2
==
--- head/lib/libc/sys/_umtx_op.2Sat Dec 19 13:56:19 2020
(r368816)
+++ head/lib/libc/sys/_umtx_op.2Sat Dec 19 14:54:28 2020
(r368817)
@@ -1180,7 +1180,7 @@ request:
 .It Dv UMTX_SHM_CREAT
 Creates the anonymous shared memory object, which can be looked up
 with the specified key
-.Fa uaddr.
+.Fa uaddr .
 If the object associated with the
 .Fa uaddr
 key already exists, it is returned instead of creating a new object.
@@ -1198,7 +1198,7 @@ the specified key
 an error is returned, and no new object is created.
 .It Dv UMTX_SHM_DESTROY
 De-associate the shared object with the specified key
-.Fa uaddr.
+.Fa uaddr .
 The object is destroyed after the last open file descriptor is closed
 and the last mapping for it is destroyed.
 .It Dv UMTX_SHM_ALIVE

Modified: head/lib/libc/sys/copy_file_range.2

Re: svn commit: r368714 - head/lib/libc/string

2020-12-19 Thread Konstantin Belousov
On Sat, Dec 19, 2020 at 02:52:25PM +0100, Steffen Nurpmeso wrote:
> Kevin Bowling wrote in
>  :
>  |On Thu, Dec 17, 2020 at 9:33 AM Ian Lepore  wrote:
>  |> On Thu, 2020-12-17 at 18:22 +0200, Konstantin Belousov wrote:
>  |>> On Thu, Dec 17, 2020 at 01:01:01PM +, Jessica Clarke wrote:
>  |>>> On 17 Dec 2020, at 12:53, Konstantin Belousov 
>  |>>> wrote:
>  | On Thu, Dec 17, 2020 at 12:41:47PM +, Mateusz Piotrowski
>  | wrote:
>  |> Author: 0mp (doc,ports committer)
>  |> Date: Thu Dec 17 12:41:47 2020
>  |> New Revision: 368714
>  |> URL: https://svnweb.freebsd.org/changeset/base/368714
>  ...
>  |> +   return (0);
>  |
>  | return (0) is redundand.
>  ...
>  |>> Why it is bad practice ?
>  |>>
>  |>> C is a small language, and while knowing some quirks (like this one)
>  |>> seems to be optional, others are not. And worse, that other quirks are
>  ...
>  |> How obscure is this quirk?  I've been writing C code since 1983,
>  |> including having released a freeware compiler (pre-gcc days) and
>  |> working on a commercial C compiler.  I used to moderate the c_language
>  |> conference on BIX (back when that was a thing).  I make my living
>  |> writing C and C++ code every day.  And yet, I had completely forgotten
>  |> about this quirk.
>  ...
>  |In Kib’s defense I think this is commonly mentioned in C99 books (at least
>  |that’s where I learned of it) so it depends on when and where someone
>  |learned.  There are merits approaches of being explicit or brief.  I have
> 
> Nicely said.  K C 2nd Ed. explicitly uses return(0) many times.

We are long after K in any of its form.

My point was that the example if of very low quality, and return (0); is
an indicator.  Perhaps even more interesting point to make is the mix of
return from main() and exit(3) use in same 4 lines.  Besides inconsistency,
exit(3) from main() should probably not used in examples or recommended
to novices at all.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368816 - head/usr.sbin/trim

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 13:56:19 2020
New Revision: 368816
URL: https://svnweb.freebsd.org/changeset/base/368816

Log:
  trim(8): Fix a few issues reported by mandoc
  
  - new sentence, new line
  - unusual Xr order: ioctl(2) after da(4)
  - unusual Xr order: sysexits(3) after nda(4)
  
  MFC after:1 week

Modified:
  head/usr.sbin/trim/trim.8

Modified: head/usr.sbin/trim/trim.8
==
--- head/usr.sbin/trim/trim.8   Sat Dec 19 13:51:46 2020(r368815)
+++ head/usr.sbin/trim/trim.8   Sat Dec 19 13:56:19 2020(r368816)
@@ -60,10 +60,12 @@ The following options are available:
 Do not actually erase anything but show what it would do (dry run).
 Implies
 .Fl v .
-This is the default. Overrides
+This is the default.
+Overrides
 .Fl f .
 .It Fl f
-Perform the operation. Overrides
+Perform the operation.
+Overrides
 .Fl N .
 .It Fl l Xo
 .Sm off
@@ -150,11 +152,11 @@ is special device file not supporting DIOCGMEDIASIZE
 (probably not a disk), so its size cannot be examined.
 .El
 .Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr sysexits 3 ,
 .Xr ada 4 ,
 .Xr da 4 ,
-.Xr ioctl 2 ,
-.Xr nda 4 ,
-.Xr sysexits 3
+.Xr nda 4
 .Sh HISTORY
 The
 .Nm
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r368714 - head/lib/libc/string

2020-12-19 Thread Steffen Nurpmeso
Kevin Bowling wrote in
 :
 |On Thu, Dec 17, 2020 at 9:33 AM Ian Lepore  wrote:
 |> On Thu, 2020-12-17 at 18:22 +0200, Konstantin Belousov wrote:
 |>> On Thu, Dec 17, 2020 at 01:01:01PM +, Jessica Clarke wrote:
 |>>> On 17 Dec 2020, at 12:53, Konstantin Belousov 
 |>>> wrote:
 | On Thu, Dec 17, 2020 at 12:41:47PM +, Mateusz Piotrowski
 | wrote:
 |> Author: 0mp (doc,ports committer)
 |> Date: Thu Dec 17 12:41:47 2020
 |> New Revision: 368714
 |> URL: https://svnweb.freebsd.org/changeset/base/368714
 ...
 |> +   return (0);
 |
 | return (0) is redundand.
 ...
 |>> Why it is bad practice ?
 |>>
 |>> C is a small language, and while knowing some quirks (like this one)
 |>> seems to be optional, others are not. And worse, that other quirks are
 ...
 |> How obscure is this quirk?  I've been writing C code since 1983,
 |> including having released a freeware compiler (pre-gcc days) and
 |> working on a commercial C compiler.  I used to moderate the c_language
 |> conference on BIX (back when that was a thing).  I make my living
 |> writing C and C++ code every day.  And yet, I had completely forgotten
 |> about this quirk.
 ...
 |In Kib’s defense I think this is commonly mentioned in C99 books (at least
 |that’s where I learned of it) so it depends on when and where someone
 |learned.  There are merits approaches of being explicit or brief.  I have

Nicely said.  K C 2nd Ed. explicitly uses return(0) many times.

--steffen
|
|Der Kragenbaer,The moon bear,
|der holt sich munter   he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368815 - head/usr.sbin/zonectl

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 13:51:46 2020
New Revision: 368815
URL: https://svnweb.freebsd.org/changeset/base/368815

Log:
  zonectl(8): Fix a few issues reported by mandoc
  
  - Add missing quotation mark for a comment above the .Dd
  - inserting missing end of block: Sh breaks Bd
  - skipping paragraph macro: Pp before Bl
  - skipping paragraph macro: Pp before Bd
  - empty block: Bd
  
  MFC after:1 week

Modified:
  head/usr.sbin/zonectl/zonectl.8

Modified: head/usr.sbin/zonectl/zonectl.8
==
--- head/usr.sbin/zonectl/zonectl.8 Sat Dec 19 13:45:39 2020
(r368814)
+++ head/usr.sbin/zonectl/zonectl.8 Sat Dec 19 13:51:46 2020
(r368815)
@@ -30,7 +30,7 @@
 .\" Authors: Ken Merry   (Spectra Logic Corporation)
 .\"
 .\" $FreeBSD$
-.\
+.\"
 .Dd May 18, 2016
 .Dt ZONECTL 8
 .Os
@@ -104,7 +104,6 @@ These zones must be written sequentially.
 If they are not written sequentially, starting at the write pointer, the
 command will fail.
 .El
-.Pp
 .Bl -tag -width 12n
 .It Fl c Ar cmd
 Specify the zone subcommand:
@@ -208,14 +207,12 @@ zonectl -d /dev/da5 -c params
 .Ed
 .Pp
 Display basic zoning information for disk da5.
-.Pp
 .Bd -literal -offset indent
 zonectl -d /dev/da5 -c rz
 .Ed
 .Pp
 Issue the Report Zones command to disk da5, and print out all
 zones on the drive in the default format.
-.Pp
 .Bd -literal -offset indent
 zonectl -d /dev/da5 -c rz -o reset -P script
 .Ed
@@ -223,14 +220,11 @@ zonectl -d /dev/da5 -c rz -o reset -P script
 Issue the Report Zones command to disk da5, and print out all
 of the zones that have the Reset Write Pointer Recommended bit set to true.
 Print the zones in a script friendly form.
-.Pp
 .Bd -literal -offset indent
 zonectl -d /dev/da5 -c rwp -l 0x2c8
 .Ed
 .Pp
 Issue the Reset Write Pointer command to disk da5 for the zone
 that starts at LBA 0x2c8.
-.Pp
-.Bd -literal -offset indent
 .Sh AUTHORS
 .An Kenneth Merry Aq k...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368814 - head/usr.sbin/nfsd

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 13:45:39 2020
New Revision: 368814
URL: https://svnweb.freebsd.org/changeset/base/368814

Log:
  nfsv4(4): Fix a few issues reported by mandoc
  
  - new sentence, new line
  - function name without markup: rtalloc()
  - function name without markup: VOP_RECLAIM()
  
  MFC after:1 week

Modified:
  head/usr.sbin/nfsd/nfsv4.4

Modified: head/usr.sbin/nfsd/nfsv4.4
==
--- head/usr.sbin/nfsd/nfsv4.4  Sat Dec 19 13:36:59 2020(r368813)
+++ head/usr.sbin/nfsd/nfsv4.4  Sat Dec 19 13:45:39 2020(r368814)
@@ -60,8 +60,8 @@ To provide for correct recovery semantics, a small fil
 is used by the server during the recovery phase.
 If this file is missing or empty, there is a backup copy maintained by
 .Xr nfsd 8
-that will be used. If either file is missing, they will be
-created by the
+that will be used.
+If either file is missing, they will be created by the
 .Xr nfsd 8 .
 If both the file and the backup copy are empty,
 it will result in the server starting without providing a grace period
@@ -299,7 +299,8 @@ Without a functioning callback path, a server will nev
 to a client.
 .sp
 For NFSv4.0, by default, the callback address will be set to the IP address 
acquired via
-rtalloc() in the kernel and port# 7745.
+.Fn rtalloc
+in the kernel and port# 7745.
 To override the default port#, a command line option for
 .Xr nfscbd 8
 can be used.
@@ -341,8 +342,9 @@ variables.
 .Pp
 NFSv4 mount(s) against exported volume(s) on the same host are not recommended,
 since this can result in a hung NFS server.
-It occurs when an nfsd thread tries to do an NFSv4 VOP_RECLAIM()/Close RPC
-as part of acquiring a new vnode.
+It occurs when an nfsd thread tries to do an NFSv4
+.Fn VOP_RECLAIM
+/ Close RPC as part of acquiring a new vnode.
 If all other nfsd threads are blocked waiting for lock(s) held by this nfsd
 thread, then there isn't an nfsd thread to service the Close RPC.
 .Sh FILES
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368813 - in head/usr.sbin/bluetooth: bluetooth-config hccontrol hcseriald sdpd

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 13:36:59 2020
New Revision: 368813
URL: https://svnweb.freebsd.org/changeset/base/368813

Log:
  bluetooth: Fix a mandoc related issues
  
  - new sentence, new line
  - sections out of conventional order: Sh FILES
  - unusual Xr order: bthost(1) after bthidd(8)
  - no blank before trailing delimiter
  - whitespace at end of input line
  - sections out of conventional order: Sh EXIT STATUS
  
  MFC after:1 week

Modified:
  head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8
  head/usr.sbin/bluetooth/hccontrol/hccontrol.8
  head/usr.sbin/bluetooth/hcseriald/hcseriald.8
  head/usr.sbin/bluetooth/sdpd/sdpd.8

Modified: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8
==
--- head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 Sat Dec 19 
13:23:26 2020(r368812)
+++ head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 Sat Dec 19 
13:36:59 2020(r368813)
@@ -45,7 +45,8 @@ The following options are available:
 .It Fl d
 Scan for a specific bluetooth device address.
 .It Fl n
-Limit scan to a specific host controller. Hint: List all netgraph nodes with
+Limit scan to a specific host controller.
+Hint: List all netgraph nodes with
 .Ql /usr/sbin/ngctl list .
 .El
 .Pp
@@ -62,11 +63,6 @@ keyboards, configure and restart
 .Nm
 can bring up any interface and daemon necessary for operation and, if a node 
is provided on
 command line, will do so automatically for that interface.
-.Sh CAVEATS
-.Nm
-can not parse entries in
-.Xr hcsecd 8
-config file and thus will ask the user to manually modify existing pairing PIN 
entries.
 .Sh FILES
 .Bl -tag -width ".Pa /etc/bluetooth/hosts" -compact
 .It Pa /etc/bluetooth/hosts
@@ -79,7 +75,8 @@ scan -n ubt0 -a 00:26:bb:7a:58:95
 .Bd -ragged -offset indent
 This will scan the bluetooth controller ubt0hci for a bluetooth device with 
the address
 00:26:bb:7a:58:95, set up ubt0 if necessary and enter an interactive dialog to 
pair the
-new device. Since in this example a mouse is paired,
+new device.
+Since in this example a mouse is paired,
 .Nm
 will interact with
 .Xr bthidd 8 ,
@@ -93,9 +90,9 @@ This will scan all bluetooth controllers on the system
 to bring up controllers or daemons along the way.
 .Ed
 .Sh SEE ALSO
+.Xr bthost 1 ,
 .Xr bthidcontrol 8 ,
 .Xr bthidd 8 ,
-.Xr bthost 1 ,
 .Xr hccontrol 8 ,
 .Xr hcsecd 8 ,
 .Xr sdpcontrol 8 ,
@@ -107,5 +104,10 @@ utility first appeared in
 .Fx 12.1 .
 .Sh AUTHORS
 .An Dirk Engling Aq Mt erdge...@erdgeist.org
+.Sh CAVEATS
+.Nm
+can not parse entries in
+.Xr hcsecd 8
+config file and thus will ask the user to manually modify existing pairing PIN 
entries.
 .Sh THANKS TO
 Lars Engels and Warren Block for suggestions, help, and testing.

Modified: head/usr.sbin/bluetooth/hccontrol/hccontrol.8
==
--- head/usr.sbin/bluetooth/hccontrol/hccontrol.8   Sat Dec 19 13:23:26 
2020(r368812)
+++ head/usr.sbin/bluetooth/hccontrol/hccontrol.8   Sat Dec 19 13:36:59 
2020(r368813)
@@ -147,8 +147,8 @@ are:
 .It Cm Read_RSSI
 .It Cm LE_Enable
 .It Cm LE_Read_Local_Supported_Features
-.It Cm LE_Set_Advertising_Parameters 
-.It Cm LE_Read_Advertising_Physical_Channel_Tx_Power 
+.It Cm LE_Set_Advertising_Parameters
+.It Cm LE_Read_Advertising_Physical_Channel_Tx_Power
 .It Cm LE_Set_Advertising_Data
 .It Cm LE_Set_Scan_Response_Data
 .It Cm LE_Set_Advertising_Enable
@@ -192,10 +192,11 @@ are:
 .It Cm Write_Node_Role_Switch
 .It Cm Read_Node_List
 .El
+.Sh EXIT STATUS
+.Ex -std
 .Sh EXAMPLES
 Make the blutooth LE host, ubt0hci, scannable through
 .Xr hccontrol 8 commands:
-.Pp
 .Bd -literal -offset indent
 hccontrol -n ubt0hci le_set_advertising_enable disable
 hccontrol -n ubt0hci le_set_advertising_param
@@ -204,8 +205,6 @@ hccontrol -n ubt0hci le_set_advertising_data
 hccontrol -n ubt0hci le_set_scan_response -n FBSD_Host
 hccontrol -n ubt0hci le_set_advertising_enable enable
 .Ed
-.Sh EXIT STATUS
-.Ex -std
 .Sh SEE ALSO
 .Xr bluetooth 3 ,
 .Xr netgraph 3 ,

Modified: head/usr.sbin/bluetooth/hcseriald/hcseriald.8
==
--- head/usr.sbin/bluetooth/hcseriald/hcseriald.8   Sat Dec 19 13:23:26 
2020(r368812)
+++ head/usr.sbin/bluetooth/hcseriald/hcseriald.8   Sat Dec 19 13:36:59 
2020(r368813)
@@ -69,7 +69,7 @@ Example:
 .El
 .Sh FILES
 .Bl -tag -width ".Pa /var/run/hcserial. Ns Ar * Ns Pa .pid" -compact
-.It Pa /var/run/hcserial. Ns Ar * Ns Pa .pid
+.It Pa /var/run/hcserial . Ns Ar * Ns Pa .pid
 Process ID of the currently running
 .Nm
 daemon.

Modified: head/usr.sbin/bluetooth/sdpd/sdpd.8
==
--- head/usr.sbin/bluetooth/sdpd/sdpd.8 Sat Dec 19 13:23:26 2020
(r368812)
+++ head/usr.sbin/bluetooth/sdpd/sdpd.8 

svn commit: r368812 - head/usr.sbin/mpsutil

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 13:23:26 2020
New Revision: 368812
URL: https://svnweb.freebsd.org/changeset/base/368812

Log:
  mpsutil(8): Remove trailing whitespace
  
  MFC after:1 week

Modified:
  head/usr.sbin/mpsutil/mpsutil.8

Modified: head/usr.sbin/mpsutil/mpsutil.8
==
--- head/usr.sbin/mpsutil/mpsutil.8 Sat Dec 19 13:21:40 2020
(r368811)
+++ head/usr.sbin/mpsutil/mpsutil.8 Sat Dec 19 13:23:26 2020
(r368812)
@@ -9,7 +9,7 @@
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"notice, this list of conditions and the following disclaimer in the
 .\"documentation and/or other materials provided with the distribution.
-.\" 
+.\"
 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368811 - head/usr.sbin/bhyvectl

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 13:21:40 2020
New Revision: 368811
URL: https://svnweb.freebsd.org/changeset/base/368811

Log:
  bhyvectl(8): Normalize the man page date
  
  MFC after:1 week

Modified:
  head/usr.sbin/bhyvectl/bhyvectl.8

Modified: head/usr.sbin/bhyvectl/bhyvectl.8
==
--- head/usr.sbin/bhyvectl/bhyvectl.8   Sat Dec 19 13:17:25 2020
(r368810)
+++ head/usr.sbin/bhyvectl/bhyvectl.8   Sat Dec 19 13:21:40 2020
(r368811)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 04, 2020
+.Dd May 4, 2020
 .Dt BHYVECTL 8
 .Os
 .Sh NAME
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368810 - head/usr.sbin/camdd

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 13:17:25 2020
New Revision: 368810
URL: https://svnweb.freebsd.org/changeset/base/368810

Log:
  camdd(8): Fix the man page date
  
  The comment before the .Dd macro was missing a quotation mark, so that
  the date of the man page was always today.
  
  MFC after:3 days

Modified:
  head/usr.sbin/camdd/camdd.8

Modified: head/usr.sbin/camdd/camdd.8
==
--- head/usr.sbin/camdd/camdd.8 Sat Dec 19 13:11:44 2020(r368809)
+++ head/usr.sbin/camdd/camdd.8 Sat Dec 19 13:17:25 2020(r368810)
@@ -30,7 +30,7 @@
 .\" Authors: Ken Merry   (Spectra Logic Corporation)
 .\"
 .\" $FreeBSD$
-.\
+.\"
 .Dd November 11, 2015
 .Dt CAMDD 8
 .Os
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368809 - head/usr.sbin/config

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 13:11:44 2020
New Revision: 368809
URL: https://svnweb.freebsd.org/changeset/base/368809

Log:
  config: Fix a few mandoc related errors
  
  - new sentence, new line
  - no blank before trailing delimiter
  
  MFC after:1 week

Modified:
  head/usr.sbin/config/config.5
  head/usr.sbin/config/config.8

Modified: head/usr.sbin/config/config.5
==
--- head/usr.sbin/config/config.5   Sat Dec 19 13:05:54 2020
(r368808)
+++ head/usr.sbin/config/config.5   Sat Dec 19 13:11:44 2020
(r368809)
@@ -96,7 +96,7 @@ There can be more than one
 directive in a configuration file.
 The allowed list of CPU names is architecture specific and is
 defined in the file
-.Pa sys/conf/options. Ns Aq Ar arch .
+.Pa sys/conf/options . Ns Aq Ar arch .
 .\"  DEVICE 
 .Pp
 .It Ic device Ar name Op , Ar name Op ...
@@ -109,7 +109,7 @@ defined in the file
 Devices that are specific to architecture
 .Ar arch
 are defined in the file
-.Pa sys/conf/files. Ns Aq Ar arch .
+.Pa sys/conf/files . Ns Aq Ar arch .
 .\"  ENV 
 .Pp
 .It Ic env Ar filename
@@ -182,7 +182,7 @@ specified variables.
 .It Ic files Ar filename
 Specifies a file containing a list of files specific to that kernel
 configuration file (a la
-.Pa files. Ns Aq Ar arch ) .
+.Pa files . Ns Aq Ar arch ) .
 .\"  HINTS 
 .Pp
 .It Ic hints Ar filename
@@ -400,7 +400,7 @@ the file
 Options specific to architecture
 .Ar arch
 are specified in the file
-.Pa sys/conf/options. Ns Aq Ar arch .
+.Pa sys/conf/options . Ns Aq Ar arch .
 .\"  PROFILE 
 .Pp
 .It Ic profile Ar number
@@ -432,18 +432,18 @@ onwards, this information is passed to a booting kerne
 .Bl -tag -width ".Pa sys/conf/Makefile. Ns Ar arch" -compact
 .It Pa sys/compile/ Ns Ar NAME
 Compile directory created from a kernel configuration.
-.It Pa sys/conf/Makefile. Ns Ar arch
+.It Pa sys/conf/Makefile . Ns Ar arch
 .Pa Makefile
 fragments for architecture
 .Ar arch .
 .It Pa sys/conf/files
 Devices common to all architectures.
-.It Pa sys/conf/files. Ns Ar arch
+.It Pa sys/conf/files . Ns Ar arch
 Devices for architecture
 .Ar arch .
 .It Pa sys/conf/options
 Options common to all architectures.
-.It Pa sys/conf/options. Ns Ar arch
+.It Pa sys/conf/options . Ns Ar arch
 Options for architecture
 .Ar arch .
 .El

Modified: head/usr.sbin/config/config.8
==
--- head/usr.sbin/config/config.8   Sat Dec 19 13:05:54 2020
(r368808)
+++ head/usr.sbin/config/config.8   Sat Dec 19 13:11:44 2020
(r368809)
@@ -76,7 +76,8 @@ Search in
 .Ar path
 for any file included by the
 .Ic include
-directive.  This option may be specified more than once.
+directive.
+This option may be specified more than once.
 .It Fl d Ar destdir
 Use
 .Ar destdir
@@ -238,10 +239,10 @@ in the root file system.
 .Bl -tag -width "/sys/ARCH/compile/SYSTEM_NAME" -compact
 .It Pa /sys/conf/files
 list of common files system is built from
-.It Pa /sys/conf/Makefile. Ns Va ARCH
+.It Pa /sys/conf/Makefile . Ns Va ARCH
 generic makefile for the
 .Va ARCH
-.It Pa /sys/conf/files. Ns Va ARCH
+.It Pa /sys/conf/files . Ns Va ARCH
 list of
 .Va ARCH
 specific files
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368808 - head/usr.sbin/devctl

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 13:05:54 2020
New Revision: 368808
URL: https://svnweb.freebsd.org/changeset/base/368808

Log:
  devctl(8): Correct "sections out of conventional order" error
  
  MFC after:1 week

Modified:
  head/usr.sbin/devctl/devctl.8

Modified: head/usr.sbin/devctl/devctl.8
==
--- head/usr.sbin/devctl/devctl.8   Sat Dec 19 13:00:17 2020
(r368807)
+++ head/usr.sbin/devctl/devctl.8   Sat Dec 19 13:05:54 2020
(r368808)
@@ -194,11 +194,6 @@ tried first; if failed or not implemented, power reset
 If you have detached or suspended a child device explicitly and then
 do a reset, the child device will end up attached.
 .El
-.Sh BUGS
-Currently there is no administrative flag to prevent re-attach or resume
-of the manually detached or suspended devices after reset.
-Similarly, there is no flag to prevent un-suspending of the the manually
-suspended devices after system resume.
 .Sh SEE ALSO
 .Xr devctl 3 ,
 .Xr devinfo 8
@@ -207,3 +202,8 @@ The
 .Nm
 utility first appeared in
 .Fx 10.3 .
+.Sh BUGS
+Currently there is no administrative flag to prevent re-attach or resume
+of the manually detached or suspended devices after reset.
+Similarly, there is no flag to prevent un-suspending of the the manually
+suspended devices after system resume.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368807 - head/usr.bin/patch

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 13:00:17 2020
New Revision: 368807
URL: https://svnweb.freebsd.org/changeset/base/368807

Log:
  patch(1): Fix a few mandoc related issues
  
  - no blank before trailing delimiter
  
  MFC after:1 week

Modified:
  head/usr.bin/patch/patch.1

Modified: head/usr.bin/patch/patch.1
==
--- head/usr.bin/patch/patch.1  Sat Dec 19 12:55:27 2020(r368806)
+++ head/usr.bin/patch/patch.1  Sat Dec 19 13:00:17 2020(r368807)
@@ -164,7 +164,7 @@ ask any questions.
 It assumes the following:
 skip patches for which a file to patch cannot be found;
 patch files even though they have the wrong version for the
-.Qq Prereq:
+.Qq Prereq :
 line in the patch;
 and assume that patches are not reversed even if they look like they are.
 This option does not suppress commentary; use
@@ -288,7 +288,7 @@ in that it suppresses questions, but makes some differ
 skip patches for which a file to patch cannot be found (the same as
 .Fl f ) ;
 skip patches for which the file has the wrong version for the
-.Qq Prereq:
+.Qq Prereq :
 line in the patch;
 and assume that patches are reversed if they look like they are.
 .It Fl u , Fl Fl unified
@@ -393,7 +393,7 @@ line of context.
 If that fails, and the maximum fuzz factor is set to 2 or more,
 the first two and last two lines of context are ignored,
 and another scan is made.
-.Pq The default maximum fuzz factor is 2.
+.Pq The default maximum fuzz factor is 2 .
 .Pp
 If
 .Nm
@@ -450,7 +450,7 @@ and the
 file is specified in the line beginning with
 .Qq +++ .
 If there is an
-.Qq Index:
+.Qq Index :
 line in the leading garbage (regardless of the diff type),
 .Nm
 will use the file name from that line as the
@@ -544,13 +544,13 @@ First, you can save people a lot of grief by keeping a
 file which is patched to increment the patch level as the first diff in the
 patch file you send out.
 If you put a
-.Qq Prereq:
+.Qq Prereq :
 line in with the patch, it will not let them apply
 patches out of order without some warning.
 .Pp
 Second, make sure you have specified the file names right, either in a
 context diff header, or with an
-.Qq Index:
+.Qq Index :
 line.
 If you are patching something in a subdirectory, be sure to tell the patch
 user to specify a
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368806 - head/usr.bin/uname

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 12:55:27 2020
New Revision: 368806
URL: https://svnweb.freebsd.org/changeset/base/368806

Log:
  uname(1): Fix a typo in the man page date
  
  MFC after:3 days

Modified:
  head/usr.bin/uname/uname.1

Modified: head/usr.bin/uname/uname.1
==
--- head/usr.bin/uname/uname.1  Sat Dec 19 12:54:00 2020(r368805)
+++ head/usr.bin/uname/uname.1  Sat Dec 19 12:55:27 2020(r368806)
@@ -28,7 +28,7 @@
 .\"@(#)uname.1 8.3 (Berkeley) 4/8/94
 .\" $FreeBSD$
 .\"
-.Dd Novermber 13, 2020
+.Dd November 13, 2020
 .Dt UNAME 1
 .Os
 .Sh NAME
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368805 - head/usr.bin/ident

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 12:54:00 2020
New Revision: 368805
URL: https://svnweb.freebsd.org/changeset/base/368805

Log:
  ident(1): Normalizing date format
  
  MFC after:3 days

Modified:
  head/usr.bin/ident/ident.1

Modified: head/usr.bin/ident/ident.1
==
--- head/usr.bin/ident/ident.1  Sat Dec 19 12:47:40 2020(r368804)
+++ head/usr.bin/ident/ident.1  Sat Dec 19 12:54:00 2020(r368805)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd Jul 25, 2015
+.Dd July 25, 2015
 .Dt IDENT 1
 .Os
 .Sh NAME
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368804 - head/sbin/ipfw

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 12:47:40 2020
New Revision: 368804
URL: https://svnweb.freebsd.org/changeset/base/368804

Log:
  ipfw(8): Fix a few mandoc related issues
  
  - no blank before trailing delimiter
  - missing section argument: Xr inet_pton
  - skipping paragraph macro: Pp before Ss
  - unusual Xr order: syslogd after sysrc
  - tab in filled text
  
  There were a few multiline NAT examples which used the .Dl macro with
  tabs. I converted them to .Bd, which is a more suitable macro for that case.
  
  MFC after:1 week

Modified:
  head/sbin/ipfw/ipfw.8

Modified: head/sbin/ipfw/ipfw.8
==
--- head/sbin/ipfw/ipfw.8   Sat Dec 19 11:57:47 2020(r368803)
+++ head/sbin/ipfw/ipfw.8   Sat Dec 19 12:47:40 2020(r368804)
@@ -305,7 +305,6 @@ Finally, counters can be reset with the
 and
 .Cm resetlog
 commands.
-.Pp
 .Ss COMMAND OPTIONS
 The following general options are available when invoking
 .Nm :
@@ -389,7 +388,8 @@ listed.
 When listing pipes, sort according to one of the four
 counters (total or current packets or bytes).
 .It Fl t
-When listing, show last match timestamp converted with ctime().
+When listing, show last match timestamp converted with
+.Fn ctime .
 .It Fl T
 When listing, show last match timestamp as seconds from the epoch.
 This form can be more convenient for postprocessing by scripts.
@@ -1441,7 +1441,7 @@ list.
 Matches all IPv6 addresses with base
 .Ar addr
 (specified as allowed by
-.Xr inet_pton
+.Xr inet_pton 3
 or a hostname)
 and mask width of
 .Cm masklen
@@ -1450,12 +1450,12 @@ bits.
 Matches all IPv6 addresses with base
 .Ar addr
 (specified as allowed by
-.Xr inet_pton
+.Xr inet_pton 3
 or a hostname)
 and the mask of
 .Ar mask ,
 specified as allowed by
-.Xr inet_pton .
+.Xr inet_pton 3 .
 As an example, fe::640:0:0/::::0:0 will match
 fe:*:*:*:0:640:*:*.
 This form is advised only for non-contiguous
@@ -1518,7 +1518,7 @@ operand, and possibly grouped into
 .Pp
 The following match patterns can be used (listed in alphabetical order):
 .Bl -tag -width indent
-.It Cm // this is a comment.
+.It Cm // this is a comment .
 Inserts the specified text as a comment in the rule.
 Everything following // is considered as a comment and stored in the rule.
 You can have comment-only rules, which are listed as having a
@@ -1806,7 +1806,10 @@ keyword is special name used for compatibility with ol
 .It Cm layer2
 Matches only layer2 packets, i.e., those passed to
 .Nm
-from ether_demux() and ether_output_frame().
+from
+.Fn ether_demux
+and
+.Fn ether_output_frame .
 .It Cm limit Bro Cm src-addr | src-port | dst-addr | dst-port Brc Ar N Op Ar 
:flowname
 The firewall will only allow
 .Ar N
@@ -2258,8 +2261,8 @@ Shows generic table information and algo-specific data
 The following lookup algorithms are supported:
 .Bl -tag -width indent
 .It Ar algo-desc : algo-name | "algo-name algo-data"
-.It Ar algo-name: Ar addr:radix | addr:hash | iface:array | number:array | 
flow:hash
-.It Cm addr:radix
+.It Ar algo-name : Ar addr: radix | addr: hash | iface: array | number: array 
| flow: hash
+.It Cm addr: radix
 Separate Radix trees for IPv4 and IPv6, the same way as the routing table (see
 .Xr route 4 ) .
 Default choice for
@@ -2330,11 +2333,11 @@ IPv6 nexthop to fwd packets to.
 The
 .Cm tablearg
 argument can be used with the following actions:
-.Cm nat, pipe , queue, divert, tee, netgraph, ngtee, fwd, skipto, setfib,
+.Cm nat, pipe, queue, divert, tee, netgraph, ngtee, fwd, skipto, setfib ,
 action parameters:
-.Cm tag, untag,
+.Cm tag, untag ,
 rule options:
-.Cm limit, tagged.
+.Cm limit, tagged .
 .Pp
 When used with the
 .Cm skipto
@@ -2614,7 +2617,6 @@ mode can be enabled by setting the
 .Va net.inet.ip.dummynet.io_fast
 .Xr sysctl 8
 variable to a non-zero value.
-.Pp
 .Ss PIPE, QUEUE AND SCHEDULER CONFIGURATION
 The
 .Em pipe ,
@@ -3550,7 +3552,6 @@ Note that the behavior of stateless translator with re
 packets differs from stateful translator.
 If corresponding addresses was not found in the lookup tables, the packet
 will not be dropped and the search continues.
-.Pp
 .Ss XLAT464 CLAT translation
 XLAT464 CLAT NAT64 translator implements client-side stateless translation as
 defined in RFC6877 and is very similar to statless NAT64 translator
@@ -3662,12 +3663,12 @@ or
 .Xr kenv 1
 before ipfw module gets loaded.
 .Bl -tag -width indent
-.It Va net.inet.ip.fw.default_to_accept: No 0
+.It Va net.inet.ip.fw.default_to_accept : No 0
 Defines ipfw last rule behavior.
 This value overrides
 .Cd "options IPFW_DEFAULT_TO_(ACCEPT|DENY)"
 from kernel configuration file.
-.It Va net.inet.ip.fw.tables_max: No 128
+.It Va net.inet.ip.fw.tables_max : No 128
 Defines number of tables available in ipfw.
 Number cannot exceed 65534.
 .El
@@ -3682,7 +3683,7 @@ These are shown below together with their default valu
 .Xr sysctl 8
 command what value is actually in 

svn commit: r368803 - head/sbin/ping

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 11:57:47 2020
New Revision: 368803
URL: https://svnweb.freebsd.org/changeset/base/368803

Log:
  ping(8): Fix a mandoc related issue
  
  - unusual Xr punctuation: none before traceroute6(8)

Modified:
  head/sbin/ping/ping.8

Modified: head/sbin/ping/ping.8
==
--- head/sbin/ping/ping.8   Sat Dec 19 11:47:38 2020(r368802)
+++ head/sbin/ping/ping.8   Sat Dec 19 11:57:47 2020(r368803)
@@ -749,7 +749,7 @@ ping -6 -k agl dst.foo.com
 .Xr ip6 4 ,
 .Xr ifconfig 8 ,
 .Xr routed 8 ,
-.Xr traceroute 8
+.Xr traceroute 8 ,
 .Xr traceroute6 8
 .Rs
 .%A A. Conta
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368802 - head/sbin/nvmecontrol

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 11:47:38 2020
New Revision: 368802
URL: https://svnweb.freebsd.org/changeset/base/368802

Log:
  nvmecontrol(8): Fix a few mandoc related issues and add a SEE ALSO section
  
  - inserting missing end of block: Ss breaks Bl
  - skipping paragraph macro: Pp before Ss
  - referenced manual not found: Xr nvme 4 (2 times)
  - unknown standard specifier: St The
  
  The macro .St can only be used for standards known by mdoc(7). So add a
  SEE ALSO section and add a reference to the NVM Express Base Specification.
  
  MFC after:2 weeks

Modified:
  head/sbin/nvmecontrol/nvmecontrol.8

Modified: head/sbin/nvmecontrol/nvmecontrol.8
==
--- head/sbin/nvmecontrol/nvmecontrol.8 Sat Dec 19 11:03:54 2020
(r368801)
+++ head/sbin/nvmecontrol/nvmecontrol.8 Sat Dec 19 11:47:38 2020
(r368802)
@@ -35,7 +35,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 30, 2020
+.Dd December 19, 2020
 .Dt NVMECONTROL 8
 .Os
 .Sh NAME
@@ -205,7 +205,6 @@
 .Sh DESCRIPTION
 NVM Express (NVMe) is a storage protocol standard, for SSDs and other
 high-speed storage devices over PCI Express.
-.Pp
 .Ss identify
 The identify commands reports information from the drive's
 .Dv IDENTIFY_CONTROLLER
@@ -238,6 +237,7 @@ of
 is used to retrieve the
 .Dv IDENTIFY_CONTROLLER
 data associated with that drive.
+.El
 .Ss logpage
 The logpage command knows how to print log pages of various types.
 It also knows about vendor specific log pages from hgst/wdc and intel.
@@ -482,9 +482,7 @@ and
 commands send NVMe commands to
 either the administrative or the data part of the device.
 These commands are expected to be compatible with nvme-cli.
-Please see
-.St The NVMe Standard
-for details.
+Please see the NVMe Standard for details.
 .Bl -tag -width 16n
 .It Fl o -opcode Ar opcode
 Opcode to send.
@@ -674,6 +672,12 @@ linker set are added to the top-level commands.
 The members of the
 .Va logpage
 linker set are added to the logpage parsers.
+.Sh SEE ALSO
+.Rs
+.%T The NVM Express Base Specification
+.%D June 10, 2019
+.%U 
https://nvmexpress.org/wp-content/uploads/NVM-Express-1_4-2019.06.10-Ratified.pdf
+.Re
 .Sh HISTORY
 The
 .Nm
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r368714 - head/lib/libc/string

2020-12-19 Thread Kevin Bowling
On Thu, Dec 17, 2020 at 9:33 AM Ian Lepore  wrote:

> On Thu, 2020-12-17 at 18:22 +0200, Konstantin Belousov wrote:
> > On Thu, Dec 17, 2020 at 01:01:01PM +, Jessica Clarke wrote:
> > > On 17 Dec 2020, at 12:53, Konstantin Belousov 
> > > wrote:
> > > >
> > > > On Thu, Dec 17, 2020 at 12:41:47PM +, Mateusz Piotrowski
> > > > wrote:
> > > > > Author: 0mp (doc,ports committer)
> > > > > Date: Thu Dec 17 12:41:47 2020
> > > > > New Revision: 368714
> > > > > URL: https://svnweb.freebsd.org/changeset/base/368714
> > > > >
> > > > > Log:
> > > > >  strerror.3: Add an example for perror()
> > > > >
> > > > >  This is a nice and quick reference.
> > > > >
> > > > >  Reviewed by:   jilles, yuripv
> > > > >  MFC after: 2 weeks
> > > > >  Differential Revision: https://reviews.freebsd.org/D27623
> > > > >
> > > > > Modified:
> > > > >  head/lib/libc/string/strerror.3
> > > > >
> > > > > Modified: head/lib/libc/string/strerror.3
> > > > > ===
> > > > > ===
> > > > > --- head/lib/libc/string/strerror.3 Thu Dec 17 03:42:54
> > > > > 2020(r368713)
> > > > > +++ head/lib/libc/string/strerror.3 Thu Dec 17 12:41:47
> > > > > 2020(r368714)
> > > > > @@ -32,7 +32,7 @@
> > > > > .\" @(#)strerror.3  8.1 (Berkeley) 6/9/93
> > > > > .\" $FreeBSD$
> > > > > .\"
> > > > > -.Dd December 7, 2020
> > > > > +.Dd December 17, 2020
> > > > > .Dt STRERROR 3
> > > > > .Os
> > > > > .Sh NAME
> > > > > @@ -170,6 +170,31 @@ The use of these variables is deprecated;
> > > > > or
> > > > > .Fn strerror_r
> > > > > should be used instead.
> > > > > +.Sh EXAMPLES
> > > > > +The following example shows how to use
> > > > > +.Fn perror
> > > > > +to report an error.
> > > > > +.Bd -literal -offset 2n
> > > > > +#include 
> > > > > +#include 
> > > > > +#include 
> > > > > +
> > > > > +int
> > > > > +main(void)
> > > > > +{
> > > > > +   int fd;
> > > > > +
> > > > > +   if ((fd = open("/nonexistent", O_RDONLY)) == -1) {
> > > > > +   perror("open()");
> > > > > +   exit(1);
> > > > > +   }
> > > > > +printf("File descriptor: %d\en", fd);
> > > >
> > > > This lines is indented with spaces, while other lines have tabs.
> > > >
> > > > > +   return (0);
> > > >
> > > > return (0) is redundand.
> > >
> > > It's not required as per the standard, but omitting it is needlessly
> > > obfuscating it and bad practice. C lets you do a whole load of things
> > > that are a bad idea, and whilst this one is harmless, it is nonetheless
> > > confusing to anyone who is not intimately acquainted quirks like this
> > > special case in the standard.
> >
> > Why it is bad practice ?
> >
> > C is a small language, and while knowing some quirks (like this one)
> > seems to be optional, others are not. And worse, that other quirks are
> > essential for writing correct code at all. Consequence is that ignoring
> > details indicates insufficient knowledge of the fundamentals and lowers
> > the trust in the provided suggestion.
>
> I completely disagree.  Writing example code where you fail to return a
> value and just fall out the bottom of some function that declares it
> returns an int is just Bad Code.  Using some obscure quirk of the
> language as justification for that bad code doesn't help the situation
> at all.
>
> How obscure is this quirk?  I've been writing C code since 1983,
> including having released a freeware compiler (pre-gcc days) and
> working on a commercial C compiler.  I used to moderate the c_language
> conference on BIX (back when that was a thing).  I make my living
> writing C and C++ code every day.  And yet, I had completely forgotten
> about this quirk.
>
> Example code shouldn't be used to establish how much more clever you
> are than the reader, it should be as easy to understand as possible.
>
> -- Ian


In Kib’s defense I think this is commonly mentioned in C99 books (at least
that’s where I learned of it) so it depends on when and where someone
learned.  There are merits approaches of being explicit or brief.  I have
no preference directly but we should probably try to be uniform in our
examples with whatever is most common in the docs already.

>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368801 - head/sys/dev/usb/net

2020-12-19 Thread Hans Petter Selasky
Author: hselasky
Date: Sat Dec 19 11:03:54 2020
New Revision: 368801
URL: https://svnweb.freebsd.org/changeset/base/368801

Log:
  Ensure a minimum packet length before creating a mbuf in if_ure.
  
  Sponsored by: Mellanox Technologies // NVIDIA Networking

Modified:
  head/sys/dev/usb/net/if_ure.c

Modified: head/sys/dev/usb/net/if_ure.c
==
--- head/sys/dev/usb/net/if_ure.c   Sat Dec 19 11:03:04 2020
(r368800)
+++ head/sys/dev/usb/net/if_ure.c   Sat Dec 19 11:03:54 2020
(r368801)
@@ -711,7 +711,7 @@ ure_bulk_read_callback(struct usb_xfer *xfer, usb_erro
goto tr_setup;
}
 
-   if (len != 0)
+   if (len >= (ETHER_HDR_LEN + ETHER_CRC_LEN))
m = ure_makembuf(pc, off, len - ETHER_CRC_LEN);
else
m = NULL;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368800 - head/sbin/devd

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 11:03:04 2020
New Revision: 368800
URL: https://svnweb.freebsd.org/changeset/base/368800

Log:
  devd.conf(5): Fix a mandoc related issue
  
  - sections out of conventional order: Sh SEE ALSO
  
  MFC after:1 week

Modified:
  head/sbin/devd/devd.conf.5

Modified: head/sbin/devd/devd.conf.5
==
--- head/sbin/devd/devd.conf.5  Sat Dec 19 11:00:11 2020(r368799)
+++ head/sbin/devd/devd.conf.5  Sat Dec 19 11:03:04 2020(r368800)
@@ -786,12 +786,12 @@ detach 0 {
 The installed
 .Pa /etc/devd.conf
 has many additional examples.
-.Sh BUGS
-The variable expansion's interaction with single quotes is
-suboptimal and surprising.
 .Sh SEE ALSO
 .Xr cam 4 ,
 .Xr coretemp 4 ,
 .Xr devfs 5 ,
 .Xr re_format 7 ,
 .Xr devd 8
+.Sh BUGS
+The variable expansion's interaction with single quotes is
+suboptimal and surprising.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368799 - head/sys/dev/usb/net

2020-12-19 Thread Hans Petter Selasky
Author: hselasky
Date: Sat Dec 19 11:00:11 2020
New Revision: 368799
URL: https://svnweb.freebsd.org/changeset/base/368799

Log:
  Move SYSCTL_ADD_PROC() to unlocked context in if_ure to avoid lock order 
reversal.
  
  MFC after:1 week
  Reported by:  Mark Millard 
  Sponsored by: Mellanox Technologies // NVIDIA Networking

Modified:
  head/sys/dev/usb/net/if_ure.c

Modified: head/sys/dev/usb/net/if_ure.c
==
--- head/sys/dev/usb/net/if_ure.c   Sat Dec 19 10:31:25 2020
(r368798)
+++ head/sys/dev/usb/net/if_ure.c   Sat Dec 19 11:00:11 2020
(r368799)
@@ -959,8 +959,6 @@ static void
 ure_attach_post(struct usb_ether *ue)
 {
struct ure_softc *sc = uether_getsc(ue);
-   struct sysctl_ctx_list *sctx;
-   struct sysctl_oid *soid;
 
sc->sc_rxstarted = 0;
sc->sc_phyno = 0;
@@ -988,18 +986,13 @@ ure_attach_post(struct usb_ether *ue)
sc->sc_ue.ue_eaddr[0] &= ~0x01; /* unicast */
sc->sc_ue.ue_eaddr[0] |= 0x02;  /* locally administered */
}
-
-   sctx = device_get_sysctl_ctx(sc->sc_ue.ue_dev);
-   soid = device_get_sysctl_tree(sc->sc_ue.ue_dev);
-   SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "chipver",
-   CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0,
-   ure_sysctl_chipver, "A",
-   "Return string with chip version.");
 }
 
 static int
 ure_attach_post_sub(struct usb_ether *ue)
 {
+   struct sysctl_ctx_list *sctx;
+   struct sysctl_oid *soid;
struct ure_softc *sc;
struct ifnet *ifp;
int error;
@@ -1032,6 +1025,13 @@ ure_attach_post_sub(struct usb_ether *ue)
uether_ifmedia_upd, ue->ue_methods->ue_mii_sts,
BMSR_DEFCAPMASK, sc->sc_phyno, MII_OFFSET_ANY, 0);
mtx_unlock();
+
+   sctx = device_get_sysctl_ctx(sc->sc_ue.ue_dev);
+   soid = device_get_sysctl_tree(sc->sc_ue.ue_dev);
+   SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "chipver",
+   CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0,
+   ure_sysctl_chipver, "A",
+   "Return string with chip version.");
 
return (error);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368798 - head/share/man/man9

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 10:31:25 2020
New Revision: 368798
URL: https://svnweb.freebsd.org/changeset/base/368798

Log:
  sysctl(9): Fix a few mandoc related issues
  
  - missing comma before name: Nm SYSCTL_UQUAD
  - bad NAME section content: text
  
  MFC after:1 week

Modified:
  head/share/man/man9/sysctl.9

Modified: head/share/man/man9/sysctl.9
==
--- head/share/man/man9/sysctl.9Sat Dec 19 10:26:40 2020
(r368797)
+++ head/share/man/man9/sysctl.9Sat Dec 19 10:31:25 2020
(r368798)
@@ -95,8 +95,8 @@
 .Nm SYSCTL_UINT ,
 .Nm SYSCTL_ULONG ,
 .Nm SYSCTL_UMA_CUR ,
-.Nm SYSCTL_UMA_MAX
-.Nm SYSCTL_UQUAD ,
+.Nm SYSCTL_UMA_MAX ,
+.Nm SYSCTL_UQUAD
 .Nd Dynamic and static sysctl MIB creation functions
 .Sh SYNOPSIS
 .In sys/param.h
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368797 - head/share/man/man9

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 10:26:40 2020
New Revision: 368797
URL: https://svnweb.freebsd.org/changeset/base/368797

Log:
  ofw_bus_status_okay(9): Fix a few mandoc related issues
  
  - missing comma before name: Nm ofw_bus_status_okay
  - missing comma before name: Nm ofw_bus_node_status_okay
  - skipping paragraph macro: Pp after Sh
  
  MFC after:1 week

Modified:
  head/share/man/man9/ofw_bus_status_okay.9

Modified: head/share/man/man9/ofw_bus_status_okay.9
==
--- head/share/man/man9/ofw_bus_status_okay.9   Sat Dec 19 10:24:36 2020
(r368796)
+++ head/share/man/man9/ofw_bus_status_okay.9   Sat Dec 19 10:26:40 2020
(r368797)
@@ -32,8 +32,8 @@
 .Dt ofw_bus_status_okay 9
 .Os
 .Sh NAME
-.Nm ofw_bus_get_status
-.Nm ofw_bus_status_okay
+.Nm ofw_bus_get_status ,
+.Nm ofw_bus_status_okay ,
 .Nm ofw_bus_node_status_okay
 .Nd check status of the device tree node
 .Sh SYNOPSIS
@@ -47,7 +47,6 @@
 .Ft int
 .Fn ofw_bus_node_status_okay "phandle_t node"
 .Sh DESCRIPTION
-.Pp
 The "status" property of the device tree node indicates whether the device is
 enabled or not.
 Multiple hardware versions might be built using the same base System-on-Chip
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368796 - head/share/man/man9

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 10:24:36 2020
New Revision: 368796
URL: https://svnweb.freebsd.org/changeset/base/368796

Log:
  ofw_bus_is_compatible(9): Fix a few mandoc related issues
  
  - missing comma before name: Nm ofw_bus_is_compatible_strict
  - missing comma before name: Nm ofw_bus_node_is_compatible
  - missing comma before name: Nm ofw_bus_search_compatible
  - skipping paragraph macro: Pp after Sh
  
  MFC after:1 week

Modified:
  head/share/man/man9/ofw_bus_is_compatible.9

Modified: head/share/man/man9/ofw_bus_is_compatible.9
==
--- head/share/man/man9/ofw_bus_is_compatible.9 Sat Dec 19 10:20:22 2020
(r368795)
+++ head/share/man/man9/ofw_bus_is_compatible.9 Sat Dec 19 10:24:36 2020
(r368796)
@@ -32,9 +32,9 @@
 .Dt ofw_bus_is_compatible 9
 .Os
 .Sh NAME
-.Nm ofw_bus_is_compatible
-.Nm ofw_bus_is_compatible_strict
-.Nm ofw_bus_node_is_compatible
+.Nm ofw_bus_is_compatible ,
+.Nm ofw_bus_is_compatible_strict ,
+.Nm ofw_bus_node_is_compatible ,
 .Nm ofw_bus_search_compatible
 .Nd check device tree nodes for compatibility with drivers
 .Sh SYNOPSIS
@@ -50,7 +50,6 @@
 .Ft const struct ofw_compat_data *
 .Fn ofw_bus_search_compatible "device_t dev" "const struct ofw_compat_data 
*compat"
 .Sh DESCRIPTION
-.Pp
 The "compatible" property of the device tree node is used to
 identify the type of the device the node represents.
 The property is a list of one or more strings that represent
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368795 - head/share/man/man9

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 10:20:22 2020
New Revision: 368795
URL: https://svnweb.freebsd.org/changeset/base/368795

Log:
  fail(9): Fix a few mandoc related issues
  
  - function name without markup: return()
  - function name without markup: print()
  
  MFC after:1 week

Modified:
  head/share/man/man9/fail.9

Modified: head/share/man/man9/fail.9
==
--- head/share/man/man9/fail.9  Sat Dec 19 10:18:21 2020(r368794)
+++ head/share/man/man9/fail.9  Sat Dec 19 10:20:22 2020(r368795)
@@ -218,9 +218,15 @@ The operator -> can be used to express cascading terms
 If you specify ->, it means that if  does not
 .Ql execute ,
  is evaluated.
-For the purpose of this operator, the return() and print() operators
-are the only types that cascade.
-A return() term only cascades if the code executes, and a print()
+For the purpose of this operator, the
+.Fn return
+and
+.Fn print
+operators are the only types that cascade.
+A
+.Fn return
+term only cascades if the code executes, and a
+.Fn print
 term only cascades when passed a non-zero argument.
 A pid can optionally be specified.
 The fail point term is only executed when invoked by a process with a
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368794 - head/share/man/man9

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 10:18:21 2020
New Revision: 368794
URL: https://svnweb.freebsd.org/changeset/base/368794

Log:
  driver(9): Fix a mandoc related issue
  
  - sections out of conventional order: Sh SEE ALSO
  
  MFC after:1 week

Modified:
  head/share/man/man9/driver.9

Modified: head/share/man/man9/driver.9
==
--- head/share/man/man9/driver.9Sat Dec 19 10:15:58 2020
(r368793)
+++ head/share/man/man9/driver.9Sat Dec 19 10:18:21 2020
(r368794)
@@ -102,11 +102,6 @@ macro will also create the devclass with the name of t
 can optionally call extra initialisation code in the driver by
 specifying an extra module event handler and argument as the last two
 arguments.
-.Sh HISTORY
-The
-.Nm
-framework first appeared in
-.Fx 2.2.7 .
 .Sh SEE ALSO
 .Xr devclass 9 ,
 .Xr device 9 ,
@@ -116,6 +111,11 @@ framework first appeared in
 .Xr DEVICE_PROBE 9 ,
 .Xr DEVICE_SHUTDOWN 9 ,
 .Xr DRIVER_MODULE 9
+.Sh HISTORY
+The
+.Nm
+framework first appeared in
+.Fx 2.2.7 .
 .Sh AUTHORS
 This manual page was written by
 .An Doug Rabson .
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368793 - head/share/man/man9

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 10:15:58 2020
New Revision: 368793
URL: https://svnweb.freebsd.org/changeset/base/368793

Log:
  bhnd_erom(9): Fix a few mandoc related issues
  
  - skipping paragraph macro: Pp before Bl
  - skipping paragraph macro: Pp after Ss
  - skipping paragraph macro: Pp at the end of Ss
  - unusual Xr punctuation: none before bhnd_driver_get_erom_class(9)
  - unusual Xr punctuation: none before bus_space(9)
  
  MFC after:1 week

Modified:
  head/share/man/man9/bhnd_erom.9

Modified: head/share/man/man9/bhnd_erom.9
==
--- head/share/man/man9/bhnd_erom.9 Sat Dec 19 10:11:37 2020
(r368792)
+++ head/share/man/man9/bhnd_erom.9 Sat Dec 19 10:15:58 2020
(r368793)
@@ -336,7 +336,6 @@ If the core information is not desired, set
 to
 .Dv NULL .
 .Ss Bus Space I/O
-.Pp
 The
 .Vt bhnd_erom_io
 structure provides a set of I/O callbacks used by
@@ -353,7 +352,6 @@ callbacks directly.
 The
 .Vt bhnd_erom_io
 structure contains these required fields:
-.Pp
 .Bl -tag -width "read" -offset indent
 .It Fa map
 A function implementing
@@ -424,7 +422,6 @@ relative to the bus address previously mapped using
 The
 .Fa width
 must be one of 1, 2, or 4 bytes.
-.Pp
 .Sh RETURN VALUES
 The
 .Fn bhnd_erom_probe
@@ -477,8 +474,8 @@ functions return 0 on success, otherwise an appropriat
 .Sh SEE ALSO
 .Xr bhnd 4 ,
 .Xr bhnd 9 ,
-.Xr bhnd_alloc_resource 9
-.Xr bhnd_driver_get_erom_class 9
+.Xr bhnd_alloc_resource 9 ,
+.Xr bhnd_driver_get_erom_class 9 ,
 .Xr bus_space 9
 .Sh AUTHORS
 .An -nosplit
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368792 - head/share/man/man9

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 10:11:37 2020
New Revision: 368792
URL: https://svnweb.freebsd.org/changeset/base/368792

Log:
  bhnd(9): Fix a few mandoc related issues
  
  - skipping paragraph macro: Pp before Bl
  - skipping paragraph macro: Pp at the end of Ss
  - missing section argument: Xr device_set_desc
  - unusual Xr punctuation: none before bhnd_erom(9)
  
  MFC after:1 week

Modified:
  head/share/man/man9/bhnd.9

Modified: head/share/man/man9/bhnd.9
==
--- head/share/man/man9/bhnd.9  Sat Dec 19 09:55:02 2020(r368791)
+++ head/share/man/man9/bhnd.9  Sat Dec 19 10:11:37 2020(r368792)
@@ -715,7 +715,6 @@ per-core management registers.
 When BHND hardware is used as a host-connected peripheral (e.g., in a PCI Wi-Fi
 card), the on-chip peripheral controller core is configured to operate as
 an endpoint device, bridging access to the SoC hardware:
-.Pp
 .Bl -dash -offset indent
 .It
 Host access to SoC address space is provided via a set of register windows
@@ -925,7 +924,6 @@ A pointer to the bus
 If true, the resource requires bus window remapping before it is MMIO
 accessible.
 .El
-.Pp
 .\"
 .Ss "Bus Space Functions"
 The bhnd_bus_space functions wrap their equivalent
@@ -1116,7 +1114,6 @@ bus of device
 The returned
 .Vt bhnd_chipid
 struct contains the following fields:
-.Pp
 .Bl -tag -width "enum_addr" -offset indent
 .It Fa chip_id
 The chip identifier.
@@ -1320,7 +1317,6 @@ on success.
 The
 .Vt bhnd_board_info
 structure contains the following fields:
-.Pp
 .Bl -tag -width "board_srom_rev" -offset indent
 .It Fa board_vendor
 Vendor ID of the board manufacturer (PCI-SIG assigned).
@@ -1362,7 +1358,6 @@ fields will be populated from device NVRAM.
 .Pp
 Symbolic constants for common board flags are defined in
 .In dev/bhnd/bhnd_ids.h .
-.Pp
 .Ss "Device Matching Functions"
 The bhnd device matching functions are used to match against core, chip, and
 board-level device attributes.
@@ -1481,7 +1476,6 @@ is returned.
 A
 .Vt bhnd_board_match
 match descriptor may be initialized using one or more of the following macros:
-.Pp
 .Bl -tag -width "Fn BHND_MATCH_BOARD_VENDOR vendor" -offset indent
 .It Fn BHND_MATCH_BOARD_VENDOR "vendor"
 Match on boards with a vendor equal to
@@ -1518,7 +1512,6 @@ struct bhnd_board_match board_desc = {
 A
 .Vt bhnd_chip_match
 match descriptor may be initialized using one or more of the following macros:
-.Pp
 .Bl -tag -width "Fn BHND_MATCH_CHIP_IPR id pkg hwrev" -offset indent
 .It Fn BHND_MATCH_CHIP_ID "id"
 Match on chips with an ID equal to
@@ -1565,7 +1558,6 @@ struct bhnd_chip_match chip_desc = {
 A
 .Vt bhnd_core_match
 match descriptor may be initialized using one or more of the following macros:
-.Pp
 .Bl -tag -width "Fn BHND_MATCH_CORE_VENDOR vendor" -offset indent
 .It Fn BHND_MATCH_CORE_VENDOR "vendor"
 Match on cores with a vendor ID equal to
@@ -1711,7 +1703,6 @@ bridged backplane.
 A
 .Vt bhnd_device
 table entry may be initialized using one of the following macros:
-.Pp
 .Bl -ohang -offset indent
 .It Fn BHND_DEVICE "vendor" "device" "desc" "quirks" "flags"
 Match on devices with a vendor ID equal to
@@ -2242,7 +2233,6 @@ will be discarded.
 .Pp
 The following clocks are supported, and may be combined using bitwise OR to
 request multiple clocks:
-.Pp
 .Bl -tag -width ".Dv BHND_CLOCK_DYN" -offset indent
 .It BHND_CLOCK_DYN
 Dynamically select an appropriate clock source based on all outstanding clock
@@ -2454,7 +2444,7 @@ device identification of
 overriding the core name with the specified
 .Fa dev_name ,
 to populate the device's verbose description using
-.Xr device_set_desc .
+.Xr device_set_desc 9 .
 .Pp
 The
 .Fn bhnd_set_default_core_desc
@@ -2463,7 +2453,7 @@ function uses the
 device identification of
 .Fa dev
 to populate the device's verbose description using
-.Xr device_set_desc .
+.Xr device_set_desc 9 .
 .Pp
 The
 .Fn bhnd_vendor_name
@@ -2491,7 +2481,6 @@ functions return a pointer to
 on success, a null pointer otherwise.
 .\"
 .Ss "Device Configuration Functions"
-.Pp
 The
 .Fn bhnd_read_config
 and
@@ -2521,7 +2510,6 @@ and
 functions return 0 on success, otherwise an appropriate error code is returned.
 .\"
 .Ss "Device Information Functions"
-.Pp
 The
 .Fn bhnd_read_board_info
 function returns 0 on success, otherwise an appropriate error code is returned.
@@ -2542,7 +2530,6 @@ If fetching the requested DMA address translation othe
 appropriate error code will be returned.
 .\"
 .Ss "Interrupt Functions"
-.Pp
 The
 .Fn bhnd_get_intr_ivec
 function returns
@@ -2641,7 +2628,6 @@ The
 and
 .Fn bhnd_release_ext_rsrc
 functions return 0 on success, otherwise an appropriate error code is returned.
-.Pp
 .\"
 .Ss "Service Provider Functions"
 The
@@ -2664,14 +2650,13 @@ function returns a pointer to
 on success, a null pointer if the requested provider is not registered.
 .\"
 .Ss "Utility Functions"
-.Pp
 The
 .Fn 

svn commit: r368791 - head/share/man/man9

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 09:55:02 2020
New Revision: 368791
URL: https://svnweb.freebsd.org/changeset/base/368791

Log:
  disk(9): Fix a few mandoc related errors
  
  - function name without markup: g_io_deliver()
  - function name without markup: disk_gone()
  - sections out of conventional order: Sh SEE ALSO
  - referenced manual not found: Xr MAKE_DEV 9
  
  Actually the man page of MAKE_DEV has never existed.
  
  MFC after:3 days

Modified:
  head/share/man/man9/disk.9

Modified: head/share/man/man9/disk.9
==
--- head/share/man/man9/disk.9  Sat Dec 19 09:40:05 2020(r368790)
+++ head/share/man/man9/disk.9  Sat Dec 19 09:55:02 2020(r368791)
@@ -172,9 +172,11 @@ kernel panic to record a copy of the system RAM to the
 Optional: if this method is provided, it gives the disk driver the
 opportunity to override the default GEOM response to BIO_GETATTR requests.
 This function should return -1 if the attribute is not handled, 0 if the
-attribute is handled, or an errno to be passed to g_io_deliver().
+attribute is handled, or an errno to be passed to
+.Fn g_io_deliver .
 .It Vt "disk_gone_t *" Va d_gone
-Optional: if this method is provided, it will be called after disk_gone()
+Optional: if this method is provided, it will be called after
+.Fn disk_gone
 is called, once GEOM has finished its cleanup process.
 Once this callback is called, it is safe for the disk driver to free all of
 its resources, as it will not be receiving further calls from GEOM.
@@ -241,15 +243,14 @@ Typically used to store a pointer to the drivers
 .Vt softc
 structure for this disk device.
 .El
+.Sh SEE ALSO
+.Xr GEOM 4 ,
+.Xr devfs 5
 .Sh HISTORY
 The
 .Nm kernel disk storage API
 first appeared in
 .Fx 4.9 .
-.Sh SEE ALSO
-.Xr GEOM 4 ,
-.Xr devfs 5 ,
-.Xr MAKE_DEV 9
 .Sh AUTHORS
 This manual page was written by
 .An Robert Watson .
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368790 - head/share/man/man9

2020-12-19 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Sat Dec 19 09:40:05 2020
New Revision: 368790
URL: https://svnweb.freebsd.org/changeset/base/368790

Log:
  accept_filter(9): Fix a mandoc related error
  
  - no blank before trailing delimiter

Modified:
  head/share/man/man9/accept_filter.9

Modified: head/share/man/man9/accept_filter.9
==
--- head/share/man/man9/accept_filter.9 Sat Dec 19 08:38:31 2020
(r368789)
+++ head/share/man/man9/accept_filter.9 Sat Dec 19 09:40:05 2020
(r368790)
@@ -143,7 +143,7 @@ This manual page was written by
 .An Alfred Perlstein ,
 .An Sheldon Hearn
 and
-.An Jeroen Ruigrok van der Werven.
+.An Jeroen Ruigrok van der Werven .
 .Pp
 The accept filter concept was pioneered by
 .An David Filo
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368789 - head/libexec/rtld-elf/rtld-libc

2020-12-19 Thread Ryan Libby
Author: rlibby
Date: Sat Dec 19 08:38:31 2020
New Revision: 368789
URL: https://svnweb.freebsd.org/changeset/base/368789

Log:
  rtld-elf: link udivmoddi4 from compiler_rt
  
  This fixes the gcc9 build of rtld-elf32 on amd64, which needed an
  implementation of udivmoddi4.
  
  rtld-elf uses certain functions normally found in libc, and so it
  includes certain files from libc in its own build.  It has two
  mechanisms to include files from libc: one that rebuilds source files in
  the rtld-elf environment, and one that extracts object files from a
  purpose-built no-SSP PIC archive.
  
  In addition to libc functions, rtld-elf may need to link functions
  normally found in libcompiler_rt (formerly libgcc).  Now, add an ability
  to rebuild libcompiler_rt source files in the rtld-elf environment.  We
  don't yet have a need for an object file extraction mechanism.
  
  libcompiler_rt could also supply udivdi3 and umoddi3, but leave them
  alone for now.
  
  Reviewed by:  arichardson, kib
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D27665

Modified:
  head/libexec/rtld-elf/rtld-libc/Makefile.inc

Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc
==
--- head/libexec/rtld-elf/rtld-libc/Makefile.incSat Dec 19 08:38:27 
2020(r368788)
+++ head/libexec/rtld-elf/rtld-libc/Makefile.incSat Dec 19 08:38:31 
2020(r368789)
@@ -51,8 +51,12 @@ _libc_other_objects= sigsetjmp lstat stat fstat fstata
 getdirentries _getdirentries _close _fcntl _open _openat _read \
 _sigprocmask _write readlink __realpathat _setjmp setjmp setjmperr
 
+# Allow building files from libcompiler_rt.  Beware, there are some name
+# collisions between libcompiler_rt files and libc files.
+CRTSRC=${SRCTOP}/contrib/llvm-project/compiler-rt/lib/builtins
+.PATH: ${CRTSRC}
 
-# Finally add additional architecture-dependent libc dependencies
+# Finally add additional architecture-dependent dependencies
 .if ${LIBC_ARCH} == "arm"
 # ARM needs aeabi_unwind_cpp for _setjmp
 _libc_other_objects+=aeabi_unwind_cpp
@@ -60,6 +64,7 @@ _libc_other_objects+=aeabi_unwind_cpp
 # __udivdi3 is needed by kvprintf() in rtld_printf.c
 # i386 also needs i386_set_gsbase for allocate_initial_tls()
 _libc_other_objects+=umoddi3 udivdi3 qdivrem i386_set_gsbase
+SRCS+= udivmoddi4.c
 .elif ${LIBC_ARCH} == "powerpc" || ${LIBC_ARCH} == "powerpcspe"
 # ppc needs __syncicache for reloc.c and __umoddi3+__udivdi3 for rtld_printf.c
 _libc_other_objects+=syncicache umoddi3 udivdi3 qdivrem
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368788 - head/libexec/rtld-elf/rtld-libc

2020-12-19 Thread Ryan Libby
Author: rlibby
Date: Sat Dec 19 08:38:27 2020
New Revision: 368788
URL: https://svnweb.freebsd.org/changeset/base/368788

Log:
  rtld-libc: fix incremental build
  
  ar cr is an update of an archive, not a creation of a new one.  During
  incremental builds (e.g. with meta mode) the archive was not getting
  cleaned, and so could retain now-deleted objects from previous builds.
  Now, delete the archive before creating/updating it.
  
  Reviewed by:  arichardson, bdrewery, kib
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D27663

Modified:
  head/libexec/rtld-elf/rtld-libc/Makefile.inc

Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc
==
--- head/libexec/rtld-elf/rtld-libc/Makefile.incSat Dec 19 08:16:33 
2020(r368787)
+++ head/libexec/rtld-elf/rtld-libc/Makefile.incSat Dec 19 08:38:27 
2020(r368788)
@@ -89,8 +89,9 @@ CLEANFILES+=${_obj}.nossppico
 # We insert all the .o files from libc_nossp_pic.a into a new rtld_libc.a file
 # to ensure that only .o files that are actually used end up being included.
 rtld_libc.a: ${LIBC_NOSSP_PIC} 
${SRCTOP}/libexec/rtld-elf/rtld-libc/Makefile.inc
+   @rm -f ${.TARGET}
${AR} x ${LIBC_NOSSP_PIC} ${_rtld_libc_objs}
-   ${AR} cr ${.OBJDIR}/${.TARGET} ${_rtld_libc_objs}
+   ${AR} cr ${.TARGET} ${_rtld_libc_objs}
 CLEANFILES+=rtld_libc.a
 LDADD+=${.OBJDIR}/rtld_libc.a
 beforelinking: rtld_libc.a
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368787 - stable/12/tests/sys/sys

2020-12-19 Thread Ryan Libby
Author: rlibby
Date: Sat Dec 19 08:16:33 2020
New Revision: 368787
URL: https://svnweb.freebsd.org/changeset/base/368787

Log:
  MFC r354991-r354992 (by lwhsu)
  
  r354991:
  Fix GCC build.
  
  Sponsored by: The FreeBSD Foundation
  
  r354992:
  Initialize variable bitstr
  
  r354991 removed variable-sized object initializing on defining.  For the safe
  reason, manually initialize the members to 0.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/12/tests/sys/sys/bitstring_test.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/tests/sys/sys/bitstring_test.c
==
--- stable/12/tests/sys/sys/bitstring_test.cSat Dec 19 04:28:25 2020
(r368786)
+++ stable/12/tests/sys/sys/bitstring_test.cSat Dec 19 08:16:33 2020
(r368787)
@@ -347,9 +347,11 @@ ATF_TC_WITHOUT_HEAD(bit_ffs_area);
 ATF_TC_BODY(bit_ffs_area, tc)
 {
const int nbits = 72;
-   bitstr_t bit_decl(bitstr, nbits) = {};
+   bitstr_t bit_decl(bitstr, nbits);
int location;
 
+   memset(bitstr, 0, bitstr_size(nbits));
+
bit_set(bitstr, 5);
bit_set(bitstr, 6);
 
@@ -416,7 +418,7 @@ ATF_TC_WITHOUT_HEAD(bit_ffc_area);
 ATF_TC_BODY(bit_ffc_area, tc)
 {
const int nbits = 80;
-   bitstr_t bit_decl(bitstr, nbits) = {};
+   bitstr_t bit_decl(bitstr, nbits);
int location;
 
/* set all bits */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"