git: 3540911bfdd8 - main - LinuxKPI: 802.11: use ieee80211_beacon_miss()
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=3540911bfdd83ce69d1c436f6773becefef403fa commit 3540911bfdd83ce69d1c436f6773becefef403fa Author: Bjoern A. Zeeb AuthorDate: 2022-04-30 07:57:34 + Commit: Bjoern A. Zeeb CommitDate: 2022-04-30 07:57:34 + LinuxKPI: 802.11: use ieee80211_beacon_miss() In ieee80211_beacon_loss() call into net80211::ieee80211_beacon_miss() rather than manually bouncing our state. That should give us the ability to send a probereq and see if the AP is till there rather than right away going to scan. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index d2608792f8c4..6d67c29ed7a6 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4459,27 +4459,16 @@ linuxkpi_ieee80211_beacon_loss(struct ieee80211_vif *vif) { struct lkpi_vif *lvif; struct ieee80211vap *vap; - enum ieee80211_state nstate; - int arg; lvif = VIF_TO_LVIF(vif); vap = LVIF_TO_VAP(lvif); - /* -* Go to scan; otherwise we need to elaborately check state and -* handle accordingly, e.g., if in RUN we could call iv_bmiss. -* Let the statemachine handle all neccessary changes. -*/ - nstate = IEEE80211_S_SCAN; - arg = 0; - - /* We should be in RUN. Can we assert that? */ #ifdef LINUXKPI_DEBUG_80211 if (linuxkpi_debug_80211 & D80211_TRACE || vap->iv_state != IEEE80211_S_RUN) ic_printf(vap->iv_ic, "%s: vif %p vap %p state %s\n", __func__, vif, vap, ieee80211_state_name[vap->iv_state]); #endif - ieee80211_new_state(vap, nstate, arg); + ieee80211_beacon_miss(vap->iv_ic); } MODULE_VERSION(linuxkpi_wlan, 1);
git: 00614c9c2ddc - main - LinuxKPI: 802.11: fill in two more TODOs
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=00614c9c2ddc34f3f9061e87542efb4edbd936a9 commit 00614c9c2ddc34f3f9061e87542efb4edbd936a9 Author: Bjoern A. Zeeb AuthorDate: 2022-04-30 08:00:04 + Commit: Bjoern A. Zeeb CommitDate: 2022-04-30 08:00:04 + LinuxKPI: 802.11: fill in two more TODOs Implement ieee80211_is_data_present() and a subset of ieee80211_is_bufferable_mmpdu() which hopefully is good enough in the compat code for now. This is partly in preparation for some TXQ changes coming up soon. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/include/net/mac80211.h | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index b1ce4c2ff2b9..7a8306919194 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1102,8 +1102,13 @@ ieee80211_is_disassoc(__le16 fc) static __inline bool ieee80211_is_data_present(__le16 fc) { - TODO(); - return (false); + __le16 v; + + /* If it is a data frame and NODATA is not present. */ + fc &= htole16(IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_NODATA); + v = htole16(IEEE80211_FC0_TYPE_DATA); + + return (fc == v); } static __inline bool @@ -1166,7 +1171,19 @@ ieee80211_is_back_req(__le16 fc) static __inline bool ieee80211_is_bufferable_mmpdu(__le16 fc) { - TODO(); + + /* 11.2.2 Bufferable MMPDUs, 80211-2020. */ + /* XXX we do not care about IBSS yet. */ + + if (!ieee80211_is_mgmt(fc)) + return (false); + if (ieee80211_is_action(fc))/* XXX FTM? */ + return (true); + if (ieee80211_is_disassoc(fc)) + return (true); + if (ieee80211_is_deauth(fc)) + return (true); + return (false); }
git: 6e1f0f800689 - stable/13 - libfetch: remove a set-but-not-used variable
The branch stable/13 has been updated by pstef: URL: https://cgit.FreeBSD.org/src/commit/?id=6e1f0f800689fec212103e7dc942ce1d826750c7 commit 6e1f0f800689fec212103e7dc942ce1d826750c7 Author: Stefan Eßer AuthorDate: 2022-04-20 14:56:57 + Commit: Piotr Pawel Stefaniak CommitDate: 2022-04-30 07:55:31 + libfetch: remove a set-but-not-used variable (cherry picked from commit ce700f78f7fb28a252978382a1d0a66d08b6469a) --- lib/libfetch/http.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c index bcb089dc0fc4..c1d92d08b317 100644 --- a/lib/libfetch/http.c +++ b/lib/libfetch/http.c @@ -976,13 +976,12 @@ http_base64(const char *src) "0123456789+/"; char *str, *dst; size_t l; - int t, r; + int t; l = strlen(src); if ((str = malloc(((l + 2) / 3) * 4 + 1)) == NULL) return (NULL); dst = str; - r = 0; while (l >= 3) { t = (src[0] << 16) | (src[1] << 8) | src[2]; @@ -991,7 +990,7 @@ http_base64(const char *src) dst[2] = base64[(t >> 6) & 0x3f]; dst[3] = base64[(t >> 0) & 0x3f]; src += 3; l -= 3; - dst += 4; r += 4; + dst += 4; } switch (l) { @@ -1002,7 +1001,6 @@ http_base64(const char *src) dst[2] = base64[(t >> 6) & 0x3f]; dst[3] = '='; dst += 4; - r += 4; break; case 1: t = src[0] << 16; @@ -1010,7 +1008,6 @@ http_base64(const char *src) dst[1] = base64[(t >> 12) & 0x3f]; dst[2] = dst[3] = '='; dst += 4; - r += 4; break; case 0: break;
git: d9d0812bc6e9 - stable/13 - sh: implement persistent history storage
The branch stable/13 has been updated by pstef: URL: https://cgit.FreeBSD.org/src/commit/?id=d9d0812bc6e90f6d8f85ef0939357590d34c3a4a commit d9d0812bc6e90f6d8f85ef0939357590d34c3a4a Author: Baptiste Daroussin AuthorDate: 2021-03-30 08:28:08 + Commit: Piotr Pawel Stefaniak CommitDate: 2022-04-30 07:55:42 + sh: implement persistent history storage Implement persistent history storage: the strategy is simple at start: loads the existing .sh_history file at exit dump it. The implementation respects the HISTFILE variable and its POSIX definition: ~/.sh_history is used if HISTFILE is not set. to avoid sh to create the history file, set HISTSIZE to 0 or HISTFILE to en empty value (cherry picked from commit 988b1bb0c54e50654112f0bd649aee68307a5a80) sh: try to avoid overwriting HISTFILE produced by other shells If an attempt to load history from an existing history file was unsuccessful, do not try to save command history to that file on exit. (cherry picked from commit 1f82fb3834105fd8f1186b1c6d719d8a24738180) --- bin/sh/histedit.c | 63 + bin/sh/main.c | 7 ++ bin/sh/myhistedit.h | 3 ++- bin/sh/sh.1 | 11 +- bin/sh/trap.c | 3 +++ 5 files changed, 85 insertions(+), 2 deletions(-) diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c index cf6bebad4c1a..2001b80bd8ed 100644 --- a/bin/sh/histedit.c +++ b/bin/sh/histedit.c @@ -41,6 +41,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include @@ -70,6 +72,7 @@ __FBSDID("$FreeBSD$"); History *hist; /* history cookie */ EditLine *el; /* editline cookie */ int displayhist; +static int savehist; static FILE *el_in, *el_out; static bool in_command_completion; @@ -81,6 +84,66 @@ static char **sh_matches(const char *, int, int); static const char *append_char_function(const char *); static unsigned char sh_complete(EditLine *, int); +static const char * +get_histfile(void) +{ + const char *histfile; + + /* don't try to save if the history size is 0 */ + if (hist == NULL || histsizeval() == 0) + return (NULL); + histfile = expandstr("${HISTFILE-${HOME-}/.sh_history}"); + + if (histfile[0] == '\0') + return (NULL); + return (histfile); +} + +void +histsave(void) +{ + HistEvent he; + char *histtmpname = NULL; + const char *histfile; + int fd; + FILE *f; + + if (!savehist || (histfile = get_histfile()) == NULL) + return; + INTOFF; + asprintf(&histtmpname, "%s.XX", histfile); + if (histtmpname == NULL) { + INTON; + return; + } + fd = mkstemp(histtmpname); + if (fd == -1 || (f = fdopen(fd, "w")) == NULL) { + free(histtmpname); + INTON; + return; + } + if (history(hist, &he, H_SAVE_FP, f) < 1 || + rename(histtmpname, histfile) == -1) + unlink(histtmpname); + fclose(f); + free(histtmpname); + INTON; + +} + +void +histload(void) +{ + const char *histfile; + HistEvent he; + + if ((histfile = get_histfile()) == NULL) + return; + errno = 0; + if (history(hist, &he, H_LOAD, histfile) != -1 || errno == ENOENT) + savehist = 1; +} + /* * Set history and editing status. Called whenever the status may * have changed (figures out what to do). diff --git a/bin/sh/main.c b/bin/sh/main.c index cbe026e13640..b0a5fac6fd4e 100644 --- a/bin/sh/main.c +++ b/bin/sh/main.c @@ -75,6 +75,9 @@ __FBSDID("$FreeBSD$"); #include "cd.h" #include "redir.h" #include "builtins.h" +#ifndef NO_HISTORY +#include "myhistedit.h" +#endif int rootpid; int rootshell; @@ -157,6 +160,10 @@ state2: read_profile(shinit); } } +#ifndef NO_HISTORY + if (iflag) + histload(); +#endif state3: state = 4; popstackmark(&smark2); diff --git a/bin/sh/myhistedit.h b/bin/sh/myhistedit.h index 968d23c9c1f8..1f513f0ae206 100644 --- a/bin/sh/myhistedit.h +++ b/bin/sh/myhistedit.h @@ -43,4 +43,5 @@ extern int displayhist; void histedit(void); void sethistsize(const char *); void setterm(const char *); - +void histload(void); +void histsave(void); diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index 76335cfaa2cd..ca3faeff13af 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -32,7 +32,7 @@ .\"from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd July 6, 2020 +.Dd May 10, 2021 .Dt SH 1 .Os .Sh NAME @@ -1351,6 +1351,15 @@ If not set, the default editor is The default editor used with the .Ic fc built-in. +.It Va HISTFILE +File used for persistent history storage. +If unset +.Pa ~/.sh_history +will be used. +If set but empty or +.Va HISTSIZE
git: 2eef2f0f8f60 - stable/13 - uu{encode,decode}: improve style
The branch stable/13 has been updated by pstef: URL: https://cgit.FreeBSD.org/src/commit/?id=2eef2f0f8f60833e54bcb9d8b81eeef9980b0844 commit 2eef2f0f8f60833e54bcb9d8b81eeef9980b0844 Author: Piotr Pawel Stefaniak AuthorDate: 2021-11-08 14:31:01 + Commit: Piotr Pawel Stefaniak CommitDate: 2022-04-30 07:59:08 + uu{encode,decode}: improve style (cherry picked from commit d5d3f5dab209a4643dd189b2012b60329c220662) --- usr.bin/uudecode/uudecode.c | 27 ++- usr.bin/uuencode/uuencode.c | 17 + 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/usr.bin/uudecode/uudecode.c b/usr.bin/uudecode/uudecode.c index a0cfcf23fb13..6d31d96ad958 100644 --- a/usr.bin/uudecode/uudecode.c +++ b/usr.bin/uudecode/uudecode.c @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -69,7 +70,7 @@ __FBSDID("$FreeBSD$"); static const char *infile, *outfile; static FILE *infp, *outfp; -static int base64, cflag, iflag, oflag, pflag, rflag, sflag; +static bool base64, cflag, iflag, oflag, pflag, rflag, sflag; static voidusage(void); static int decode(void); @@ -83,42 +84,42 @@ main(int argc, char *argv[]) int rval, ch; if (strcmp(basename(argv[0]), "b64decode") == 0) - base64 = 1; + base64 = true; while ((ch = getopt(argc, argv, "cimo:prs")) != -1) { switch (ch) { case 'c': if (oflag || rflag) usage(); - cflag = 1; /* multiple uudecode'd files */ + cflag = true; /* multiple uudecode'd files */ break; case 'i': - iflag = 1; /* ask before override files */ + iflag = true; /* ask before override files */ break; case 'm': - base64 = 1; + base64 = true; break; case 'o': if (cflag || pflag || rflag || sflag) usage(); - oflag = 1; /* output to the specified file */ - sflag = 1; /* do not strip pathnames for output */ + oflag = true; /* output to the specified file */ + sflag = true; /* do not strip pathnames for output */ outfile = optarg; /* set the output filename */ break; case 'p': if (oflag) usage(); - pflag = 1; /* print output to stdout */ + pflag = true; /* print output to stdout */ break; case 'r': if (cflag || oflag) usage(); - rflag = 1; /* decode raw data */ + rflag = true; /* decode raw data */ break; case 's': if (oflag) usage(); - sflag = 1; /* do not strip pathnames for output */ + sflag = true; /* do not strip pathnames for output */ break; default: usage(); @@ -185,14 +186,14 @@ decode2(void) struct stat st; char buf[MAXPATHLEN + 1]; - base64 = 0; + base64 = false; /* search for header line */ for (;;) { if (fgets(buf, sizeof(buf), infp) == NULL) return (EOF); p = buf; if (strncmp(p, "begin-base64 ", 13) == 0) { - base64 = 1; + base64 = true; p += 13; } else if (strncmp(p, "begin ", 6) == 0) p += 6; @@ -378,7 +379,7 @@ uu_decode(void) } else { if (i >= 1) { if (!(IS_DEC(*p) && IS_DEC(*(p + 1 - OUT_OF_RANGE; + OUT_OF_RANGE; ch = DEC(p[0]) << 2 | DEC(p[1]) >> 4; putc(ch, outfp); } diff --git a/usr.bin/uuencode/uuencode.c b/usr.bin/uuencode/uuencode.c index 05ead32c7183..b5eff44f1651 100644 --- a/usr.bin/uuencode/uuencode.c +++ b/usr.bin/uuencode/uuencode.c @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -68,18 +69,18 @@ static void usage(void); static FILE *output; static int mode; -static char raw = 0; +static bool raw; static char **av;
git: 963fdecd1a26 - stable/13 - uudecode: correct error message
The branch stable/13 has been updated by pstef: URL: https://cgit.FreeBSD.org/src/commit/?id=963fdecd1a26676626a7067965a54ca7d5fa48fb commit 963fdecd1a26676626a7067965a54ca7d5fa48fb Author: Piotr Pawel Stefaniak AuthorDate: 2021-11-08 14:31:03 + Commit: Piotr Pawel Stefaniak CommitDate: 2022-04-30 08:01:22 + uudecode: correct error message PR: 153276 Reported by:David Brennan (cherry picked from commit 9f3203c003144a4ef6309435036f985afe549ff0) uudecode: add missing test files to Makefile (cherry picked from commit 1b3af110bcd522a077f01350b6a51b3ffe434393) uudecode: use SRCDIR in the regression test (cherry picked from commit f5138631fb6f9dc73d696560caa006f3df714b9a) uudecode: move the new uudecode test from uuencode/ to uudecode/ I don't know how that happened. (cherry picked from commit ae6aa2d43daa6276dd18dc974a1c5b7c15264615) --- usr.bin/uudecode/tests/Makefile | 1 + usr.bin/uudecode/tests/regress.153276.in | 4 usr.bin/uudecode/tests/regress.153276.out | 1 + usr.bin/uudecode/tests/regress.sh | 5 - usr.bin/uudecode/uudecode.c | 2 +- 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/usr.bin/uudecode/tests/Makefile b/usr.bin/uudecode/tests/Makefile index 6c23c8104413..204f25b18c9e 100644 --- a/usr.bin/uudecode/tests/Makefile +++ b/usr.bin/uudecode/tests/Makefile @@ -8,5 +8,6 @@ ${PACKAGE}FILES+= regress.base64.in ${PACKAGE}FILES+= regress.out ${PACKAGE}FILES+= regress.sh ${PACKAGE}FILES+= regress.traditional.in +${PACKAGE}FILES+= regress.153276.in regress.153276.out .include diff --git a/usr.bin/uudecode/tests/regress.153276.in b/usr.bin/uudecode/tests/regress.153276.in new file mode 100644 index ..d881c8a9389e --- /dev/null +++ b/usr.bin/uudecode/tests/regress.153276.in @@ -0,0 +1,4 @@ +begin 644 153276 +/5&AI&1') + REGRESSION_END() diff --git a/usr.bin/uudecode/uudecode.c b/usr.bin/uudecode/uudecode.c index 6d31d96ad958..707ba27df62e 100644 --- a/usr.bin/uudecode/uudecode.c +++ b/usr.bin/uudecode/uudecode.c @@ -353,7 +353,7 @@ uu_decode(void) #define OUT_OF_RANGE do { \ warnx("%s: %s: character out of range: [%d-%d]",\ - infile, outfile, 1 + ' ', 077 + ' ' + 1); \ + infile, outfile, ' ', 077 + ' ' + 1); \ return (1); \ } while (0)
Re: git: 25768526bbed - main - powerpc: enable wlan and ath modules in GENERIC64*
On Thu, 28 Apr 2022, Piotr Kubaj wrote: The branch main has been updated by pkubaj (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=25768526bbedf2ae8ba35001d53c4a5eb09c36d8 commit 25768526bbedf2ae8ba35001d53c4a5eb09c36d8 Author: Piotr Kubaj AuthorDate: 2022-04-28 00:05:56 + Commit: Piotr Kubaj CommitDate: 2022-04-28 09:42:39 + powerpc: enable wlan and ath modules in GENERIC64* Reviewed by:jhibbits (src) Differential Revision: https://reviews.freebsd.org/D35089 What's the reason behind this? I know historically we have a lot of stuff in GENERIC but can't they be loaded or are they not auto-loaded with devmatch already? -- Bjoern A. Zeeb r15:7
git: 6eb6aeef7e67 - main - uath(4): Fix incorrect byte-swapping and a buffer length check.
The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=6eb6aeef7e670bddc9cd52aaf32765a9ea85eee3 commit 6eb6aeef7e670bddc9cd52aaf32765a9ea85eee3 Author: Hans Petter Selasky AuthorDate: 2022-04-30 09:21:54 + Commit: Hans Petter Selasky CommitDate: 2022-04-30 09:23:07 + uath(4): Fix incorrect byte-swapping and a buffer length check. PR: 263638 Reported by:Jeff Gibbons MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/usb/wlan/if_uath.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c index df7e1d7c396f..4ffdc9a72fad 100644 --- a/sys/dev/usb/wlan/if_uath.c +++ b/sys/dev/usb/wlan/if_uath.c @@ -2244,7 +2244,7 @@ uath_cmdeof(struct uath_softc *sc, struct uath_cmd *cmd) u_int olen; if (sizeof(*hdr) > hdr->len || - hdr->len >= UATH_MAX_CMDSZ) { + hdr->len > UATH_MAX_CMDSZ) { device_printf(sc->sc_dev, "%s: invalid WDC msg length %u; " "msg ignored\n", __func__, hdr->len); @@ -2360,11 +2360,10 @@ uath_intr_rx_callback(struct usb_xfer *xfer, usb_error_t error) usbd_copy_out(pc, 0, cmd->buf, actlen); hdr = (struct uath_cmd_hdr *)cmd->buf; - hdr->len = be32toh(hdr->len); - if (hdr->len > (uint32_t)actlen) { + if (be32toh(hdr->len) > (uint32_t)actlen) { device_printf(sc->sc_dev, "%s: truncated xfer (len %u, actlen %d)\n", - __func__, hdr->len, actlen); + __func__, be32toh(hdr->len), actlen); goto setup; }
git: bd001d86d679 - main - stand: s/libstand/libsa/g to catch up with rename
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bd001d86d679e10d179ef00b9866f0e65b6fa7fd commit bd001d86d679e10d179ef00b9866f0e65b6fa7fd Author: Warner Losh AuthorDate: 2022-04-30 13:33:15 + Commit: Warner Losh CommitDate: 2022-04-30 13:34:19 + stand: s/libstand/libsa/g to catch up with rename We renamed libstand to libsa years ago with the move from sys/boot to stand. Catch up in the comments. Sponsored by: Netflix --- stand/efi/boot1/Makefile | 2 +- stand/efi/libefi/wchar.c | 2 +- stand/i386/libi386/time.c | 2 +- stand/i386/loader/conf.c | 2 +- stand/kboot/arch/powerpc64/conf.c | 2 +- stand/libsa/stand.h | 4 ++-- stand/libsa/zfs/zstd_shim.c | 2 +- stand/powerpc/ofw/conf.c | 2 +- stand/uboot/arch/powerpc/conf.c | 2 +- stand/userboot/userboot/conf.c| 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile index 7e3d762c768d..daedc627e5dc 100644 --- a/stand/efi/boot1/Makefile +++ b/stand/efi/boot1/Makefile @@ -82,7 +82,7 @@ LDFLAGS+= -Wl,-znocombreloc LIBEFI=${BOOTOBJ}/efi/libefi/libefi.a # -# Add libstand for the runtime functions used by the compiler - for example +# Add libsa for the runtime functions used by the compiler - for example # __aeabi_* (arm) or __divdi3 (i386). # as well as required string and memory functions for all platforms. # diff --git a/stand/efi/libefi/wchar.c b/stand/efi/libefi/wchar.c index 0a2b96b64f45..d0c653514366 100644 --- a/stand/efi/libefi/wchar.c +++ b/stand/efi/libefi/wchar.c @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); /* * CHAR16 related functions moved from loader. - * Perhaps we should move those to libstand afterall, but they are + * Perhaps we should move those to libsa afterall, but they are * needed only by UEFI. */ diff --git a/stand/i386/libi386/time.c b/stand/i386/libi386/time.c index 7636ace5ff94..5b8a9c9017a7 100644 --- a/stand/i386/libi386/time.c +++ b/stand/i386/libi386/time.c @@ -38,7 +38,7 @@ static intbios_seconds(void); /* * Return the BIOS time-of-day value. * - * XXX uses undocumented BCD support from libstand. + * XXX uses undocumented BCD support from libsa. */ static int bios_seconds(void) diff --git a/stand/i386/loader/conf.c b/stand/i386/loader/conf.c index c70a53d4191a..35052b5423cd 100644 --- a/stand/i386/loader/conf.c +++ b/stand/i386/loader/conf.c @@ -50,7 +50,7 @@ extern struct devsw fwohci; #endif extern struct devsw vdisk_dev; -/* Exported for libstand */ +/* Exported for libsa */ struct devsw *devsw[] = { &biosfd, &bioscd, diff --git a/stand/kboot/arch/powerpc64/conf.c b/stand/kboot/arch/powerpc64/conf.c index 22562e898ef1..9862611c68d8 100644 --- a/stand/kboot/arch/powerpc64/conf.c +++ b/stand/kboot/arch/powerpc64/conf.c @@ -45,7 +45,7 @@ extern struct devsw hostdisk; * XXX rename these arrays to be consistent and less namespace-hostile */ -/* Exported for libstand */ +/* Exported for libsa */ struct devsw *devsw[] = { #if defined(LOADER_DISK_SUPPORT) || defined(LOADER_CD9660_SUPPORT) &hostdisk, diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h index 99b55e2282e4..097d8ba28d0b 100644 --- a/stand/libsa/stand.h +++ b/stand/libsa/stand.h @@ -117,7 +117,7 @@ struct fs_ops { }; /* - * libstand-supplied filesystems + * libsa-supplied filesystems */ extern struct fs_ops ufs_fsops; extern struct fs_ops tftp_fsops; @@ -159,7 +159,7 @@ struct devsw { }; /* - * libstand-supplied device switch + * libsa-supplied device switch */ extern struct devsw netdev; diff --git a/stand/libsa/zfs/zstd_shim.c b/stand/libsa/zfs/zstd_shim.c index 91f5171a72b5..b1ba4babcf36 100644 --- a/stand/libsa/zfs/zstd_shim.c +++ b/stand/libsa/zfs/zstd_shim.c @@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$"); /* * Small amount of shim code needed to get zfs_zstd.c to compile. These items - * here should all be defined in the SPL or as part of libstand somewhere, but + * here should all be defined in the SPL or as part of libsa somewhere, but * aren't for reasons that haven't been tracked down yet. Ideally, they would * all go away and we'd compile zfs_zstd.c directly. Based on an original by * Matt Macey, but only the #include remains untouched from that. diff --git a/stand/powerpc/ofw/conf.c b/stand/powerpc/ofw/conf.c index a7ac892e71fc..a472faeed97b 100644 --- a/stand/powerpc/ofw/conf.c +++ b/stand/powerpc/ofw/conf.c @@ -48,7 +48,7 @@ void (*exitfn)(int) = exit; * XXX rename these arrays to be consistent and less namespace-hostile */ -/* Exported for libstand */ +/* Exported for libsa */ struct devsw *devsw[] = { #if defined(LOADER_DISK_SUPPORT) || defined(LOADER_CD9660_SUPPORT) &ofwdisk, diff --git a/stand/uboot/arch/powerpc/conf.c b/stand/uboot/arch/powerpc/conf.c index 49658a47cbd4..1ace9b5e53de 100644 --- a/stand/uboot/arch
git: 11f49259c88e - main - stand: Change libstand.3 to libsa.3
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=11f49259c88ed4c110eefe89fa3862ef419b4150 commit 11f49259c88ed4c110eefe89fa3862ef419b4150 Author: Warner Losh AuthorDate: 2022-04-30 14:07:52 + Commit: Warner Losh CommitDate: 2022-04-30 14:07:52 + stand: Change libstand.3 to libsa.3 Changes instances of the non-existant libstand.3 to the more correct, but also non-existant libsa.3. Sponsored by: Netflix --- stand/man/loader.8 | 2 +- stand/man/loader_4th.8 | 4 ++-- stand/man/loader_lua.8 | 4 ++-- stand/man/loader_simp.8 | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/stand/man/loader.8 b/stand/man/loader.8 index aff8c14d4a59..7e652a536b21 100644 --- a/stand/man/loader.8 +++ b/stand/man/loader.8 @@ -94,7 +94,7 @@ The environment variables common to all interpreters are described in the .Dq BUILTIN ENVIRONMENT VARIABLES section. .Sh SEE ALSO -.Xr libstand 3 , +.Xr libsa 3 , .Xr loader.conf 5 , .Xr tuning 7 , .Xr boot 8 , diff --git a/stand/man/loader_4th.8 b/stand/man/loader_4th.8 index d6d4d9329882..868e70d180d2 100644 --- a/stand/man/loader_4th.8 +++ b/stand/man/loader_4th.8 @@ -40,7 +40,7 @@ On IA32 (i386) architectures, it is a .Pa BTX client. It is linked statically to -.Xr libstand 3 +.Xr libsa 3 and usually located in the directory .Pa /boot . .Pp @@ -530,7 +530,7 @@ executed. Unspecified error. .El .Sh SEE ALSO -.Xr libstand 3 , +.Xr libsa 3 , .Xr loader.conf 5 , .Xr tuning 7 , .Xr boot 8 , diff --git a/stand/man/loader_lua.8 b/stand/man/loader_lua.8 index adf2bca6be14..1432000c4b53 100644 --- a/stand/man/loader_lua.8 +++ b/stand/man/loader_lua.8 @@ -40,7 +40,7 @@ On IA32 (i386) architectures, it is a .Pa BTX client. It is linked statically to -.Xr libstand 3 +.Xr libsa 3 and usually located in the directory .Pa /boot . .Pp @@ -254,7 +254,7 @@ executed. Unspecified error. .El .Sh SEE ALSO -.Xr libstand 3 , +.Xr libsa 3 , .Xr loader.conf 5 , .Xr tuning 7 , .Xr boot 8 , diff --git a/stand/man/loader_simp.8 b/stand/man/loader_simp.8 index 12da719d2e89..d628b0d6d008 100644 --- a/stand/man/loader_simp.8 +++ b/stand/man/loader_simp.8 @@ -40,7 +40,7 @@ On IA32 (i386) architectures, it is a .Pa BTX client. It is linked statically to -.Xr libstand 3 +.Xr libsa 3 and usually located in the directory .Pa /boot . .Pp @@ -725,7 +725,7 @@ executed. Unspecified error. .El .Sh SEE ALSO -.Xr libstand 3 , +.Xr libsa 3 , .Xr loader.conf 5 , .Xr tuning 7 , .Xr boot 8 ,
git: 1ad9134e1112 - main - bsdinstall netconfig_ipv4: Fix resolv.conf rebuild
The branch main has been updated by asiciliano: URL: https://cgit.FreeBSD.org/src/commit/?id=1ad9134e1112cec3bc29c9ae36b5e02526edb388 commit 1ad9134e1112cec3bc29c9ae36b5e02526edb388 Author: Alfonso S. Siciliano AuthorDate: 2022-04-30 15:25:57 + Commit: Alfonso S. Siciliano CommitDate: 2022-04-30 15:34:53 + bsdinstall netconfig_ipv4: Fix resolv.conf rebuild After an installation restart (for error or choice) dhclient does not rebuild resolv.conf so `dialog --mixedform' of "Resolver Configuration" in bsdinstall/scripts/netconfig draws empty forms. It causes a bad UX, to see PR262262. Fixed resetting the interface before to run dhclient. PR: 262262 Reviewed by:bapt Differential Revision: https://reviews.freebsd.org/D35094 --- usr.sbin/bsdinstall/scripts/netconfig_ipv4 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv4 b/usr.sbin/bsdinstall/scripts/netconfig_ipv4 index 2acd9029d150..44dc8cf21f1d 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig_ipv4 +++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv4 @@ -49,6 +49,9 @@ esac dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --yesno 'Would you like to use DHCP to configure this interface?' 0 0 if [ $? -eq $DIALOG_OK ]; then if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then + # XXX: get interface down otherwise after installation restart + # dhclient does not build a new resolv.conf (see PR262262). + ifconfig $INTERFACE down ifconfig $INTERFACE up dialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP lease..." 0 0 err=$( pkill -F /var/run/dhclient/dhclient.${INTERFACE}.pid; dhclient $INTERFACE 2>&1 )
git: f9f42a709b2b - main - sbin/devfs: Correct usage
The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=f9f42a709b2b3f8c8d3de517f301d4ccb33e7b16 commit f9f42a709b2b3f8c8d3de517f301d4ccb33e7b16 Author: Enji Cooper AuthorDate: 2022-04-30 17:54:43 + Commit: Enji Cooper CommitDate: 2022-04-30 18:00:11 + sbin/devfs: Correct usage The -s applies to rule keyword only and it follows the rule keyword. MFC after: 1 week PR: [[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id= 263289|263289]] Submitted by: Yuichiro NAITO Fixes: c3e412c08333 sbin/devfs: clarify usage Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D34934 --- sbin/devfs/devfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/devfs/devfs.c b/sbin/devfs/devfs.c index 7be94c4737de..b5a6bf4015a2 100644 --- a/sbin/devfs/devfs.c +++ b/sbin/devfs/devfs.c @@ -228,7 +228,7 @@ usage(void) { fprintf(stderr, "usage: %s\n%s\n", - "\tdevfs [-m mount-point] [-s ruleset] rule ...", + "\tdevfs [-m mount-point] rule [-s ruleset] ...", "\tdevfs [-m mount-point] ruleset ..."); exit(1); }
Re: git: 9b4c606b96ce - main - bsdinstall/partedit: Fix UFS auto partitioning
> On Apr 29, 2022, at 5:20 PM, Shawn Webb wrote: > > On Fri, Apr 29, 2022 at 11:24:56PM +, Alfonso S. Siciliano wrote: >> The branch main has been updated by asiciliano: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=9b4c606b96ce8a8b011dc50295c71c38741a0f4f >> >> commit 9b4c606b96ce8a8b011dc50295c71c38741a0f4f >> Author: Alfonso S. Siciliano >> AuthorDate: 2022-04-29 23:19:30 + >> Commit: Alfonso S. Siciliano >> CommitDate: 2022-04-29 23:24:23 + >> >>bsdinstall/partedit: Fix UFS auto partitioning >> >>Fix bsdinstall "Auto (UFS) Guided Disk Setup" and sade(8) "Auto". >>The problem is a string comparison failure, it arose during the >>dialog(3)/bsddialog(3) form conversion: >> >> * dialog uses only form.text while bsdialog differentiates between >> form.init and form.value. >> * dialog always allocates memory for form values while bsddialog only >> when a button is pressed. >> >>Reviewed by:bapt >>Differential Revision: https://reviews.freebsd.org/D35033 >> --- >> usr.sbin/bsdinstall/partedit/gpart_ops.c | 6 ++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/usr.sbin/bsdinstall/partedit/gpart_ops.c >> b/usr.sbin/bsdinstall/partedit/gpart_ops.c >> index 65cda247e146..26aedb58ef39 100644 >> --- a/usr.sbin/bsdinstall/partedit/gpart_ops.c >> +++ b/usr.sbin/bsdinstall/partedit/gpart_ops.c >> @@ -1154,6 +1154,12 @@ addpartform: >> init_allocated = true; >> goto addpartform; >> } >> +} else { /* auto partitioning */ >> +items[0].value = strdup(items[0].init); >> +items[1].value = strdup(items[1].init); >> +items[2].value = strdup(items[2].init); >> +if (nitems > 3) >> +items[3].value = strdup(items[3].init); >> } >> >> /* >> > > Hey Alfonso, > > Would it be a good idea to check the return value of strdup in this > particular case? An assert would work here, but the program wouldn’t get very far. It would be nice if we had a macro or function that does this like (IIRC) some of the other BSDs do. -Enji signature.asc Description: Message signed with OpenPGP
git: d511f4c7bf98 - stable/13 - powerpc: enable wlan and ath modules in GENERIC64*
The branch stable/13 has been updated by pkubaj (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=d511f4c7bf98fb83c25208ab997daa43578202ac commit d511f4c7bf98fb83c25208ab997daa43578202ac Author: Piotr Kubaj AuthorDate: 2022-04-28 00:05:56 + Commit: Piotr Kubaj CommitDate: 2022-04-30 18:23:55 + powerpc: enable wlan and ath modules in GENERIC64* Reviewed by:jhibbits (src) Differential Revision: https://reviews.freebsd.org/D35089 (cherry picked from commit 25768526bbedf2ae8ba35001d53c4a5eb09c36d8) --- sys/powerpc/conf/GENERIC64 | 14 +- sys/powerpc/conf/GENERIC64LE | 14 +- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64 index 5785bf293c8b..1e7fd9759874 100644 --- a/sys/powerpc/conf/GENERIC64 +++ b/sys/powerpc/conf/GENERIC64 @@ -215,7 +215,19 @@ device cue # CATC USB Ethernet device kue # Kawasaki LSI USB Ethernet # Wireless NIC cards -optionsIEEE80211_SUPPORT_MESH +device wlan# 802.11 support +optionsIEEE80211_SUPPORT_MESH # enable 802.11s draft support +optionsIEEE80211_DEBUG # enable debug msgs +device wlan_wep# 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support +device wlan_amrr # AMRR transmit rate control algorithm +device ath # Atheros NICs +device ath_pci # Atheros pci/cardbus glue +device ath_hal # pci/cardbus chip support +optionsAH_AR5416_INTERRUPT_MITIGATION # AR5416 interrupt mitigation +optionsATH_ENABLE_11N # Enable 802.11n support for AR5416 and later +device ath_rate_sample # SampleRate tx rate control for ath # FireWire support device firewire# FireWire bus code diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE index 969208dc83b1..988597d32ffd 100644 --- a/sys/powerpc/conf/GENERIC64LE +++ b/sys/powerpc/conf/GENERIC64LE @@ -207,7 +207,19 @@ device cue # CATC USB Ethernet device kue # Kawasaki LSI USB Ethernet # Wireless NIC cards -optionsIEEE80211_SUPPORT_MESH +device wlan# 802.11 support +optionsIEEE80211_SUPPORT_MESH # enable 802.11s draft support +optionsIEEE80211_DEBUG # enable debug msgs +device wlan_wep# 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support +device wlan_amrr # AMRR transmit rate control algorithm +device ath # Atheros NICs +device ath_pci # Atheros pci/cardbus glue +device ath_hal # pci/cardbus chip support +optionsAH_AR5416_INTERRUPT_MITIGATION # AR5416 interrupt mitigation +optionsATH_ENABLE_11N # Enable 802.11n support for AR5416 and later +device ath_rate_sample # SampleRate tx rate control for ath # FireWire support device firewire# FireWire bus code
git: 70b5c4ff4807 - main - stand: Install libsa.3
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=70b5c4ff4807656307d1cb2f7193916ebab94893 commit 70b5c4ff4807656307d1cb2f7193916ebab94893 Author: Warner Losh AuthorDate: 2022-04-30 18:51:19 + Commit: Warner Losh CommitDate: 2022-04-30 18:52:19 + stand: Install libsa.3 Turns out there is a libsa.3. It's a bit out of date, but we reference it in a number of places so we should install it. We need to do the DO32 dance because this Makefile is included twice and we don't want it installing twice. Sponsored by: Netflix --- stand/libsa/Makefile | 4 1 file changed, 4 insertions(+) diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile index 781194d0a28d..6f2eaf3d959e 100644 --- a/stand/libsa/Makefile +++ b/stand/libsa/Makefile @@ -191,4 +191,8 @@ SRCS+= explicit_bzero.c crc32_libkern.c .include "${SASRC}/zfs/Makefile.inc" .endif +.if ${DO32:U0} == 0 +MAN=libsa.3 +.endif + .include
git: f768ecf247b7 - main - Update WITH_PROFILE description as it is yet removed
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f768ecf247b7acd98fd0ee395522e559769e3e51 commit f768ecf247b7acd98fd0ee395522e559769e3e51 Author: Ed Maste AuthorDate: 2022-04-30 19:25:35 + Commit: Ed Maste CommitDate: 2022-04-30 19:35:01 + Update WITH_PROFILE description as it is yet removed GCC still wants to link against (for example) libc_p.a when -pg is in use, and it's unclear when and how this will be addressed. Change the WITH_PROFILE option description to claim that it may be removed from an unspecified future version of FreeBSD, rather than FreeBSD 14. Reported by:Steve Kargl MFC after: 1 week Sponsored by: The FreeBSD Foundation --- tools/build/options/WITH_PROFILE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build/options/WITH_PROFILE b/tools/build/options/WITH_PROFILE index 3f91c4394911..3445c82f946f 100644 --- a/tools/build/options/WITH_PROFILE +++ b/tools/build/options/WITH_PROFILE @@ -1,5 +1,5 @@ .\" $FreeBSD$ Build profiled libraries for use with .Xr gprof 8 . -This option is deprecated and is not present in -.Fx 14 . +This option is deprecated and may not be present in a future version of +.Fx .
git: 60b08330a503 - main - Correct markup in WITH_/WITHOUT_UNIFIED_OBJDIR descriptions
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=60b08330a503b5a3380b5f68c2aa4c1c4f610a85 commit 60b08330a503b5a3380b5f68c2aa4c1c4f610a85 Author: Ed Maste AuthorDate: 2022-04-30 19:39:21 + Commit: Ed Maste CommitDate: 2022-04-30 19:40:49 + Correct markup in WITH_/WITHOUT_UNIFIED_OBJDIR descriptions MFC after: 3 days Sponsored by: The FreeBSD Foundation --- tools/build/options/WITHOUT_UNIFIED_OBJDIR | 2 +- tools/build/options/WITH_UNIFIED_OBJDIR| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build/options/WITHOUT_UNIFIED_OBJDIR b/tools/build/options/WITHOUT_UNIFIED_OBJDIR index 840196941da4..a76e30ca4123 100644 --- a/tools/build/options/WITHOUT_UNIFIED_OBJDIR +++ b/tools/build/options/WITHOUT_UNIFIED_OBJDIR @@ -11,5 +11,5 @@ is used. .Pp This option is transitional and will be removed before the 12.0 release, at which time -.va WITH_UNIFIED_OBJDIR +.Va WITH_UNIFIED_OBJDIR will be enabled permanently. diff --git a/tools/build/options/WITH_UNIFIED_OBJDIR b/tools/build/options/WITH_UNIFIED_OBJDIR index 2a551e1d9e17..b3d245121ea3 100644 --- a/tools/build/options/WITH_UNIFIED_OBJDIR +++ b/tools/build/options/WITH_UNIFIED_OBJDIR @@ -8,5 +8,5 @@ is used. .Pp This option is transitional and will be removed before the 12.0 release, at which time -.va WITH_UNIFIED_OBJDIR +.Va WITH_UNIFIED_OBJDIR will be enabled permanently.
git: 13cf43130436 - main - src.conf.5: regen after f768ecf247b7
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=13cf4313043655ce2562bf2fb9b8af554db184d2 commit 13cf4313043655ce2562bf2fb9b8af554db184d2 Author: Ed Maste AuthorDate: 2022-04-30 19:42:49 + Commit: Ed Maste CommitDate: 2022-04-30 19:42:49 + src.conf.5: regen after f768ecf247b7 --- share/man/man5/src.conf.5 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index cf16934e8bf3..7c5ca11170c5 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd February 9, 2022 +.Dd April 30, 2022 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1389,8 +1389,8 @@ and related programs. .It Va WITH_PROFILE Build profiled libraries for use with .Xr gprof 8 . -This option is deprecated and is not present in -.Fx 14 . +This option is deprecated and may not be present in a future version of +.Fx . .It Va WITHOUT_QUOTAS Do not build .Xr quota 1
Re: git: 16ee5cd15ad0 - main - Fix mdoc issues found by mandoc -Tlint.
On Fri, 25 Feb 2022 at 11:41, Christian Brueffer wrote: > > The branch main has been updated by brueffer: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=16ee5cd15ad09520c03f9f222f4400507f1a82d7 > > commit 16ee5cd15ad09520c03f9f222f4400507f1a82d7 > Author: Christian Brueffer > AuthorDate: 2022-02-25 16:39:09 + > Commit: Christian Brueffer > CommitDate: 2022-02-25 16:41:19 + > > Fix mdoc issues found by mandoc -Tlint. > --- ... > share/man/man5/src.conf.5| 3 +-- ... src.conf.5 is automatically generated (via `make makeman`) so these changes would be lost the next time it's updated. I just applied two of the changes from this commit to the source files, in commit 60b08330a503. It looks like there is still a stray .Pp in makeman's output though.
git: 5218d82c81f9 - main - nfscl: Add support for a NFSv4 AppendWrite RPC
The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=5218d82c81f987223054671b9821d39f08d87599 commit 5218d82c81f987223054671b9821d39f08d87599 Author: Rick Macklem AuthorDate: 2022-04-30 20:49:23 + Commit: Rick Macklem CommitDate: 2022-04-30 20:49:23 + nfscl: Add support for a NFSv4 AppendWrite RPC For IO_APPEND VOP_WRITE()s, the code first does a Getattr RPC to acquire the file's size, before it can do the Write RPC. Although NFS does not have an append write operation, an NFSv4 compound can use a Verify operation to check that the client's notion of the file's size is correct, followed by the Write operation. This patch modifies the NFSv4 client to use an Appendwrite RPC, which does a Verify to check the file's size before doing the Write. This avoids the need for a Getattr RPC to preceed this RPC and reduces the RPC count by half for IO_APPEND writes, so long as the client knows the file's size. The nfsd structure was moved from the stack to be malloc()'d, since the kernel stack limit was being exceeded. While here, fix the types of a few variables, although there should not be any semantics change caused by these type changes. --- sys/fs/nfs/nfs_var.h| 2 +- sys/fs/nfsclient/nfs.h | 2 +- sys/fs/nfsclient/nfs_clbio.c| 26 +++- sys/fs/nfsclient/nfs_clrpcops.c | 67 + sys/fs/nfsclient/nfs_clvnops.c | 6 ++-- 5 files changed, 78 insertions(+), 25 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 3a2a27890d7b..c4dc2451523e 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -471,7 +471,7 @@ int nfsrpc_readlink(vnode_t, struct uio *, struct ucred *, int nfsrpc_read(vnode_t, struct uio *, struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *); int nfsrpc_write(vnode_t, struct uio *, int *, int *, -struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *, int); +struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, int, int); int nfsrpc_mknod(vnode_t, char *, int, struct vattr *, u_int32_t, enum vtype, struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, struct nfsfh **, int *, int *, void *); diff --git a/sys/fs/nfsclient/nfs.h b/sys/fs/nfsclient/nfs.h index ce1747a2ab6b..94faeb381ac0 100644 --- a/sys/fs/nfsclient/nfs.h +++ b/sys/fs/nfsclient/nfs.h @@ -107,7 +107,7 @@ void ncl_nodeunlock(struct nfsnode *); int ncl_getattrcache(struct vnode *, struct vattr *); int ncl_readrpc(struct vnode *, struct uio *, struct ucred *); int ncl_writerpc(struct vnode *, struct uio *, struct ucred *, int *, int *, -int); +int, int); int ncl_readlinkrpc(struct vnode *, struct uio *, struct ucred *); int ncl_readdirrpc(struct vnode *, struct uio *, struct ucred *, struct thread *); diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 081aff6c0e7c..c89d6796ea00 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -793,7 +793,7 @@ do_sync: */ must_commit = 2; error = ncl_writerpc(vp, &uio, cred, &iomode, - &must_commit, 0); + &must_commit, 0, ioflag); KASSERT((must_commit == 2), ("ncl_directio_write: Updated write verifier")); if (error) @@ -986,11 +986,21 @@ ncl_write(struct vop_write_args *ap) * get the append lock. */ if (ioflag & IO_APPEND) { - np->n_attrstamp = 0; - KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp); - error = VOP_GETATTR(vp, &vattr, cred); - if (error) - return (error); + /* +* For NFSv4, the AppendWrite will Verify the size against +* the file's size on the server. If not the same, the +* write will then be retried, using the file size returned +* by the AppendWrite. However, for NFSv2 and NFSv3, the +* size must be acquired here via a Getattr RPC. +* The AppendWrite is not done for a pNFS mount. +*/ + if (!NFSHASNFSV4(nmp) || NFSHASPNFS(nmp)) { + np->n_attrstamp = 0; + KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp); + error = VOP_GETATTR(vp, &vattr, cred); + if (error) + return (error); + } NFSLOCKNODE(np); uio->uio_offset = np->n_size; NFSUNLOCKNODE(np); @@ -1633,7 +1643,7 @@ ncl_doio_directwrite(struct buf *bp) * verifier on the mount point. */ must_commit = 2; - ncl_writerpc(bp->b
git: f44280bf5fbb - main - libz: update the upgrade instructions to reflect reality
The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=f44280bf5fbb0599871612e9286407981ad4aaa3 commit f44280bf5fbb0599871612e9286407981ad4aaa3 Author: Xin LI AuthorDate: 2022-04-30 23:57:54 + Commit: Xin LI CommitDate: 2022-04-30 23:57:54 + libz: update the upgrade instructions to reflect reality --- lib/libz/FREEBSD-upgrade | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/libz/FREEBSD-upgrade b/lib/libz/FREEBSD-upgrade index 203ae5c220c2..1b034f86f211 100644 --- a/lib/libz/FREEBSD-upgrade +++ b/lib/libz/FREEBSD-upgrade @@ -1,11 +1,9 @@ -$FreeBSD$ - Original distribution from http://zlib.net/. Currently, only trivial -changes were made to support build of libstand and to suppress certain +changes were made to support build of libsa and to suppress certain compiler warnings, we upstream our local changes whenever they would benefit other consumers. -To Update: +To update: 1) Unpack vendor sources into a clean directory. 2) Import onto the vendor area. 3) Merge the vendor tree to sys/contrib/zlib, which contains a stripped down
git: 3529ddcfbe09 - stable/13 - CAM: Replicate e0ceec676dc8 from da to ada and nda.
The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=3529ddcfbe09c6f00e8d09600b08b1a7f5b3a011 commit 3529ddcfbe09c6f00e8d09600b08b1a7f5b3a011 Author: Alexander Motin AuthorDate: 2022-04-24 00:14:10 + Commit: Alexander Motin CommitDate: 2022-05-01 02:54:29 + CAM: Replicate e0ceec676dc8 from da to ada and nda. MFC after: 1 week (cherry picked from commit 38f8addaab1aac0830948189826bd7c7931859fd) --- sys/cam/ata/ata_da.c | 3 +++ sys/cam/nvme/nvme_da.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index a101c5b5a527..abcc63b8df5f 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -3668,6 +3668,9 @@ adashutdown(void *arg, int howto) { int how; + if ((howto & RB_NOSYNC) != 0) + return; + adaflush(); /* diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c index c7dc671170cc..84270143cbe6 100644 --- a/sys/cam/nvme/nvme_da.c +++ b/sys/cam/nvme/nvme_da.c @@ -1354,6 +1354,9 @@ static void ndashutdown(void *arg, int howto) { + if ((howto & RB_NOSYNC) != 0) + return; + ndaflush(); }