diff --git a/lib/libfetch/fetch.c b/lib/libfetch/fetch.c index df97bf486f9b..12cbd0fb746f 100644 --- a/lib/libfetch/fetch.c +++ b/lib/libfetch/fetch.c @@ -399,7 +399,7 @@ fetchParseURL(const char *URL) /* hostname */ if (*p == '[') { - q = p + 1 + strspn(p + 1, ":0123456789ABCDEFabcdef"); + q = p + 1 + strspn(p + 1, ":0123456789ABCDEFabcdef."); if (*q++ != ']') goto ouch; } else { diff --git a/sys/arm/conf/TEGRA124 b/sys/arm/conf/TEGRA124 index 6a39abf6cee4..058a85955a04 100644 --- a/sys/arm/conf/TEGRA124 +++ b/sys/arm/conf/TEGRA124 @@ -128,6 +128,11 @@ device drm2 #device sound #device snd_hda +# evdev interface +options EVDEV_SUPPORT # evdev support in legacy drivers +device evdev # input event device support +device uinput # install /dev/uinput cdev + # HID support device hid # Generic HID support device hidbus # Generic HID Bus diff --git a/sys/sys/buf_ring.h b/sys/sys/buf_ring.h index 32c9f5b15f22..cb18175c3a75 100644 --- a/sys/sys/buf_ring.h +++ b/sys/sys/buf_ring.h @@ -30,11 +30,18 @@ #ifndef _SYS_BUF_RING_H_ #define _SYS_BUF_RING_H_ +#include +#include +#include #include #ifdef DEBUG_BUFRING +#ifdef _KERNEL #include #include +#else +#error "DEBUG_BUFRING is only supported in kernel" +#endif #endif struct buf_ring { @@ -361,8 +368,36 @@ buf_ring_count(struct buf_ring *br) & br->br_prod_mask); } +#ifdef _KERNEL struct buf_ring *buf_ring_alloc(int count, struct malloc_type *type, int flags, struct mtx *); void buf_ring_free(struct buf_ring *br, struct malloc_type *type); +#else -#endif +#include + +static inline struct buf_ring * +buf_ring_alloc(int count) +{ + struct buf_ring *br; + + KASSERT(powerof2(count), ("buf ring must be size power of 2")); + + br = calloc(1, sizeof(struct buf_ring) + count * sizeof(void *)); + if (br == NULL) + return (NULL); + br->br_prod_size = br->br_cons_size = count; + br->br_prod_mask = br->br_cons_mask = count - 1; + br->br_prod_head = br->br_cons_head = 0; + br->br_prod_tail = br->br_cons_tail = 0; + return (br); +} + +static inline void +buf_ring_free(struct buf_ring *br) +{ + free(br); +} + +#endif /* !_KERNEL */ +#endif /* _SYS_BUF_RING_H_ */ diff --git a/usr.sbin/mountd/mountd.8 b/usr.sbin/mountd/mountd.8 index 6528aa3c94a1..5c5717063f15 100644 --- a/usr.sbin/mountd/mountd.8 +++ b/usr.sbin/mountd/mountd.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 8, 2024 +.Dd July 5, 2024 .Dt MOUNTD 8 .Os .Sh NAME @@ -35,7 +35,7 @@ mount requests .Sh SYNOPSIS .Nm -.Op Fl 2AdelnRrS +.Op Fl 2AdelNnRrSs .Op Fl h Ar bindip .Op Fl p Ar port .Op Ar exportsfile ... @@ -98,6 +98,10 @@ to the list. Cause all succeeded .Nm requests to be logged. +.It Fl N +Cause +.Nm +to execute in the foreground instead of in daemon mode. .It Fl n Allow non-root mount requests to be served. This should only be specified if there are clients such as PC's, @@ -158,6 +162,13 @@ crashes while an exports load is in progress, .Nm must be restarted to get the nfsd threads running again, if this option is used. +.It Fl s +Cause +.Nm +to skip automatic binding to localhost for IPv4 and IPv6. +This option is meaningless unless +.Fl h +has also been used. .El .Pp When diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 14693a922186..00293909614e 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -287,6 +287,8 @@ static int *sock_fd; static int sock_fdcnt; static int sock_fdpos; static int suspend_nfsd = 0; +static int nofork = 0; +static int skiplocalhost = 0; static int opt_flags; static int have_v6 = 1; @@ -436,7 +438,7 @@ main(int argc, char **argv) else close(s); - while ((c = getopt(argc, argv, "2Adeh:lnp:RrS")) != -1) + while ((c = getopt(argc, argv, "2Adeh:lNnp:RrSs")) != -1) switch (c) { case '2': force_v2 = 1; @@ -495,6 +497,12 @@ main(int argc, char **argv) case 'S': suspend_nfsd = 1; break; + case 'N': + nofork = 1; + break; + case 's': + skiplocalhost = 1; + break; default: usage(); } @@ -514,6 +522,9 @@ main(int argc, char **argv) } } + if (nhosts == 0 && skiplocalhost != 0) + warnx("-s without -h, ignored"); + if (modfind("nfsd") < 0) { /* Not present in kernel, try loading it */ if (kldload("nfsd") < 0 || modfind("nfsd") < 0) @@ -535,7 +546,7 @@ main(int argc, char **argv) get_mountlist(); if (debug) warnx("here we go"); - if (debug == 0) { + if (debug == 0 && nofork == 0) { daemon(0, 0); signal(SIGINT, SIG_IGN); signal(SIGQUIT, SIG_IGN); @@ -571,7 +582,7 @@ main(int argc, char **argv) out_of_mem(); hosts[0] = "*"; nhosts = 1; - } else { + } else if (skiplocalhost == 0) { hosts_bak = hosts; if (have_v6) { hosts_bak = realloc(hosts, (nhosts + 2) * @@ -1111,8 +1122,8 @@ static void usage(void) { fprintf(stderr, - "usage: mountd [-2] [-d] [-e] [-l] [-n] [-p ] [-r] " - "[-S] [-h ] [export_file ...]\n"); + "usage: mountd [-2] [-d] [-e] [-l] [-N] [-n] [-p ] [-r] [-S] " + "[-s] [-h ] [export_file ...]\n"); exit(1); } diff --git a/usr.sbin/rpcbind/rpcbind.8 b/usr.sbin/rpcbind/rpcbind.8 index 1dd145f945f4..36c7a8da9984 100644 --- a/usr.sbin/rpcbind/rpcbind.8 +++ b/usr.sbin/rpcbind/rpcbind.8 @@ -1,6 +1,6 @@ .\" Copyright 1989 AT&T .\" Copyright 1991 Sun Microsystems, Inc. -.Dd July 5, 2024 +.Dd July 11, 2024 .Dt RPCBIND 8 .Os .Sh NAME @@ -8,7 +8,7 @@ .Nd universal addresses to RPC program number mapper .Sh SYNOPSIS .Nm -.Op Fl 6adiLlNswW +.Op Fl 6adIiLlNswW .Op Fl h Ar bindip .Sh DESCRIPTION The