From 1693e3be3bfb9911bb9c31d2ce35ffb20674df2b Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sat, 7 Sep 2024 11:33:44 +0200 Subject: [PATCH 01/11] u3g: reorder Quectel devices by product ID Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1410 --- sys/dev/usb/serial/u3g.c | 10 +++++----- sys/dev/usb/usbdevs | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index 28a403a846bd7..a549f93b2af19 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -512,21 +512,21 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(QUANTA, GLX, 0), U3G_DEV(QUANTA, Q101, 0), U3G_DEV(QUANTA, Q111, 0), + U3G_DEV(QUECTEL, EC21, 0), U3G_DEV(QUECTEL, EC25, 0), U3G_DEV(QUECTEL, EM05, 0), - U3G_DEV(QUECTEL, EC21, 0), U3G_DEV(QUECTEL, EG91, 0), U3G_DEV(QUECTEL, EG95, 0), + U3G_DEV(QUECTEL, BG96, 0), U3G_DEV(QUECTEL, EP06, 0), U3G_DEV(QUECTEL, EG065K, 0), - U3G_DEV(QUECTEL, EM12, 0), - U3G_DEV(QUECTEL, BG96, 0), - U3G_DEV(QUECTEL, BG95, 0), - U3G_DEV(QUECTEL, AG35, 0), U3G_DEV(QUECTEL, AG15, 0), + U3G_DEV(QUECTEL, AG35, 0), U3G_DEV(QUECTEL, AG520, 0), U3G_DEV(QUECTEL, AG550, 0), + U3G_DEV(QUECTEL, EM12, 0), U3G_DEV(QUECTEL, EM160R, 0), + U3G_DEV(QUECTEL, BG95, 0), U3G_DEV(QUECTEL, RG500, 0), U3G_DEV(QUECTEL, RG520, 0), U3G_DEV(QUECTEL, EC200, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 861e5ad73a2e6..61c7686da9571 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -3988,21 +3988,21 @@ product QUANTA GLE 0xea06 HSDPA modem product QUANTA RW6815R 0xf003 HP iPAQ rw6815 RNDIS /* Quectel products */ +product QUECTEL EC21 0x0121 Quectel EC21 product QUECTEL EC25 0x0125 Quectel EC20(MDM9x07)/EC25/EG25 product QUECTEL EM05 0x0127 Quectel EM05 -product QUECTEL EC21 0x0121 Quectel EC21 product QUECTEL EG91 0x0191 Quectel EG91 product QUECTEL EG95 0x0195 Quectel EG95 +product QUECTEL BG96 0x0296 Quectel BG96 product QUECTEL EP06 0x0306 Quectel EG06/EP06/EM06 product QUECTEL EG065K 0x030B Quectel EG065K/EG060K -product QUECTEL EM12 0x0512 Quectel EG12/EP12/EM12/EG16/EG18 -product QUECTEL BG96 0x0296 Quectel BG96 -product QUECTEL BG95 0x0700 Quectel BG95/BG77/BG600L-M3/BC69 -product QUECTEL AG35 0x0435 Quectel AG35 product QUECTEL AG15 0x0415 Quectel AG15 +product QUECTEL AG35 0x0435 Quectel AG35 product QUECTEL AG520 0x0452 Quectel AG520 product QUECTEL AG550 0x0455 Quectel AG550 +product QUECTEL EM12 0x0512 Quectel EG12/EP12/EM12/EG16/EG18 product QUECTEL EM160R 0x0620 Quectel EM160R/EG20 +product QUECTEL BG95 0x0700 Quectel BG95/BG77/BG600L-M3/BC69 product QUECTEL RG500 0x0800 Quectel RG500/RM500/RG510/RM510 product QUECTEL RG520 0x0801 Quectel RG520/RM520/SG520 product QUECTEL EC200 0x6000 Quectel EC200/UC200 From 45001ab45ed0ff4706300592715563fb87d26c9a Mon Sep 17 00:00:00 2001 From: Graham Perrin Date: Sun, 8 Sep 2024 23:02:04 +0100 Subject: [PATCH 02/11] loader.efi.8: BOOOTX64.EFI: fix typo Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1412 --- stand/man/loader.efi.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/man/loader.efi.8 b/stand/man/loader.efi.8 index 3527d8b66a997..84ba5c4fdb308 100644 --- a/stand/man/loader.efi.8 +++ b/stand/man/loader.efi.8 @@ -434,7 +434,7 @@ to the default name if there wasn't one there before. Check to see if they are copies before updating (with X64 substituted using the above table): .Bd -literal -offset indent -# cmp /boot/efi/EFI/FREEBSD/LOADER.EFI /boot/efi/EFI/BOOT/BOOOTX64.EFI +# cmp /boot/efi/EFI/FREEBSD/LOADER.EFI /boot/efi/EFI/BOOT/BOOTX64.EFI .Ed Copy the loader: .Bd -literal -offset indent From 2878d99dfcfbdd7a415a7f31cf95fbd53fc8e581 Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Thu, 12 Sep 2024 09:36:42 -0700 Subject: [PATCH 03/11] manuals: Misc macro typos These were reported by `mandoc -T lint` as ERROR: skipping unknown macro When these pages were rendered with `man`, the "unknown macro" meant that the entire line was omitted from the output. Obvious typos in: lib/libsys/swapon.2 lib/libsys/procctl.2 share/man/man9/firmware.9 lib/libcasper/services/cap_net/cap_net.3: 'mode' describes a function argument. lib/libsys/statfs.2: there's no .Tm command ("trademark?"), and .Tn ("tradename") is deprecated, so remove the macro entirely. usr.sbin/mfiutil/mfiutil.8: man was interpreting '/dev/' as a macro (which it didn't recognize). share/man/man4/qat.4: same issue as above, but with '0'. In this case, given the context of the previous line, rewriting as "Value '0'" seemed more appropriate. usr.sbin/mlx5tool/mlx5tool.8: typo in .Xr Signed-off-by: Graham Percival Sponsored by: Tarsnap Backup Inc. Reviewed by: concussious, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1417 --- lib/libcasper/services/cap_net/cap_net.3 | 2 +- lib/libsys/procctl.2 | 2 +- lib/libsys/statfs.2 | 4 +--- lib/libsys/swapon.2 | 2 +- share/man/man4/qat.4 | 2 +- share/man/man9/firmware.9 | 2 +- usr.sbin/mfiutil/mfiutil.8 | 3 ++- usr.sbin/mlx5tool/mlx5tool.8 | 2 +- 8 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/libcasper/services/cap_net/cap_net.3 b/lib/libcasper/services/cap_net/cap_net.3 index 6e525508d3c4c..e322222e866f7 100644 --- a/lib/libcasper/services/cap_net/cap_net.3 +++ b/lib/libcasper/services/cap_net/cap_net.3 @@ -121,7 +121,7 @@ The .Fn cap_net_limit_init returns an opaque limit handle used to store a list of capabilities. The -.Fv mode +.Fa mode restricts the functionality of the service. Modes are encoded using the following flags: .Pp diff --git a/lib/libsys/procctl.2 b/lib/libsys/procctl.2 index cdb379696401b..df8119799c6df 100644 --- a/lib/libsys/procctl.2 +++ b/lib/libsys/procctl.2 @@ -75,7 +75,7 @@ All status changing requests .Dv *_CTL require the caller to have the right to debug the target. All status query requests -.DV *_STATUS +.Dv *_STATUS require the caller to have the right to observe the target. .Pp The following commands are supported: diff --git a/lib/libsys/statfs.2 b/lib/libsys/statfs.2 index 50809869a0221..a2abd9e7d7cdb 100644 --- a/lib/libsys/statfs.2 +++ b/lib/libsys/statfs.2 @@ -231,9 +231,7 @@ Corrupted data was detected while reading from the file system. The fields in the .Vt statfs structure have been defined to provide the parameters relevant for -traditional -.Tm UNIX -file systems. +traditional UNIX file systems. For some other file systems, values that have similar, but not identical, semantics to those described above may be returned. An example is msdosfs, which in case of FAT12 or FAT16 file systems diff --git a/lib/libsys/swapon.2 b/lib/libsys/swapon.2 index d7694ed48c8e5..23ed0bc2aa838 100644 --- a/lib/libsys/swapon.2 +++ b/lib/libsys/swapon.2 @@ -67,7 +67,7 @@ is made available for other purposes. The .Fa special argument points to the name of the device or file used for swapping. -.The +The .Va flags argument takes the following flags: .Bl -tag -width SWAPOFF_FORCE diff --git a/share/man/man4/qat.4 b/share/man/man4/qat.4 index b0fa0b0cbc922..02be0837ce549 100644 --- a/share/man/man4/qat.4 +++ b/share/man/man4/qat.4 @@ -148,7 +148,7 @@ QAT firmware revision number. Summary of device specific configuration. .It Va heartbeat QAT device heartbeat status. Value '1' indicates that the device is operational. -'0' value means that the device is not responsive. Device requires restart. +Value '0' means that the device is not responsive. Device requires restart. .It Va heartbeat_failed Number of QAT heartbeat failures received. .It Va heartbeat_sent diff --git a/share/man/man9/firmware.9 b/share/man/man9/firmware.9 index 883f0a2634d4d..f324861248d2c 100644 --- a/share/man/man9/firmware.9 +++ b/share/man/man9/firmware.9 @@ -341,7 +341,7 @@ uses the following algorithm to find firmware images: .It If an existing firmware image is registered for .Fa imagename, -.that image is returned. +that image is returned. .It If .Fa imagename diff --git a/usr.sbin/mfiutil/mfiutil.8 b/usr.sbin/mfiutil/mfiutil.8 index 86dc6b6ee1229..9f8cacf7f16de 100644 --- a/usr.sbin/mfiutil/mfiutil.8 +++ b/usr.sbin/mfiutil/mfiutil.8 @@ -271,7 +271,8 @@ Currently three global options are supported: .It Fl D Ar device .Ar device specifies the device node of the controller to use. -'/dev/' will be added to the device node if needed. +.Pa /dev/ +will be added to the device node if needed. If no device node is specified, then device will be made of the type and device. .It Fl t Ar type diff --git a/usr.sbin/mlx5tool/mlx5tool.8 b/usr.sbin/mlx5tool/mlx5tool.8 index 13c19d2d032b0..cca1adeedbebf 100644 --- a/usr.sbin/mlx5tool/mlx5tool.8 +++ b/usr.sbin/mlx5tool/mlx5tool.8 @@ -60,7 +60,7 @@ The utility executes commands on specific adapter, which is addressed using .Em device:bus:slot:function conventions of the PCIe buses. You can match adapters ethernet name and addresses using the -.X pciconf 8 +.Xr pciconf 8 utility. The address is passed as an argument of the .Fl d From a55640536ace15909e57c57c57cdd1270ba82da2 Mon Sep 17 00:00:00 2001 From: "John F. Carr" Date: Tue, 3 Sep 2024 13:41:43 -0400 Subject: [PATCH 04/11] Install xo_emit_f.3 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1406 --- lib/libxo/libxo/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libxo/libxo/Makefile b/lib/libxo/libxo/Makefile index 5b40d1e26880b..38e6ff031c7fe 100644 --- a/lib/libxo/libxo/Makefile +++ b/lib/libxo/libxo/Makefile @@ -28,6 +28,7 @@ MAN+= xo_attr.3 \ xo_create.3 \ xo_emit.3 \ xo_emit_err.3 \ + xo_emit_f.3 \ xo_err.3 \ xo_error.3 \ xo_finish.3 \ From c3c06f94f04847dceca2a5df80f7ef1ec00709ec Mon Sep 17 00:00:00 2001 From: Faraz Vahedi Date: Wed, 21 Aug 2024 16:38:03 +0330 Subject: [PATCH 05/11] Remove unused includes, migrate to stdint.h for uintXX_t types. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1392 --- lib/libfigpar/figpar.c | 1 - lib/libfigpar/string_m.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/libfigpar/figpar.c b/lib/libfigpar/figpar.c index 803ebadc3f49a..19fb91f08900f 100644 --- a/lib/libfigpar/figpar.c +++ b/lib/libfigpar/figpar.c @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/lib/libfigpar/string_m.c b/lib/libfigpar/string_m.c index 2e4adcdf791c2..df3def7889717 100644 --- a/lib/libfigpar/string_m.c +++ b/lib/libfigpar/string_m.c @@ -24,11 +24,9 @@ * SUCH DAMAGE. */ -#include - #include #include -#include +#include #include #include From f144058b406656fa4678f8ff2f04c2da46176c79 Mon Sep 17 00:00:00 2001 From: Faraz Vahedi Date: Wed, 21 Aug 2024 16:49:38 +0330 Subject: [PATCH 06/11] Refactor error handling in lseek operations 1. Subtraction was performed on the current position regardless of the success of the lseek operation. In the event of an error, this resulted in the current position being erroneously set to -2, which bypassed the intended error handling mechanism. The proposed change performs error checking immediately following the lseek operation, prior to any modification of the current position. This ensures that a failed lseek operation will correctly trigger the appropriate error handling. 2. The error checking logic was based on the assumption that lseek would return `offset - 1` upon failure. However, this is not consistent with the behaviour of lseek as specified in the POSIX standard, which stipulates that lseek shall return -1 in case of an error. The code has been updated to reflect this standard, improving reliability and compliance. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1392 --- lib/libfigpar/figpar.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/lib/libfigpar/figpar.c b/lib/libfigpar/figpar.c index 19fb91f08900f..fbc6aaaba606f 100644 --- a/lib/libfigpar/figpar.c +++ b/lib/libfigpar/figpar.c @@ -160,11 +160,11 @@ parse_config(struct figpar_config options[], const char *path, } /* Get the current offset */ - curpos = lseek(fd, 0, SEEK_CUR) - 1; - if (curpos == -1) { + if ((curpos = lseek(fd, 0, SEEK_CUR)) == -1) { close(fd); return (-1); } + curpos--; /* Find the length of the directive */ for (n = 0; r != 0; n++) { @@ -186,8 +186,7 @@ parse_config(struct figpar_config options[], const char *path, } /* Go back to the beginning of the directive */ - error = (int)lseek(fd, curpos, SEEK_SET); - if (error == (curpos - 1)) { + if (lseek(fd, curpos, SEEK_SET) == -1) { close(fd); return (-1); } @@ -245,11 +244,11 @@ parse_config(struct figpar_config options[], const char *path, } /* Get the current offset */ - curpos = lseek(fd, 0, SEEK_CUR) - 1; - if (curpos == -1) { + if ((curpos = lseek(fd, 0, SEEK_CUR)) == -1) { close(fd); return (-1); } + curpos--; /* Find the end of the value */ quote = 0; @@ -267,19 +266,18 @@ parse_config(struct figpar_config options[], const char *path, */ /* Get the current offset */ - charpos = lseek(fd, 0, SEEK_CUR) - 1; - if (charpos == -1) { + if ((charpos = lseek(fd, 0, SEEK_CUR)) == -1) { close(fd); return (-1); } + charpos--; /* * Go back so we can read the character before the key * to check if the character is escaped (which means we * should continue). */ - error = (int)lseek(fd, -2, SEEK_CUR); - if (error == -3) { + if (lseek(fd, -2, SEEK_CUR) == -1) { close(fd); return (-1); } @@ -291,8 +289,7 @@ parse_config(struct figpar_config options[], const char *path, */ for (n = 1; *p == '\\'; n++) { /* Move back another offset to read */ - error = (int)lseek(fd, -2, SEEK_CUR); - if (error == -3) { + if (lseek(fd, -2, SEEK_CUR) == -1) { close(fd); return (-1); } @@ -300,8 +297,7 @@ parse_config(struct figpar_config options[], const char *path, } /* Move offset back to the key and read it */ - error = (int)lseek(fd, charpos, SEEK_SET); - if (error == (charpos - 1)) { + if (lseek(fd, charpos, SEEK_SET) == -1) { close(fd); return (-1); } @@ -352,8 +348,7 @@ parse_config(struct figpar_config options[], const char *path, } /* Get the current offset */ - charpos = lseek(fd, 0, SEEK_CUR) - 1; - if (charpos == -1) { + if ((charpos = lseek(fd, 0, SEEK_CUR)) == -1) { close(fd); return (-1); } @@ -364,8 +359,7 @@ parse_config(struct figpar_config options[], const char *path, n--; /* Move offset back to the beginning of the value */ - error = (int)lseek(fd, curpos, SEEK_SET); - if (error == (curpos - 1)) { + if (lseek(fd, curpos, SEEK_SET) == -1) { close(fd); return (-1); } From c10511375252e53d6c9fe47f97e254f1380a89c5 Mon Sep 17 00:00:00 2001 From: Ahmad Khalifa Date: Mon, 12 Aug 2024 12:57:38 +0300 Subject: [PATCH 07/11] loader: actually change the staging slop Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1381 --- stand/efi/loader/copy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stand/efi/loader/copy.c b/stand/efi/loader/copy.c index d34acea4e8769..e5c950d75f379 100644 --- a/stand/efi/loader/copy.c +++ b/stand/efi/loader/copy.c @@ -268,7 +268,9 @@ command_staging_slop(int argc, char *argv[]) res = CMD_ERROR; } if (res == CMD_OK && staging_slop != new) { + staging_slop = new; printf("changed slop, unloading kernel\n"); + unload(); efi_copy_free(); efi_copy_init(); From a698c15a41afca19f87e11d4f8ce5664f992673b Mon Sep 17 00:00:00 2001 From: Ahmad Khalifa Date: Mon, 12 Aug 2024 13:01:07 +0300 Subject: [PATCH 08/11] loader: remove unneeded variable Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1381 --- stand/efi/loader/copy.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/stand/efi/loader/copy.c b/stand/efi/loader/copy.c index e5c950d75f379..3e466e875af8a 100644 --- a/stand/efi/loader/copy.c +++ b/stand/efi/loader/copy.c @@ -220,11 +220,10 @@ command_copy_staging(int argc, char *argv[]) [COPY_STAGING_DISABLE] = "disable", [COPY_STAGING_AUTO] = "auto", }; - int prev, res; + int prev; - res = CMD_OK; if (argc > 2) { - res = CMD_ERROR; + return (CMD_ERROR); } else if (argc == 2) { prev = copy_staging; if (strcmp(argv[1], "enable") == 0) @@ -235,9 +234,9 @@ command_copy_staging(int argc, char *argv[]) copy_staging = COPY_STAGING_AUTO; else { printf("usage: copy_staging enable|disable|auto\n"); - res = CMD_ERROR; + return (CMD_ERROR); } - if (res == CMD_OK && prev != copy_staging) { + if (prev != copy_staging) { printf("changed copy_staging, unloading kernel\n"); unload(); efi_copy_free(); @@ -246,7 +245,7 @@ command_copy_staging(int argc, char *argv[]) } else { printf("copy staging: %s\n", mode[copy_staging]); } - return (res); + return (CMD_OK); } COMMAND_SET(copy_staging, "copy_staging", "copy staging", command_copy_staging); #endif @@ -256,18 +255,16 @@ command_staging_slop(int argc, char *argv[]) { char *endp; u_long new, prev; - int res; - res = CMD_OK; if (argc > 2) { - res = CMD_ERROR; + return (CMD_ERROR); } else if (argc == 2) { new = strtoul(argv[1], &endp, 0); if (*endp != '\0') { printf("invalid slop value\n"); - res = CMD_ERROR; + return (CMD_ERROR); } - if (res == CMD_OK && staging_slop != new) { + if (staging_slop != new) { staging_slop = new; printf("changed slop, unloading kernel\n"); @@ -278,7 +275,7 @@ command_staging_slop(int argc, char *argv[]) } else { printf("staging slop %#lx\n", staging_slop); } - return (res); + return (CMD_OK); } COMMAND_SET(staging_slop, "staging_slop", "set staging slop", command_staging_slop); From 6fdb07d5b7e9293a6851a23b7ecb26636cf1ec1e Mon Sep 17 00:00:00 2001 From: Ahmad Khalifa Date: Mon, 12 Aug 2024 15:11:06 +0300 Subject: [PATCH 09/11] loader: provide error message in command_errmsg instead of printing Also provide an error message when argc is too long instead of printing "no error message". Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1381 --- stand/efi/loader/copy.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/stand/efi/loader/copy.c b/stand/efi/loader/copy.c index 3e466e875af8a..90a55089ffc41 100644 --- a/stand/efi/loader/copy.c +++ b/stand/efi/loader/copy.c @@ -223,7 +223,7 @@ command_copy_staging(int argc, char *argv[]) int prev; if (argc > 2) { - return (CMD_ERROR); + goto usage; } else if (argc == 2) { prev = copy_staging; if (strcmp(argv[1], "enable") == 0) @@ -232,10 +232,8 @@ command_copy_staging(int argc, char *argv[]) copy_staging = COPY_STAGING_DISABLE; else if (strcmp(argv[1], "auto") == 0) copy_staging = COPY_STAGING_AUTO; - else { - printf("usage: copy_staging enable|disable|auto\n"); - return (CMD_ERROR); - } + else + goto usage; if (prev != copy_staging) { printf("changed copy_staging, unloading kernel\n"); unload(); @@ -246,6 +244,10 @@ command_copy_staging(int argc, char *argv[]) printf("copy staging: %s\n", mode[copy_staging]); } return (CMD_OK); + +usage: + command_errmsg = "usage: copy_staging enable|disable|auto"; + return (CMD_ERROR); } COMMAND_SET(copy_staging, "copy_staging", "copy staging", command_copy_staging); #endif @@ -257,13 +259,11 @@ command_staging_slop(int argc, char *argv[]) u_long new, prev; if (argc > 2) { - return (CMD_ERROR); + goto err; } else if (argc == 2) { new = strtoul(argv[1], &endp, 0); - if (*endp != '\0') { - printf("invalid slop value\n"); - return (CMD_ERROR); - } + if (*endp != '\0') + goto err; if (staging_slop != new) { staging_slop = new; printf("changed slop, unloading kernel\n"); @@ -276,6 +276,10 @@ command_staging_slop(int argc, char *argv[]) printf("staging slop %#lx\n", staging_slop); } return (CMD_OK); + +err: + command_errmsg = "invalid slop value"; + return (CMD_ERROR); } COMMAND_SET(staging_slop, "staging_slop", "set staging slop", command_staging_slop); From 83e93d53f67448a7546c32cd44cb145eceb6c8fb Mon Sep 17 00:00:00 2001 From: Alexander Ziaee Date: Sun, 11 Aug 2024 02:01:40 -0400 Subject: [PATCH 10/11] hv_netvsc.4: mlink to hn(4)/if_hn(4) + tag spdx dmesg for this device says: > hn0: on vmbus0 Add links so that `man hn` and `man if_hn` work. MFC after: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1377 --- share/man/man4/Makefile | 2 ++ share/man/man4/hv_netvsc.4 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index ad4bc47acfea6..d8d90f092083d 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -713,6 +713,8 @@ MLINKS+=gpioths.4 dht11.4 MLINKS+=gpioths.4 dht22.4 MLINKS+=gre.4 if_gre.4 MLINKS+=hpet.4 acpi_hpet.4 +MLINKS+=hv_netvsc.4 hn.4 \ + hv_netvsc.4 if_hn.4 MLINKS+=${_hptrr.4} ${_rr232x.4} MLINKS+=${_attimer.4} ${_i8254.4} MLINKS+=ip.4 rawip.4 diff --git a/share/man/man4/hv_netvsc.4 b/share/man/man4/hv_netvsc.4 index 226fa016f6956..e5c7004713c59 100644 --- a/share/man/man4/hv_netvsc.4 +++ b/share/man/man4/hv_netvsc.4 @@ -1,3 +1,5 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2012 Microsoft Corp. .\" All rights reserved. From 2a680c5c37ea020467fce545734afea019d3a3ea Mon Sep 17 00:00:00 2001 From: Alexander Ziaee Date: Sat, 14 Sep 2024 14:33:21 -0400 Subject: [PATCH 11/11] sysctl.8: mark sysctls as vars per style.mdoc(7) + while here, fix alignment and tag SPDX MFC after: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1421 --- sbin/sysctl/sysctl.8 | 154 ++++++++++++++++++++++--------------------- 1 file changed, 78 insertions(+), 76 deletions(-) diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8 index 528efe6697b52..d350b62e67a34 100644 --- a/sbin/sysctl/sysctl.8 +++ b/sbin/sysctl/sysctl.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -50,11 +53,10 @@ privilege to set kernel state. The state to be retrieved or set is described using a .Dq Management Information Base .Pq Dq MIB -style name, described as a dotted set of -components. +style name, described as a dotted set of components. .Pp The following options are available: -.Bl -tag -width indent +.Bl -tag -width "-f filename" .It Fl A Equivalent to .Fl o a @@ -202,77 +204,77 @@ String and integer values can be set using .Nm . .Bl -column security.bsd.unprivileged_read_msgbuf integerxxx .It Sy "Name Type Changeable" -.It "kern.ostype string no" -.It "kern.osrelease string no" -.It "kern.osrevision integer no" -.It "kern.version string no" -.It "kern.maxvnodes integer yes" -.It "kern.maxproc integer no" -.It "kern.maxprocperuid integer yes" -.It "kern.maxfiles integer yes" -.It "kern.maxfilesperproc integer yes" -.It "kern.argmax integer no" -.It "kern.securelevel integer raise only" -.It "kern.hostname string yes" -.It "kern.hostid integer yes" -.It "kern.clockrate struct no" -.It "kern.posix1version integer no" -.It "kern.ngroups integer no" -.It "kern.job_control integer no" -.It "kern.saved_ids integer no" -.It "kern.boottime struct no" -.It "kern.domainname string yes" -.It "kern.filedelay integer yes" -.It "kern.dirdelay integer yes" -.It "kern.metadelay integer yes" -.It "kern.osreldate integer no" -.It "kern.bootfile string yes" -.It "kern.corefile string yes" -.It "kern.logsigexit integer yes" -.It "security.bsd.suser_enabled integer yes" -.It "security.bsd.see_other_uids integer yes" -.It "security.bsd.see_other_gids integer yes" -.It "security.bsd.see_jail_proc integer yes" -.It "security.bsd.unprivileged_proc_debug integer yes" -.It "security.bsd.unprivileged_read_msgbuf integer yes" -.It "vm.loadavg struct no" -.It "hw.machine string no" -.It "hw.model string no" -.It "hw.ncpu integer no" -.It "hw.byteorder integer no" -.It "hw.physmem integer no" -.It "hw.usermem integer no" -.It "hw.pagesize integer no" -.It "hw.floatingpoint integer no" -.It "hw.machine_arch string no" -.It "hw.realmem integer no" -.It "machdep.adjkerntz integer yes" -.It "machdep.disable_rtc_set integer yes" -.It "machdep.guessed_bootdev string no" -.It "user.cs_path string no" -.It "user.bc_base_max integer no" -.It "user.bc_dim_max integer no" -.It "user.bc_scale_max integer no" -.It "user.bc_string_max integer no" -.It "user.coll_weights_max integer no" -.It "user.expr_nest_max integer no" -.It "user.line_max integer no" -.It "user.re_dup_max integer no" -.It "user.posix2_version integer no" -.It "user.posix2_c_bind integer no" -.It "user.posix2_c_dev integer no" -.It "user.posix2_char_term integer no" -.It "user.posix2_fort_dev integer no" -.It "user.posix2_fort_run integer no" -.It "user.posix2_localedef integer no" -.It "user.posix2_sw_dev integer no" -.It "user.posix2_upe integer no" -.It "user.stream_max integer no" -.It "user.tzname_max integer no" -.It "user.localbase string no" +.It Va "kern.ostype string no" +.It Va "kern.osrelease string no" +.It Va "kern.osrevision integer no" +.It Va "kern.version string no" +.It Va "kern.maxvnodes integer yes" +.It Va "kern.maxproc integer no" +.It Va "kern.maxprocperuid integer yes" +.It Va "kern.maxfiles integer yes" +.It Va "kern.maxfilesperproc integer yes" +.It Va "kern.argmax integer no" +.It Va "kern.securelevel integer raise only" +.It Va "kern.hostname string yes" +.It Va "kern.hostid integer yes" +.It Va "kern.clockrate struct no" +.It Va "kern.posix1version integer no" +.It Va "kern.ngroups integer no" +.It Va "kern.job_control integer no" +.It Va "kern.saved_ids integer no" +.It Va "kern.boottime struct no" +.It Va "kern.domainname string yes" +.It Va "kern.filedelay integer yes" +.It Va "kern.dirdelay integer yes" +.It Va "kern.metadelay integer yes" +.It Va "kern.osreldate integer no" +.It Va "kern.bootfile string yes" +.It Va "kern.corefile string yes" +.It Va "kern.logsigexit integer yes" +.It Va "security.bsd.suser_enabled integer yes" +.It Va "security.bsd.see_other_uids integer yes" +.It Va "security.bsd.see_other_gids integer yes" +.It Va "security.bsd.see_jail_proc integer yes" +.It Va "security.bsd.unprivileged_proc_debug integer yes" +.It Va "security.bsd.unprivileged_read_msgbuf integer yes" +.It Va "vm.loadavg struct no" +.It Va "hw.machine string no" +.It Va "hw.model string no" +.It Va "hw.ncpu integer no" +.It Va "hw.byteorder integer no" +.It Va "hw.physmem integer no" +.It Va "hw.usermem integer no" +.It Va "hw.pagesize integer no" +.It Va "hw.floatingpoint integer no" +.It Va "hw.machine_arch string no" +.It Va "hw.realmem integer no" +.It Va "machdep.adjkerntz integer yes" +.It Va "machdep.disable_rtc_set integer yes" +.It Va "machdep.guessed_bootdev string no" +.It Va "user.cs_path string no" +.It Va "user.bc_base_max integer no" +.It Va "user.bc_dim_max integer no" +.It Va "user.bc_scale_max integer no" +.It Va "user.bc_string_max integer no" +.It Va "user.coll_weights_max integer no" +.It Va "user.expr_nest_max integer no" +.It Va "user.line_max integer no" +.It Va "user.re_dup_max integer no" +.It Va "user.posix2_version integer no" +.It Va "user.posix2_c_bind integer no" +.It Va "user.posix2_c_dev integer no" +.It Va "user.posix2_char_term integer no" +.It Va "user.posix2_fort_dev integer no" +.It Va "user.posix2_fort_run integer no" +.It Va "user.posix2_localedef integer no" +.It Va "user.posix2_sw_dev integer no" +.It Va "user.posix2_upe integer no" +.It Va "user.stream_max integer no" +.It Va "user.tzname_max integer no" +.It Va "user.localbase string no" .El .Sh FILES -.Bl -tag -width ".In netinet/icmp_var.h" -compact +.Bl -tag -width "" -compact .It In sys/sysctl.h definitions for top level identifiers, second level kernel and hardware identifiers, and user level identifiers @@ -296,20 +298,20 @@ definitions for fourth level UDP identifiers For example, to retrieve the maximum number of processes allowed in the system, one would use the following request: .Pp -.Dl "sysctl kern.maxproc" +.Dl Va "sysctl kern.maxproc" .Pp To set the maximum number of processes allowed per uid to 1000, one would use the following request: .Pp -.Dl "sysctl kern.maxprocperuid=1000" +.Dl Va "sysctl kern.maxprocperuid=1000" .Pp Information about the system clock rate may be obtained with: .Pp -.Dl "sysctl kern.clockrate" +.Dl Va "sysctl kern.clockrate" .Pp Information about the load average history may be obtained with: .Pp -.Dl "sysctl vm.loadavg" +.Dl Va "sysctl vm.loadavg" .Pp More variables than these exist, and the best and likely only place to search for their deeper meaning is undoubtedly the source where