From owner-svn-src-vendor@freebsd.org Tue Sep 29 13:56:10 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 39CE9424851; Tue, 29 Sep 2020 13:56:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C11Bf0th9z4q5x; Tue, 29 Sep 2020 13:56:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F2DD1F77D; Tue, 29 Sep 2020 13:56:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08TDu9Xo024920; Tue, 29 Sep 2020 13:56:09 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08TDu9Jv024919; Tue, 29 Sep 2020 13:56:09 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202009291356.08TDu9Jv024919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 29 Sep 2020 13:56:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r366253 - vendor-sys/openzfs/dist/module/os/freebsd/zfs X-SVN-Group: vendor-sys X-SVN-Commit-Author: markj X-SVN-Commit-Paths: vendor-sys/openzfs/dist/module/os/freebsd/zfs X-SVN-Commit-Revision: 366253 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Sep 2020 13:56:10 -0000 Author: markj Date: Tue Sep 29 13:56:09 2020 New Revision: 366253 URL: https://svnweb.freebsd.org/changeset/base/366253 Log: Apply 0daa0320e994 ("Fix a logic bug in the FreeBSD getpages VOP") Modified: vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_vnops.c Modified: vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_vnops.c ============================================================================== --- vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_vnops.c Tue Sep 29 13:41:47 2020 (r366252) +++ vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_vnops.c Tue Sep 29 13:56:09 2020 (r366253) @@ -4859,7 +4859,8 @@ zfs_getpages(struct vnode *vp, vm_page_t *ma, int coun obj_size = object->un_pager.vnp.vnp_size; zfs_vmobject_wunlock(object); if (IDX_TO_OFF(ma[count - 1]->pindex) >= obj_size) { - zfs_rangelock_exit(lr); + if (lr != NULL) + zfs_rangelock_exit(lr); ZFS_EXIT(zfsvfs); return (zfs_vm_pagerret_bad); } @@ -4887,7 +4888,8 @@ zfs_getpages(struct vnode *vp, vm_page_t *ma, int coun error = dmu_read_pages(os, zp->z_id, ma, count, &pgsin_b, &pgsin_a, MIN(end, obj_size) - (end - PAGE_SIZE)); - zfs_rangelock_exit(lr); + if (lr != NULL) + zfs_rangelock_exit(lr); ZFS_ACCESSTIME_STAMP(zfsvfs, zp); ZFS_EXIT(zfsvfs); From owner-svn-src-vendor@freebsd.org Thu Oct 1 04:26:00 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7DA23F1F08; Thu, 1 Oct 2020 04:26:00 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C20Rr4q2Dz4Dpf; Thu, 1 Oct 2020 04:26:00 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8834FA976; Thu, 1 Oct 2020 04:26:00 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0914Q0NS071185; Thu, 1 Oct 2020 04:26:00 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0914PsX9071149; Thu, 1 Oct 2020 04:25:54 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202010010425.0914PsX9071149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 1 Oct 2020 04:25:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r366307 - in vendor/nvi/dist: . catalog cl common ex files man regex vi X-SVN-Group: vendor X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in vendor/nvi/dist: . catalog cl common ex files man regex vi X-SVN-Commit-Revision: 366307 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2020 04:26:00 -0000 Author: bapt Date: Thu Oct 1 04:25:54 2020 New Revision: 366307 URL: https://svnweb.freebsd.org/changeset/base/366307 Log: Import nvi 2.2.0-05ed8b9 This snapshot just brings a bunch of fixes in particular a fix for vi -w PR: 241985 Reported by: fernape Modified: vendor/nvi/dist/CMakeLists.txt vendor/nvi/dist/catalog/dump.c vendor/nvi/dist/cl/cl.h vendor/nvi/dist/cl/cl_read.c vendor/nvi/dist/cl/cl_term.c vendor/nvi/dist/common/common.h vendor/nvi/dist/common/cut.h vendor/nvi/dist/common/exf.c vendor/nvi/dist/common/key.c vendor/nvi/dist/common/log.c vendor/nvi/dist/common/main.c vendor/nvi/dist/common/mark.c vendor/nvi/dist/common/mem.h vendor/nvi/dist/common/msg.c vendor/nvi/dist/common/options.c vendor/nvi/dist/common/put.c vendor/nvi/dist/common/recover.c vendor/nvi/dist/common/util.c vendor/nvi/dist/ex/ex.c vendor/nvi/dist/ex/ex.h vendor/nvi/dist/ex/ex_argv.c vendor/nvi/dist/ex/ex_bang.c vendor/nvi/dist/ex/ex_cscope.c vendor/nvi/dist/ex/ex_filter.c vendor/nvi/dist/ex/ex_global.c vendor/nvi/dist/ex/ex_script.c vendor/nvi/dist/ex/ex_shell.c vendor/nvi/dist/ex/ex_subst.c vendor/nvi/dist/files/config.h.in vendor/nvi/dist/files/pathnames.h.in vendor/nvi/dist/man/vi.1 vendor/nvi/dist/regex/engine.c vendor/nvi/dist/regex/regexec.c vendor/nvi/dist/vi/v_itxt.c vendor/nvi/dist/vi/v_paragraph.c vendor/nvi/dist/vi/v_section.c vendor/nvi/dist/vi/v_sentence.c vendor/nvi/dist/vi/v_txt.c vendor/nvi/dist/vi/vi.c vendor/nvi/dist/vi/vs_line.c vendor/nvi/dist/vi/vs_msg.c vendor/nvi/dist/vi/vs_refresh.c vendor/nvi/dist/vi/vs_relative.c vendor/nvi/dist/vi/vs_smap.c Modified: vendor/nvi/dist/CMakeLists.txt ============================================================================== --- vendor/nvi/dist/CMakeLists.txt Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/CMakeLists.txt Thu Oct 1 04:25:54 2020 (r366307) @@ -13,6 +13,7 @@ project(nvi2 C) include(CheckIncludeFiles) include(CheckFunctionExists) +include(CheckStructHasMember) include(CheckCSourceCompiles) mark_as_advanced(CMAKE_INSTALL_PREFIX) @@ -127,6 +128,7 @@ endif() if(USE_WIDECHAR) find_library(CURSES_LIBRARY NAMES ncursesw cursesw curses HINTS /usr/lib) + find_library(TERMINFO_LIBRARY NAMES tinfow terminfo HINTS /usr/lib) # link to the wchar_t awared BSD libregex.a add_library(regex STATIC) @@ -136,13 +138,14 @@ if(USE_WIDECHAR) target_link_libraries(nvi PRIVATE regex) else() find_library(CURSES_LIBRARY NAMES ncurses curses HINTS /usr/lib) + find_library(TERMINFO_LIBRARY NAMES tinfo terminfo HINTS /usr/lib) target_compile_options(nvi PRIVATE -Wno-pointer-sign) endif() -target_link_libraries(nvi PRIVATE ${CURSES_LIBRARY}) +target_link_libraries(nvi PRIVATE ${CURSES_LIBRARY} ${TERMINFO_LIBRARY}) if(USE_ICONV) - check_function_exists(__iconv ICONV_IN_LIBC) + check_function_exists(iconv ICONV_IN_LIBC) if(NOT ICONV_IN_LIBC) find_path(ICONV_INCLUDE_DIR iconv.h) find_library(ICONV_LIBRARY iconv) @@ -173,9 +176,26 @@ if(USE_ICONV) target_link_libraries(nvi PRIVATE ${ICONV_LIBRARY}) endif() +check_function_exists(getprogname GETPROGNAME_IN_LIBC) +check_function_exists(strlcpy STRLCPY_IN_LIBC) +if(NOT GETPROGNAME_IN_LIBC OR NOT STRLCPY_IN_LIBC) + find_package(PkgConfig REQUIRED) + pkg_check_modules(LIBBSD libbsd-overlay) + add_definitions(${LIBBSD_CFLAGS}) + target_link_libraries(nvi PRIVATE ${LIBBSD_LIBRARIES}) +endif() + +check_function_exists(dbopen DBOPEN_IN_LIBC) +if(NOT DBOPEN_IN_LIBC) + target_link_libraries(nvi PRIVATE db1) +endif() + check_include_files(libutil.h HAVE_LIBUTIL_H) check_include_files(ncurses.h HAVE_NCURSES_H) +check_include_files(ncursesw/ncurses.h HAVE_NCURSESW_NCURSES_H) +check_include_files(pty.h HAVE_PTY_H) check_include_files(term.h HAVE_TERM_H) +check_struct_has_member("struct dirent" d_namlen dirent.h HAVE_DIRENT_D_NAMLEN LANGUAGE C) configure_file(files/config.h.in config.h) Modified: vendor/nvi/dist/catalog/dump.c ============================================================================== --- vendor/nvi/dist/catalog/dump.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/catalog/dump.c Thu Oct 1 04:25:54 2020 (r366307) @@ -35,24 +35,24 @@ parse(FILE *fp) { int ch, s1, s2, s3; -#define TESTD(s) { \ +#define TESTD(s) do { \ if ((s = getc(fp)) == EOF) \ return; \ if (!isdigit(s)) \ continue; \ -} -#define TESTP { \ +} while (0) +#define TESTP do { \ if ((ch = getc(fp)) == EOF) \ return; \ if (ch != '|') \ continue; \ -} -#define MOVEC(t) { \ +} while (0) +#define MOVEC(t) do { \ do { \ if ((ch = getc(fp)) == EOF) \ return; \ } while (ch != (t)); \ -} +} while (0) for (;;) { MOVEC('"'); TESTD(s1); Modified: vendor/nvi/dist/cl/cl.h ============================================================================== --- vendor/nvi/dist/cl/cl.h Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/cl/cl.h Thu Oct 1 04:25:54 2020 (r366307) @@ -10,7 +10,9 @@ #ifdef USE_WIDECHAR #define _XOPEN_SOURCE_EXTENDED #endif -#ifdef HAVE_NCURSES_H +#ifdef HAVE_NCURSESW_NCURSES_H +#include +#elif defined HAVE_NCURSES_H #include #else #include Modified: vendor/nvi/dist/cl/cl_read.c ============================================================================== --- vendor/nvi/dist/cl/cl_read.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/cl/cl_read.c Thu Oct 1 04:25:54 2020 (r366307) @@ -20,6 +20,7 @@ #include #include #include +#include #include #include Modified: vendor/nvi/dist/cl/cl_term.c ============================================================================== --- vendor/nvi/dist/cl/cl_term.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/cl/cl_term.c Thu Oct 1 04:25:54 2020 (r366307) @@ -424,16 +424,18 @@ cl_ssize(SCR *sp, int sigwinch, size_t *rowp, size_t * if (row == 0 || col == 0) { if ((p = getenv("TERM")) == NULL) goto noterm; - if (row == 0) + if (row == 0) { if ((rval = tigetnum("lines")) < 0) msgq(sp, M_SYSERR, "tigetnum: lines"); else row = rval; - if (col == 0) + } + if (col == 0) { if ((rval = tigetnum("cols")) < 0) msgq(sp, M_SYSERR, "tigetnum: cols"); else col = rval; + } } /* If nothing else, well, it's probably a VT100. */ Modified: vendor/nvi/dist/common/common.h ============================================================================== --- vendor/nvi/dist/common/common.h Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/common/common.h Thu Oct 1 04:25:54 2020 (r366307) @@ -7,7 +7,15 @@ * See the LICENSE file for redistribution information. */ +#ifndef TCSASOFT +#define TCSASOFT 0 +#endif + +#ifdef __linux__ +#include "/usr/include/db1/db.h" /* Only include db1. */ +#else #include "/usr/include/db.h" /* Only include db1. */ +#endif #include /* May refer to the bundled regex. */ /* Modified: vendor/nvi/dist/common/cut.h ============================================================================== --- vendor/nvi/dist/common/cut.h Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/common/cut.h Thu Oct 1 04:25:54 2020 (r366307) @@ -63,13 +63,13 @@ struct _text { /* Text: a linked list of lines. */ * Get named buffer 'name'. * Translate upper-case buffer names to lower-case buffer names. */ -#define CBNAME(sp, cbp, nch) { \ +#define CBNAME(sp, cbp, nch) do { \ CHAR_T L__name; \ L__name = isupper(nch) ? tolower(nch) : (nch); \ SLIST_FOREACH(cbp, sp->gp->cutq, q) \ if (cbp->name == L__name) \ break; \ -} +} while (0) /* Flags to the cut() routine. */ #define CUT_LINEMODE 0x01 /* Cut in line mode. */ Modified: vendor/nvi/dist/common/exf.c ============================================================================== --- vendor/nvi/dist/common/exf.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/common/exf.c Thu Oct 1 04:25:54 2020 (r366307) @@ -199,7 +199,7 @@ file_init(SCR *sp, FREF *frp, char *rcv_name, int flag if (!LF_ISSET(FS_OPENERR)) F_SET(frp, FR_NEWFILE); - ep->mtim = sb.st_mtimespec; + ep->mtim = sb.st_mtim; } else { /* * XXX @@ -218,7 +218,7 @@ file_init(SCR *sp, FREF *frp, char *rcv_name, int flag ep->mdev = sb.st_dev; ep->minode = sb.st_ino; - ep->mtim = sb.st_mtimespec; + ep->mtim = sb.st_mtim; if (!S_ISREG(sb.st_mode)) msgq_str(sp, M_ERR, oname, @@ -796,7 +796,7 @@ file_write(SCR *sp, MARK *fm, MARK *tm, char *name, in if (noname && !LF_ISSET(FS_FORCE | FS_APPEND) && ((F_ISSET(ep, F_DEVSET) && (sb.st_dev != ep->mdev || sb.st_ino != ep->minode)) || - timespeccmp(&sb.st_mtimespec, &ep->mtim, !=))) { + timespeccmp(&sb.st_mtim, &ep->mtim, !=))) { msgq_str(sp, M_ERR, name, LF_ISSET(FS_POSSIBLE) ? "250|%s: file modified more recently than this copy; use ! to override" : "251|%s: file modified more recently than this copy"); @@ -887,7 +887,7 @@ success_open: * we re-init the time. That way the user can clean up the disk * and rewrite without having to force it. */ - if (noname) + if (noname) { if (stat(name, &sb)) timepoint_system(&ep->mtim); else { @@ -895,8 +895,9 @@ success_open: ep->mdev = sb.st_dev; ep->minode = sb.st_ino; - ep->mtim = sb.st_mtimespec; + ep->mtim = sb.st_mtim; } + } /* * If the write failed, complain loudly. ex_writefp() has already @@ -925,11 +926,12 @@ success_open: */ if (LF_ISSET(FS_ALL) && !LF_ISSET(FS_APPEND)) { F_CLR(ep, F_MODIFIED); - if (F_ISSET(frp, FR_TMPFILE)) + if (F_ISSET(frp, FR_TMPFILE)) { if (noname) F_SET(frp, FR_TMPEXIT); else F_CLR(frp, FR_TMPEXIT); + } } p = msg_print(sp, name, &nf); @@ -1290,7 +1292,7 @@ file_m1(SCR *sp, int force, int flags) * unless force is also set. Otherwise, we fail unless forced or * there's another open screen on this file. */ - if (F_ISSET(ep, F_MODIFIED)) + if (F_ISSET(ep, F_MODIFIED)) { if (O_ISSET(sp, O_AUTOWRITE)) { if (!force && file_aw(sp, flags)) return (1); @@ -1300,6 +1302,7 @@ file_m1(SCR *sp, int force, int flags) "263|File modified since last complete write; write or use :edit! to override"); return (1); } + } return (file_m3(sp, force)); } Modified: vendor/nvi/dist/common/key.c ============================================================================== --- vendor/nvi/dist/common/key.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/common/key.c Thu Oct 1 04:25:54 2020 (r366307) @@ -424,12 +424,12 @@ v_event_append(SCR *sp, EVENT *argp) } /* Remove events from the queue. */ -#define QREM(len) { \ +#define QREM(len) do { \ if ((gp->i_cnt -= len) == 0) \ gp->i_next = 0; \ else \ gp->i_next += len; \ -} +} while (0) /* * v_event_get -- Modified: vendor/nvi/dist/common/log.c ============================================================================== --- vendor/nvi/dist/common/log.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/common/log.c Thu Oct 1 04:25:54 2020 (r366307) @@ -69,10 +69,10 @@ static int apply_with(int (*)(SCR *, recno_t, CHAR_T * SCR *, recno_t, u_char *, size_t); /* Try and restart the log on failure, i.e. if we run out of memory. */ -#define LOG_ERR { \ +#define LOG_ERR do { \ log_err(sp, __FILE__, __LINE__); \ return (1); \ -} +} while (0) /* offset of CHAR_T string in log needs to be aligned on some systems * because it is passed to db_set as a string Modified: vendor/nvi/dist/common/main.c ============================================================================== --- vendor/nvi/dist/common/main.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/common/main.c Thu Oct 1 04:25:54 2020 (r366307) @@ -48,8 +48,8 @@ editor(GS *gp, int argc, char *argv[]) size_t len; u_int flags; int ch, flagchk, lflag, secure, startup, readonly, rval, silent; - char *tag_f, *wsizearg, path[256]; - CHAR_T *w; + char *tag_f, *wsizearg; + CHAR_T *w, path[256]; size_t wlen; /* Initialize the busy routine, if not defined by the screen. */ @@ -242,9 +242,9 @@ editor(GS *gp, int argc, char *argv[]) } if (wsizearg != NULL) { ARGS *av[2], a, b; - (void)snprintf(path, sizeof(path), "window=%s", wsizearg); + (void)SPRINTF(path, SIZE(path), L("window=%s"), wsizearg); a.bp = (CHAR_T *)path; - a.len = strlen(path); + a.len = SIZE(path); b.bp = NULL; b.len = 0; av[0] = &a; @@ -533,7 +533,7 @@ v_obsolete(char *argv[]) argv[0][1] = 'c'; (void)strlcpy(argv[0] + 2, p + 1, len); } - } else if (argv[0][0] == '-') + } else if (argv[0][0] == '-') { if (argv[0][1] == '\0') { argv[0] = strdup("-s"); if (argv[0] == NULL) { @@ -545,6 +545,7 @@ nomem: warn(NULL); argv[0][1] == 't' || argv[0][1] == 'w') && argv[0][2] == '\0') ++argv; + } return (0); } Modified: vendor/nvi/dist/common/mark.c ============================================================================== --- vendor/nvi/dist/common/mark.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/common/mark.c Thu Oct 1 04:25:54 2020 (r366307) @@ -216,12 +216,13 @@ mark_insdel(SCR *sp, lnop_t op, recno_t lno) abort(); case LINE_DELETE: SLIST_FOREACH(lmp, sp->ep->marks, q) - if (lmp->lno >= lno) + if (lmp->lno >= lno) { if (lmp->lno == lno) { F_SET(lmp, MARK_DELETED); (void)log_mark(sp, lmp); } else --lmp->lno; + } break; case LINE_INSERT: /* Modified: vendor/nvi/dist/common/mem.h ============================================================================== --- vendor/nvi/dist/common/mem.h Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/common/mem.h Thu Oct 1 04:25:54 2020 (r366307) @@ -17,7 +17,7 @@ /* Increase the size of a malloc'd buffer. Two versions, one that * returns, one that jumps to an error label. */ -#define BINC_GOTO(sp, type, lp, llen, nlen) { \ +#define BINC_GOTO(sp, type, lp, llen, nlen) do { \ CHECK_TYPE(type *, lp) \ void *L__bincp; \ if ((nlen) > llen) { \ @@ -29,12 +29,12 @@ */ \ lp = L__bincp; \ } \ -} +} while (0) #define BINC_GOTOC(sp, lp, llen, nlen) \ BINC_GOTO(sp, char, lp, llen, nlen) #define BINC_GOTOW(sp, lp, llen, nlen) \ BINC_GOTO(sp, CHAR_T, lp, llen, (nlen) * sizeof(CHAR_T)) -#define BINC_RET(sp, type, lp, llen, nlen) { \ +#define BINC_RET(sp, type, lp, llen, nlen) do { \ CHECK_TYPE(type *, lp) \ void *L__bincp; \ if ((nlen) > llen) { \ @@ -46,7 +46,7 @@ */ \ lp = L__bincp; \ } \ -} +} while (0) #define BINC_RETC(sp, lp, llen, nlen) \ BINC_RET(sp, char, lp, llen, nlen) #define BINC_RETW(sp, lp, llen, nlen) \ @@ -57,7 +57,7 @@ * from a malloc'd buffer otherwise. Two versions, one that returns, one * that jumps to an error label. */ -#define GET_SPACE_GOTO(sp, type, bp, blen, nlen) { \ +#define GET_SPACE_GOTO(sp, type, bp, blen, nlen) do { \ CHECK_TYPE(type *, bp) \ GS *L__gp = (sp) == NULL ? NULL : (sp)->gp; \ if (L__gp == NULL || F_ISSET(L__gp, G_TMP_INUSE)) { \ @@ -70,12 +70,12 @@ blen = L__gp->tmp_blen; \ F_SET(L__gp, G_TMP_INUSE); \ } \ -} +} while (0) #define GET_SPACE_GOTOC(sp, bp, blen, nlen) \ GET_SPACE_GOTO(sp, char, bp, blen, nlen) #define GET_SPACE_GOTOW(sp, bp, blen, nlen) \ GET_SPACE_GOTO(sp, CHAR_T, bp, blen, (nlen) * sizeof(CHAR_T)) -#define GET_SPACE_RET(sp, type, bp, blen, nlen) { \ +#define GET_SPACE_RET(sp, type, bp, blen, nlen) do { \ CHECK_TYPE(type *, bp) \ GS *L__gp = (sp) == NULL ? NULL : (sp)->gp; \ if (L__gp == NULL || F_ISSET(L__gp, G_TMP_INUSE)) { \ @@ -88,7 +88,7 @@ blen = L__gp->tmp_blen; \ F_SET(L__gp, G_TMP_INUSE); \ } \ -} +} while (0) #define GET_SPACE_RETC(sp, bp, blen, nlen) \ GET_SPACE_RET(sp, char, bp, blen, nlen) #define GET_SPACE_RETW(sp, bp, blen, nlen) \ @@ -98,7 +98,7 @@ * Add space to a GET_SPACE returned buffer. Two versions, one that * returns, one that jumps to an error label. */ -#define ADD_SPACE_GOTO(sp, type, bp, blen, nlen) { \ +#define ADD_SPACE_GOTO(sp, type, bp, blen, nlen) do { \ CHECK_TYPE(type *, bp) \ GS *L__gp = (sp) == NULL ? NULL : (sp)->gp; \ if (L__gp == NULL || bp == (type *)L__gp->tmp_bp) { \ @@ -109,12 +109,12 @@ F_SET(L__gp, G_TMP_INUSE); \ } else \ BINC_GOTO(sp, type, bp, blen, nlen); \ -} +} while (0) #define ADD_SPACE_GOTOC(sp, bp, blen, nlen) \ ADD_SPACE_GOTO(sp, char, bp, blen, nlen) #define ADD_SPACE_GOTOW(sp, bp, blen, nlen) \ ADD_SPACE_GOTO(sp, CHAR_T, bp, blen, (nlen) * sizeof(CHAR_T)) -#define ADD_SPACE_RET(sp, type, bp, blen, nlen) { \ +#define ADD_SPACE_RET(sp, type, bp, blen, nlen) do { \ CHECK_TYPE(type *, bp) \ GS *L__gp = (sp) == NULL ? NULL : (sp)->gp; \ if (L__gp == NULL || bp == (type *)L__gp->tmp_bp) { \ @@ -125,70 +125,70 @@ F_SET(L__gp, G_TMP_INUSE); \ } else \ BINC_RET(sp, type, bp, blen, nlen); \ -} +} while (0) #define ADD_SPACE_RETC(sp, bp, blen, nlen) \ ADD_SPACE_RET(sp, char, bp, blen, nlen) #define ADD_SPACE_RETW(sp, bp, blen, nlen) \ ADD_SPACE_RET(sp, CHAR_T, bp, blen, (nlen) * sizeof(CHAR_T)) /* Free a GET_SPACE returned buffer. */ -#define FREE_SPACE(sp, bp, blen) { \ +#define FREE_SPACE(sp, bp, blen) do { \ GS *L__gp = (sp) == NULL ? NULL : (sp)->gp; \ if (L__gp != NULL && bp == L__gp->tmp_bp) \ F_CLR(L__gp, G_TMP_INUSE); \ else \ free(bp); \ -} -#define FREE_SPACEW(sp, bp, blen) { \ +} while (0) +#define FREE_SPACEW(sp, bp, blen) do { \ CHECK_TYPE(CHAR_T *, bp) \ FREE_SPACE(sp, (char *)bp, blen); \ -} +} while (0) /* * Malloc a buffer, casting the return pointer. Various versions. */ -#define CALLOC(sp, p, nmemb, size) { \ +#define CALLOC(sp, p, nmemb, size) do { \ if ((p = calloc(nmemb, size)) == NULL) \ msgq(sp, M_SYSERR, NULL); \ -} -#define CALLOC_GOTO(sp, p, nmemb, size) { \ +} while (0) +#define CALLOC_GOTO(sp, p, nmemb, size) do { \ if ((p = calloc(nmemb, size)) == NULL) \ goto alloc_err; \ -} -#define CALLOC_RET(sp, p, nmemb, size) { \ +} while (0) +#define CALLOC_RET(sp, p, nmemb, size) do { \ if ((p = calloc(nmemb, size)) == NULL) { \ msgq(sp, M_SYSERR, NULL); \ return (1); \ } \ -} +} while (0) -#define MALLOC(sp, p, size) { \ +#define MALLOC(sp, p, size) do { \ if ((p = malloc(size)) == NULL) \ msgq(sp, M_SYSERR, NULL); \ -} -#define MALLOC_GOTO(sp, p, size) { \ +} while (0) +#define MALLOC_GOTO(sp, p, size) do { \ if ((p = malloc(size)) == NULL) \ goto alloc_err; \ -} -#define MALLOC_RET(sp, p, size) { \ +} while (0) +#define MALLOC_RET(sp, p, size) do { \ if ((p = malloc(size)) == NULL) { \ msgq(sp, M_SYSERR, NULL); \ return (1); \ } \ -} +} while (0) /* * Resize a buffer, free any already held memory if we can't get more. * FreeBSD's reallocf(3) does the same thing, but it's not portable yet. */ -#define REALLOC(sp, p, cast, size) { \ +#define REALLOC(sp, p, cast, size) do { \ cast newp; \ if ((newp = realloc(p, size)) == NULL) { \ free(p); \ msgq(sp, M_SYSERR, NULL); \ } \ p = newp; \ -} +} while (0) /* * p2roundup -- Modified: vendor/nvi/dist/common/msg.c ============================================================================== --- vendor/nvi/dist/common/msg.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/common/msg.c Thu Oct 1 04:25:54 2020 (r366307) @@ -731,7 +731,11 @@ msg_open(SCR *sp, char *file) * corrupt catalog file. Errno == 0 is not rare; add * EFTYPE, which is seen on FreeBSD, for a good measure. */ +#ifdef EFTYPE if (errno == 0 || errno == EFTYPE) +#else + if (errno == 0) +#endif msgq_str(sp, M_ERR, p, "030|The file %s is not a message catalog"); else Modified: vendor/nvi/dist/common/options.c ============================================================================== --- vendor/nvi/dist/common/options.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/common/options.c Thu Oct 1 04:25:54 2020 (r366307) @@ -20,6 +20,7 @@ #include #include #include +#include #include #include "common.h" @@ -312,7 +313,7 @@ opts_init(SCR *sp, int *oargs) argv[1] = &b; /* Set numeric and string default values. */ -#define OI(indx, str) { \ +#define OI(indx, str) do { \ a.len = STRLEN(str); \ if ((CHAR_T*)str != b2) /* GCC puts strings in text-space. */ \ (void)MEMCPY(b2, str, a.len+1); \ @@ -320,7 +321,7 @@ opts_init(SCR *sp, int *oargs) optindx = indx; \ goto err; \ } \ -} +} while (0) /* * Indirect global options to global space. Specifically, set up * terminal, lines, columns first, they're used by other options. @@ -366,7 +367,7 @@ opts_init(SCR *sp, int *oargs) OI(O_PARAGRAPHS, L("paragraphs=IPLPPPQPP LIpplpipbp")); (void)SPRINTF(b2, SIZE(b2), L("path=%s"), ""); OI(O_PATH, b2); - (void)SPRINTF(b2, SIZE(b2), L("recdir=%s"), _PATH_PRESERVE); + (void)SPRINTF(b2, SIZE(b2), L("recdir=%s"), NVI_PATH_PRESERVE); OI(O_RECDIR, b2); OI(O_SECTIONS, L("sections=NHSHH HUnhsh")); (void)SPRINTF(b2, SIZE(b2), @@ -573,13 +574,14 @@ opts_set(SCR *sp, ARGS *argv[], char *usage) * functions can be expensive. */ isset = !turnoff; - if (!F_ISSET(op, OPT_ALWAYS)) + if (!F_ISSET(op, OPT_ALWAYS)) { if (isset) { if (O_ISSET(sp, offset)) break; } else if (!O_ISSET(sp, offset)) break; + } /* Report to subsystems. */ if ((op->func != NULL && @@ -945,6 +947,7 @@ static int opts_print(SCR *sp, OPTLIST const *op) { int curlen, offset; + const char *p; curlen = 0; offset = op - optlist; @@ -958,8 +961,13 @@ opts_print(SCR *sp, OPTLIST const *op) curlen += ex_printf(sp, WS"=%ld", op->name, O_VAL(sp, offset)); break; case OPT_STR: - curlen += ex_printf(sp, WS"=\"%s\"", op->name, - O_STR(sp, offset) == NULL ? "" : O_STR(sp, offset)); + curlen += ex_printf(sp, WS"=\"", op->name); + p = O_STR(sp, offset); + /* Keep correct count for unprintable character sequences */ + if (p != NULL) + for (; *p != '\0'; ++p) + curlen += ex_puts(sp, unctrl(*p)); + curlen += ex_puts(sp, "\""); break; } return (curlen); Modified: vendor/nvi/dist/common/put.c ============================================================================== --- vendor/nvi/dist/common/put.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/common/put.c Thu Oct 1 04:25:54 2020 (r366307) @@ -39,7 +39,7 @@ put(SCR *sp, CB *cbp, CHAR_T *namep, MARK *cp, MARK *r CHAR_T *bp, *t; CHAR_T *p; - if (cbp == NULL) + if (cbp == NULL) { if (namep == NULL) { cbp = sp->gp->dcbp; if (cbp == NULL) { @@ -56,6 +56,7 @@ put(SCR *sp, CB *cbp, CHAR_T *namep, MARK *cp, MARK *r return (1); } } + } tp = TAILQ_FIRST(cbp->textq); /* Modified: vendor/nvi/dist/common/recover.c ============================================================================== --- vendor/nvi/dist/common/recover.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/common/recover.c Thu Oct 1 04:25:54 2020 (r366307) @@ -421,7 +421,7 @@ rcv_mailfile(SCR *sp, int issync, char *cp_path) getprogname(), " -r ", qt); free(qt); free(host); - if (buf == NULL) { + if (len == -1) { msgq(sp, M_SYSERR, NULL); goto err; } @@ -701,7 +701,7 @@ rcv_read(SCR *sp, FREF *frp) /* If we've found more than one, take the most recent. */ (void)fstat(fileno(fp), &sb); if (recp == NULL || - timespeccmp(&rec_mtim, &sb.st_mtimespec, <)) { + timespeccmp(&rec_mtim, &sb.st_mtim, <)) { p = recp; t = pathp; recp = recpath; @@ -710,7 +710,7 @@ rcv_read(SCR *sp, FREF *frp) free(p); free(t); } - rec_mtim = sb.st_mtimespec; + rec_mtim = sb.st_mtim; if (sv_fd != -1) (void)close(sv_fd); sv_fd = dup(fileno(fp)); @@ -813,8 +813,7 @@ rcv_email(SCR *sp, char *fname) { char *buf; - (void)asprintf(&buf, _PATH_SENDMAIL " -odb -t < %s", fname); - if (buf == NULL) { + if (asprintf(&buf, _PATH_SENDMAIL " -odb -t < %s", fname) == -1) { msgq_str(sp, M_ERR, strerror(errno), "071|not sending email: %s"); return; Modified: vendor/nvi/dist/common/util.c ============================================================================== --- vendor/nvi/dist/common/util.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/common/util.c Thu Oct 1 04:25:54 2020 (r366307) @@ -111,8 +111,9 @@ join(char *path1, char *path2) if (path1[0] == '\0' || path2[0] == '/') return strdup(path2); - (void)asprintf(&p, path1[strlen(path1)-1] == '/' ? - "%s%s" : "%s/%s", path1, path2); + if (asprintf(&p, path1[strlen(path1)-1] == '/' ? + "%s%s" : "%s/%s", path1, path2) == -1) + return NULL; return p; } @@ -140,8 +141,13 @@ expanduser(char *str) continue; if (t == p) { /* ~ */ +#ifdef __GLIBC__ + extern char *secure_getenv(const char *); + if ((h = secure_getenv("HOME")) == NULL) { +#else if (issetugid() != 0 || (h = getenv("HOME")) == NULL) { +#endif if (((h = getlogin()) != NULL && (pwd = getpwnam(h)) != NULL) || (pwd = getpwuid(getuid())) != NULL) Modified: vendor/nvi/dist/ex/ex.c ============================================================================== --- vendor/nvi/dist/ex/ex.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/ex/ex.c Thu Oct 1 04:25:54 2020 (r366307) @@ -811,13 +811,14 @@ skip_srch: if (ecp->cmd == &cmds[C_VISUAL_EX] && F_ISS * this isn't a particularly complex trap, and if backslashes were * legal in set commands, this would have to be much more complicated. */ - if (ecp->cmd == &cmds[C_SET]) + if (ecp->cmd == &cmds[C_SET]) { for (p = ecp->cp, len = ecp->clen; len > 0; --len, ++p) if (IS_ESCAPE(sp, ecp, *p) && len > 1) { --len; ++p; } else if (*p == '\\') *p = CH_LITERAL; + } /* * Set the default addresses. It's an error to specify an address for @@ -1254,7 +1255,7 @@ addr_verify: ex_badaddr(sp, ecp->cmd, A_ZERO, NUM_OK); goto err; } - } else if (!db_exist(sp, ecp->addr2.lno)) + } else if (!db_exist(sp, ecp->addr2.lno)) { if (FL_ISSET(ecp->iflags, E_C_COUNT)) { if (db_last(sp, &lno)) goto err; @@ -1263,6 +1264,7 @@ addr_verify: ex_badaddr(sp, NULL, A_EOF, NUM_OK); goto err; } + } /* FALLTHROUGH */ case 1: if (ecp->addr1.lno == 0) { @@ -2117,7 +2119,7 @@ ex_load(SCR *sp) /* If it's a global/v command, fix up the last line. */ if (FL_ISSET(ecp->agv_flags, - AGV_GLOBAL | AGV_V) && ecp->range_lno != OOBLNO) + AGV_GLOBAL | AGV_V) && ecp->range_lno != OOBLNO) { if (db_exist(sp, ecp->range_lno)) sp->lno = ecp->range_lno; else { @@ -2126,6 +2128,7 @@ ex_load(SCR *sp) if (sp->lno == 0) sp->lno = 1; } + } free(ecp->o_cp); } Modified: vendor/nvi/dist/ex/ex.h ============================================================================== --- vendor/nvi/dist/ex/ex.h Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/ex/ex.h Thu Oct 1 04:25:54 2020 (r366307) @@ -55,12 +55,12 @@ extern EXCMDLIST const cmds[]; /* Table of ex command * at any time, and most of them won't work well if a file hasn't yet been read * in. Historic vi generally took the easy way out and dropped core. */ -#define NEEDFILE(sp, cmdp) { \ +#define NEEDFILE(sp, cmdp) do { \ if ((sp)->ep == NULL) { \ ex_wemsg(sp, (cmdp)->cmd->name, EXM_NOFILEYET); \ return (1); \ } \ -} +} while (0) /* Range structures for global and @ commands. */ typedef struct _range RANGE; @@ -102,12 +102,12 @@ struct _excmd { u_int8_t agv_flags; /* Clear the structure before each ex command. */ -#define CLEAR_EX_CMD(cmdp) { \ +#define CLEAR_EX_CMD(cmdp) do { \ u_int32_t L__f = F_ISSET(cmdp, E_PRESERVE); \ memset(&((cmdp)->buffer), 0, ((char *)&(cmdp)->flags - \ (char *)&((cmdp)->buffer)) + sizeof((cmdp)->flags)); \ F_SET(cmdp, L__f); \ -} +} while (0) CHAR_T buffer; /* Command: named buffer. */ recno_t lineno; /* Command: line number. */ Modified: vendor/nvi/dist/ex/ex_argv.c ============================================================================== --- vendor/nvi/dist/ex/ex_argv.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/ex/ex_argv.c Thu Oct 1 04:25:54 2020 (r366307) @@ -611,9 +611,17 @@ argv_flt_path(SCR *sp, EXCMD *excp, CHAR_T *path, size if (nlen == 0) { if (dp->d_name[0] == '.') continue; +#ifdef HAVE_DIRENT_D_NAMLEN len = dp->d_namlen; +#else + len = strlen(dp->d_name); +#endif } else { +#ifdef HAVE_DIRENT_D_NAMLEN len = dp->d_namlen; +#else + len = strlen(dp->d_name); +#endif if (len < nlen || memcmp(dp->d_name, name, nlen)) continue; } Modified: vendor/nvi/dist/ex/ex_bang.c ============================================================================== --- vendor/nvi/dist/ex/ex_bang.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/ex/ex_bang.c Thu Oct 1 04:25:54 2020 (r366307) @@ -96,7 +96,7 @@ ex_bang(SCR *sp, EXCMD *cmdp) */ if (cmdp->addrcnt == 0) { msg = NULL; - if (sp->ep != NULL && F_ISSET(sp->ep, F_MODIFIED)) + if (sp->ep != NULL && F_ISSET(sp->ep, F_MODIFIED)) { if (O_ISSET(sp, O_AUTOWRITE)) { if (file_aw(sp, FS_ALL)) return (0); @@ -105,6 +105,7 @@ ex_bang(SCR *sp, EXCMD *cmdp) msg = msg_cat(sp, "303|File modified since last write.", NULL); + } /* If we're still in a vi screen, move out explicitly. */ INT2CHAR(sp, ap->bp, ap->len+1, np, nlen); Modified: vendor/nvi/dist/ex/ex_cscope.c ============================================================================== --- vendor/nvi/dist/ex/ex_cscope.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/ex/ex_cscope.c Thu Oct 1 04:25:54 2020 (r366307) @@ -261,7 +261,7 @@ cscope_add(SCR *sp, EXCMD *cmdp, CHAR_T *dname) csc->dname = csc->buf; csc->dlen = len; memcpy(csc->dname, np, len); - csc->mtim = sb.st_mtimespec; + csc->mtim = sb.st_mtim; /* Get the search paths for the cscope. */ if (get_paths(sp, csc)) @@ -411,7 +411,8 @@ err: if (to_cs[0] != -1) free(dn); goto nomem; } - (void)asprintf(&cmd, CSCOPE_CMD_FMT, dn, dbn); + if (asprintf(&cmd, CSCOPE_CMD_FMT, dn, dbn) == -1) + cmd = NULL; free(dbn); free(dn); if (cmd == NULL) { @@ -812,7 +813,7 @@ csc_file(SCR *sp, CSC *csc, char *name, char **dirp, s *dirp = *pp; *dlenp = strlen(*pp); *isolderp = timespeccmp( - &sb.st_mtimespec, &csc->mtim, <); + &sb.st_mtim, &csc->mtim, <); return; } free(buf); @@ -843,7 +844,7 @@ csc_help(SCR *sp, char *cmd) { CC const *ccp; - if (cmd != NULL && *cmd != '\0') + if (cmd != NULL && *cmd != '\0') { if ((ccp = lookup_ccmd(cmd)) == NULL) { ex_printf(sp, "%s doesn't match any cscope command\n", cmd); @@ -854,6 +855,7 @@ csc_help(SCR *sp, char *cmd) ex_printf(sp, " Usage: %s\n", ccp->usage_msg); return (0); } + } ex_printf(sp, "cscope commands:\n"); for (ccp = cscope_cmds; ccp->name != NULL; ++ccp) Modified: vendor/nvi/dist/ex/ex_filter.c ============================================================================== --- vendor/nvi/dist/ex/ex_filter.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/ex/ex_filter.c Thu Oct 1 04:25:54 2020 (r366307) @@ -174,11 +174,12 @@ err: if (input[0] != -1) if (ex_readfp(sp, "filter", ofp, fm, &nread, 1)) rval = 1; sp->rptlines[L_ADDED] += nread; - if (ftype == FILTER_READ) + if (ftype == FILTER_READ) { if (fm->lno == 0) rp->lno = nread; else rp->lno += nread; + } goto uwait; } Modified: vendor/nvi/dist/ex/ex_global.c ============================================================================== --- vendor/nvi/dist/ex/ex_global.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/ex/ex_global.c Thu Oct 1 04:25:54 2020 (r366307) @@ -112,11 +112,12 @@ usage: ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE); *t = '\0'; break; } - if (p[0] == '\\') + if (p[0] == '\\') { if (p[1] == delim) ++p; else if (p[1] == '\\') *t++ = *p++; + } *t++ = *p++; } Modified: vendor/nvi/dist/ex/ex_script.c ============================================================================== --- vendor/nvi/dist/ex/ex_script.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/ex/ex_script.c Thu Oct 1 04:25:54 2020 (r366307) @@ -32,6 +32,8 @@ #include #ifdef HAVE_LIBUTIL_H #include +#elif defined HAVE_PTY_H +#include #else #include #endif Modified: vendor/nvi/dist/ex/ex_shell.c ============================================================================== --- vendor/nvi/dist/ex/ex_shell.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/ex/ex_shell.c Thu Oct 1 04:25:54 2020 (r366307) @@ -48,8 +48,7 @@ ex_shell(SCR *sp, EXCMD *cmdp) * XXX * Assumes all shells use -i. */ - (void)asprintf(&buf, "%s -i", O_STR(sp, O_SHELL)); - if (buf == NULL) { + if (asprintf(&buf, "%s -i", O_STR(sp, O_SHELL)) == -1) { msgq(sp, M_SYSERR, NULL); return (1); } Modified: vendor/nvi/dist/ex/ex_subst.c ============================================================================== --- vendor/nvi/dist/ex/ex_subst.c Thu Oct 1 03:10:42 2020 (r366306) +++ vendor/nvi/dist/ex/ex_subst.c Thu Oct 1 04:25:54 2020 (r366307) @@ -115,11 +115,12 @@ subagain: return (ex_subagain(sp, cmdp)); *t = '\0'; break; } - if (p[0] == '\\') + if (p[0] == '\\') { if (p[1] == delim) ++p; else if (p[1] == '\\') *t++ = *p++; + } *t++ = *p++; } @@ -296,7 +297,7 @@ ex_subtilde(SCR *sp, EXCMD *cmdp) * when the replacement is done. Don't change it unless you're *damned* * confident. */ -#define NEEDNEWLINE(sp) { \ +#define NEEDNEWLINE(sp) do { \ if (sp->newl_len == sp->newl_cnt) { \ sp->newl_len += 25; \ REALLOC(sp, sp->newl, size_t *, \ @@ -306,9 +307,9 @@ ex_subtilde(SCR *sp, EXCMD *cmdp) return (1); \ } \ } \ -} +} while (0) -#define BUILD(sp, l, len) { \ +#define BUILD(sp, l, len) do { \ if (lbclen + (len) > lblen) { \ lblen = p2roundup(MAX(lbclen + (len), 256)); \ REALLOC(sp, lb, CHAR_T *, lblen * sizeof(CHAR_T)); \ @@ -319,9 +320,9 @@ ex_subtilde(SCR *sp, EXCMD *cmdp) } \ MEMCPY(lb + lbclen, l, len); \ lbclen += len; \ -} +} while (0) -#define NEEDSP(sp, len, pnt) { \ +#define NEEDSP(sp, len, pnt) do { \ if (lbclen + (len) > lblen) { \ lblen = p2roundup(MAX(lbclen + (len), 256)); \ REALLOC(sp, lb, CHAR_T *, lblen * sizeof(CHAR_T)); \ @@ -331,7 +332,7 @@ ex_subtilde(SCR *sp, EXCMD *cmdp) } \ pnt = lb + lbclen; \ } \ -} +} while (0) static int s(SCR *sp, EXCMD *cmdp, CHAR_T *s, regex_t *re, u_int flags) @@ -584,7 +585,7 @@ nextmatch: match[0].rm_so = 0; empty_ok = 1; if (len == 0) goto endmatch; - BUILD(sp, s + offset, 1) + BUILD(sp, s + offset, 1); ++offset; --len; goto nextmatch; @@ -710,7 +711,7 @@ skip: offset += match[0].rm_eo; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Thu Oct 1 04:26:47 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E9DCD3F2018; Thu, 1 Oct 2020 04:26:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C20Sl5xSRz4Dwc; Thu, 1 Oct 2020 04:26:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AEBC9A978; Thu, 1 Oct 2020 04:26:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0914QlCi071286; Thu, 1 Oct 2020 04:26:47 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0914QktE071278; Thu, 1 Oct 2020 04:26:46 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202010010426.0914QktE071278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 1 Oct 2020 04:26:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r366308 - in vendor/nvi/2.2.0-05ed8b9: . catalog cl common ex files man regex vi X-SVN-Group: vendor X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in vendor/nvi/2.2.0-05ed8b9: . catalog cl common ex files man regex vi X-SVN-Commit-Revision: 366308 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2020 04:26:48 -0000 Author: bapt Date: Thu Oct 1 04:26:46 2020 New Revision: 366308 URL: https://svnweb.freebsd.org/changeset/base/366308 Log: Tag import of nvi 2.2.0-05ed8b9 Added: vendor/nvi/2.2.0-05ed8b9/ - copied from r366306, vendor/nvi/dist/ Replaced: vendor/nvi/2.2.0-05ed8b9/CMakeLists.txt - copied unchanged from r366307, vendor/nvi/dist/CMakeLists.txt vendor/nvi/2.2.0-05ed8b9/catalog/dump.c - copied unchanged from r366307, vendor/nvi/dist/catalog/dump.c vendor/nvi/2.2.0-05ed8b9/cl/cl.h - copied unchanged from r366307, vendor/nvi/dist/cl/cl.h vendor/nvi/2.2.0-05ed8b9/cl/cl_read.c - copied unchanged from r366307, vendor/nvi/dist/cl/cl_read.c vendor/nvi/2.2.0-05ed8b9/cl/cl_term.c - copied unchanged from r366307, vendor/nvi/dist/cl/cl_term.c vendor/nvi/2.2.0-05ed8b9/common/common.h - copied unchanged from r366307, vendor/nvi/dist/common/common.h vendor/nvi/2.2.0-05ed8b9/common/cut.h - copied unchanged from r366307, vendor/nvi/dist/common/cut.h vendor/nvi/2.2.0-05ed8b9/common/exf.c - copied unchanged from r366307, vendor/nvi/dist/common/exf.c vendor/nvi/2.2.0-05ed8b9/common/key.c - copied unchanged from r366307, vendor/nvi/dist/common/key.c vendor/nvi/2.2.0-05ed8b9/common/log.c - copied unchanged from r366307, vendor/nvi/dist/common/log.c vendor/nvi/2.2.0-05ed8b9/common/main.c - copied unchanged from r366307, vendor/nvi/dist/common/main.c vendor/nvi/2.2.0-05ed8b9/common/mark.c - copied unchanged from r366307, vendor/nvi/dist/common/mark.c vendor/nvi/2.2.0-05ed8b9/common/mem.h - copied unchanged from r366307, vendor/nvi/dist/common/mem.h vendor/nvi/2.2.0-05ed8b9/common/msg.c - copied unchanged from r366307, vendor/nvi/dist/common/msg.c vendor/nvi/2.2.0-05ed8b9/common/options.c - copied unchanged from r366307, vendor/nvi/dist/common/options.c vendor/nvi/2.2.0-05ed8b9/common/put.c - copied unchanged from r366307, vendor/nvi/dist/common/put.c vendor/nvi/2.2.0-05ed8b9/common/recover.c - copied unchanged from r366307, vendor/nvi/dist/common/recover.c vendor/nvi/2.2.0-05ed8b9/common/util.c - copied unchanged from r366307, vendor/nvi/dist/common/util.c vendor/nvi/2.2.0-05ed8b9/ex/ex.c - copied unchanged from r366307, vendor/nvi/dist/ex/ex.c vendor/nvi/2.2.0-05ed8b9/ex/ex.h - copied unchanged from r366307, vendor/nvi/dist/ex/ex.h vendor/nvi/2.2.0-05ed8b9/ex/ex_argv.c - copied unchanged from r366307, vendor/nvi/dist/ex/ex_argv.c vendor/nvi/2.2.0-05ed8b9/ex/ex_bang.c - copied unchanged from r366307, vendor/nvi/dist/ex/ex_bang.c vendor/nvi/2.2.0-05ed8b9/ex/ex_cscope.c - copied unchanged from r366307, vendor/nvi/dist/ex/ex_cscope.c vendor/nvi/2.2.0-05ed8b9/ex/ex_filter.c - copied unchanged from r366307, vendor/nvi/dist/ex/ex_filter.c vendor/nvi/2.2.0-05ed8b9/ex/ex_global.c - copied unchanged from r366307, vendor/nvi/dist/ex/ex_global.c vendor/nvi/2.2.0-05ed8b9/ex/ex_script.c - copied unchanged from r366307, vendor/nvi/dist/ex/ex_script.c vendor/nvi/2.2.0-05ed8b9/ex/ex_shell.c - copied unchanged from r366307, vendor/nvi/dist/ex/ex_shell.c vendor/nvi/2.2.0-05ed8b9/ex/ex_subst.c - copied unchanged from r366307, vendor/nvi/dist/ex/ex_subst.c vendor/nvi/2.2.0-05ed8b9/files/config.h.in - copied unchanged from r366307, vendor/nvi/dist/files/config.h.in vendor/nvi/2.2.0-05ed8b9/files/pathnames.h.in - copied unchanged from r366307, vendor/nvi/dist/files/pathnames.h.in vendor/nvi/2.2.0-05ed8b9/man/vi.1 - copied unchanged from r366307, vendor/nvi/dist/man/vi.1 vendor/nvi/2.2.0-05ed8b9/regex/engine.c - copied unchanged from r366307, vendor/nvi/dist/regex/engine.c vendor/nvi/2.2.0-05ed8b9/regex/regexec.c - copied unchanged from r366307, vendor/nvi/dist/regex/regexec.c vendor/nvi/2.2.0-05ed8b9/vi/v_itxt.c - copied unchanged from r366307, vendor/nvi/dist/vi/v_itxt.c vendor/nvi/2.2.0-05ed8b9/vi/v_paragraph.c - copied unchanged from r366307, vendor/nvi/dist/vi/v_paragraph.c vendor/nvi/2.2.0-05ed8b9/vi/v_section.c - copied unchanged from r366307, vendor/nvi/dist/vi/v_section.c vendor/nvi/2.2.0-05ed8b9/vi/v_sentence.c - copied unchanged from r366307, vendor/nvi/dist/vi/v_sentence.c vendor/nvi/2.2.0-05ed8b9/vi/v_txt.c - copied unchanged from r366307, vendor/nvi/dist/vi/v_txt.c vendor/nvi/2.2.0-05ed8b9/vi/vi.c - copied unchanged from r366307, vendor/nvi/dist/vi/vi.c vendor/nvi/2.2.0-05ed8b9/vi/vs_line.c - copied unchanged from r366307, vendor/nvi/dist/vi/vs_line.c vendor/nvi/2.2.0-05ed8b9/vi/vs_msg.c - copied unchanged from r366307, vendor/nvi/dist/vi/vs_msg.c vendor/nvi/2.2.0-05ed8b9/vi/vs_refresh.c - copied unchanged from r366307, vendor/nvi/dist/vi/vs_refresh.c vendor/nvi/2.2.0-05ed8b9/vi/vs_relative.c - copied unchanged from r366307, vendor/nvi/dist/vi/vs_relative.c vendor/nvi/2.2.0-05ed8b9/vi/vs_smap.c - copied unchanged from r366307, vendor/nvi/dist/vi/vs_smap.c Copied: vendor/nvi/2.2.0-05ed8b9/CMakeLists.txt (from r366307, vendor/nvi/dist/CMakeLists.txt) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/nvi/2.2.0-05ed8b9/CMakeLists.txt Thu Oct 1 04:26:46 2020 (r366308, copy of r366307, vendor/nvi/dist/CMakeLists.txt) @@ -0,0 +1,210 @@ +cmake_minimum_required(VERSION 3.9) + +get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(is_multi_config) + set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE STRING + "Semicolon separated list of supported configuration types") + mark_as_advanced(CMAKE_CONFIGURATION_TYPES) +elseif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C_FLAGS) + message(WARNING "No CMAKE_BUILD_TYPE is selected") +endif() + +project(nvi2 C) + +include(CheckIncludeFiles) +include(CheckFunctionExists) +include(CheckStructHasMember) +include(CheckCSourceCompiles) + +mark_as_advanced(CMAKE_INSTALL_PREFIX) + +option(USE_WIDECHAR "Enable wide character support" ON) +option(USE_ICONV "Enable iconv support" ON) + +add_compile_options(-fcolor-diagnostics) +add_compile_options($<$:-Wall>) +add_compile_options($<$:-Wno-parentheses>) +add_compile_options($<$:-Wno-uninitialized>) +add_compile_options($<$:-Wmissing-prototypes>) +add_compile_options($<$:-Wsystem-headers>) +add_compile_options($<$:-Wuninitialized>) +add_compile_options($<$:-Wno-dangling-else>) +add_compile_options(-Wstack-protector -fstack-protector) +add_compile_options(-Wstrict-aliasing -fstrict-aliasing) + +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +set(MAIN_PROTOS + cl/extern.h common/extern.h ex/extern.h vi/extern.h + common/options_def.h ex/ex_def.h ex/version.h) + +set(CL_SRCS + cl/cl_funcs.c cl/cl_main.c cl/cl_read.c cl/cl_screen.c cl/cl_term.c) + +set(COMMON_SRCS + common/conv.c common/cut.c common/delete.c common/encoding.c common/exf.c + common/key.c common/line.c common/log.c common/main.c common/mark.c + common/msg.c common/options.c common/options_f.c common/put.c + common/recover.c common/screen.c common/search.c common/seq.c + common/util.c) + +set(EX_SRCS + ex/ex.c ex/ex_abbrev.c ex/ex_append.c ex/ex_args.c ex/ex_argv.c ex/ex_at.c + ex/ex_bang.c ex/ex_cd.c ex/ex_cmd.c ex/ex_cscope.c ex/ex_delete.c + ex/ex_display.c ex/ex_edit.c ex/ex_equal.c ex/ex_file.c ex/ex_filter.c + ex/ex_global.c ex/ex_init.c ex/ex_join.c ex/ex_map.c ex/ex_mark.c + ex/ex_mkexrc.c ex/ex_move.c ex/ex_open.c ex/ex_preserve.c ex/ex_print.c + ex/ex_put.c ex/ex_quit.c ex/ex_read.c ex/ex_screen.c ex/ex_script.c + ex/ex_set.c ex/ex_shell.c ex/ex_shift.c ex/ex_source.c ex/ex_stop.c + ex/ex_subst.c ex/ex_tag.c ex/ex_txt.c ex/ex_undo.c ex/ex_usage.c + ex/ex_util.c ex/ex_version.c ex/ex_visual.c ex/ex_write.c ex/ex_yank.c + ex/ex_z.c) + +set(VI_SRCS + vi/getc.c vi/v_at.c vi/v_ch.c vi/v_cmd.c vi/v_delete.c vi/v_ex.c + vi/v_increment.c vi/v_init.c vi/v_itxt.c vi/v_left.c vi/v_mark.c + vi/v_match.c vi/v_paragraph.c vi/v_put.c vi/v_redraw.c vi/v_replace.c + vi/v_right.c vi/v_screen.c vi/v_scroll.c vi/v_search.c vi/v_section.c + vi/v_sentence.c vi/v_status.c vi/v_txt.c vi/v_ulcase.c vi/v_undo.c + vi/v_util.c vi/v_word.c vi/v_xchar.c vi/v_yank.c vi/v_z.c vi/v_zexit.c + vi/vi.c vi/vs_line.c vi/vs_msg.c vi/vs_refresh.c vi/vs_relative.c + vi/vs_smap.c vi/vs_split.c) + +set(REGEX_SRCS + regex/regcomp.c regex/regerror.c regex/regexec.c regex/regfree.c) + +# commands to generate the public headers +set(extract_protos sed -n 's/^ \\* PUBLIC: \\\(.*\\\)/\\1/p') +set(extract_version sed -n + 's/^.*version \\\([^\)]*\)\\\).*/\#define VI_VERSION \\\"\\1\\\"/p') + +add_custom_command(OUTPUT cl/extern.h + COMMAND ${extract_protos} ${CL_SRCS} > cl/extern.h + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDS ${CL_SRCS}) +add_custom_command(OUTPUT common/extern.h + COMMAND ${extract_protos} ${COMMON_SRCS} > common/extern.h + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDS ${COMMON_SRCS}) +add_custom_command(OUTPUT ex/extern.h + COMMAND ${extract_protos} ${EX_SRCS} > ex/extern.h + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDS ${EX_SRCS}) +add_custom_command(OUTPUT vi/extern.h + COMMAND ${extract_protos} ${VI_SRCS} > vi/extern.h + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDS ${VI_SRCS}) +add_custom_command(OUTPUT common/options_def.h + COMMAND awk -f common/options.awk + common/options.c > common/options_def.h + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDS common/options.c) +add_custom_command(OUTPUT ex/ex_def.h + COMMAND awk -f ex/ex.awk ex/ex_cmd.c > ex/ex_def.h + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDS ex/ex_cmd.c) +add_custom_command(OUTPUT ex/version.h + COMMAND ${extract_version} README > ex/version.h + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDS README) + +add_executable(nvi) +target_sources(nvi PRIVATE ${MAIN_PROTOS} ${CL_SRCS} ${COMMON_SRCS} + ${EX_SRCS} ${VI_SRCS}) +target_compile_definitions(nvi PRIVATE $<$:DEBUG> + $<$:COMLOG>) + +check_function_exists(openpty UTIL_IN_LIBC) +if(NOT UTIL_IN_LIBC) + find_library(UTIL_LIBRARY util) + target_link_libraries(nvi PRIVATE ${UTIL_LIBRARY}) +endif() + +check_function_exists(__b64_ntop RESOLV_IN_LIBC) +if(NOT RESOLV_IN_LIBC) + find_library(RESOLV_LIBRARY resolv) + target_link_libraries(nvi PRIVATE ${RESOLV_LIBRARY}) +endif() + +if(USE_WIDECHAR) + find_library(CURSES_LIBRARY NAMES ncursesw cursesw curses HINTS /usr/lib) + find_library(TERMINFO_LIBRARY NAMES tinfow terminfo HINTS /usr/lib) + + # link to the wchar_t awared BSD libregex.a + add_library(regex STATIC) + target_sources(regex PRIVATE ${REGEX_SRCS}) + target_include_directories(regex PUBLIC regex) + target_compile_definitions(regex PUBLIC __REGEX_PRIVATE) + target_link_libraries(nvi PRIVATE regex) +else() + find_library(CURSES_LIBRARY NAMES ncurses curses HINTS /usr/lib) + find_library(TERMINFO_LIBRARY NAMES tinfo terminfo HINTS /usr/lib) + target_compile_options(nvi PRIVATE -Wno-pointer-sign) +endif() + +target_link_libraries(nvi PRIVATE ${CURSES_LIBRARY} ${TERMINFO_LIBRARY}) + +if(USE_ICONV) + check_function_exists(iconv ICONV_IN_LIBC) + if(NOT ICONV_IN_LIBC) + find_path(ICONV_INCLUDE_DIR iconv.h) + find_library(ICONV_LIBRARY iconv) + endif() + + # detect the prototype of iconv(3) + set(CMAKE_C_FLAGS_BACKUP "${CMAKE_C_FLAGS}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") + set(CMAKE_REQUIRED_INCLUDES "${ICONV_INCLUDE_DIR}") + set(CMAKE_REQUIRED_LIBRARIES "${ICONV_LIBRARY}") + check_c_source_compiles(" + #include + int main() { + iconv_t conv = 0; + char* in = 0; + size_t ilen = 0; + char* out = 0; + size_t olen = 0; + iconv(conv, &in, &ilen, &out, &olen); + return 0; + } + " ICONV_TRADITIONAL) + set(CMAKE_REQUIRED_INCLUDES) + set(CMAKE_REQUIRED_LIBRARIES) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}") + + target_include_directories(nvi PRIVATE ${ICONV_INCLUDE_DIR}) + target_link_libraries(nvi PRIVATE ${ICONV_LIBRARY}) +endif() + +check_function_exists(getprogname GETPROGNAME_IN_LIBC) +check_function_exists(strlcpy STRLCPY_IN_LIBC) +if(NOT GETPROGNAME_IN_LIBC OR NOT STRLCPY_IN_LIBC) + find_package(PkgConfig REQUIRED) + pkg_check_modules(LIBBSD libbsd-overlay) + add_definitions(${LIBBSD_CFLAGS}) + target_link_libraries(nvi PRIVATE ${LIBBSD_LIBRARIES}) +endif() + +check_function_exists(dbopen DBOPEN_IN_LIBC) +if(NOT DBOPEN_IN_LIBC) + target_link_libraries(nvi PRIVATE db1) +endif() + +check_include_files(libutil.h HAVE_LIBUTIL_H) +check_include_files(ncurses.h HAVE_NCURSES_H) +check_include_files(ncursesw/ncurses.h HAVE_NCURSESW_NCURSES_H) +check_include_files(pty.h HAVE_PTY_H) +check_include_files(term.h HAVE_TERM_H) +check_struct_has_member("struct dirent" d_namlen dirent.h HAVE_DIRENT_D_NAMLEN LANGUAGE C) + +configure_file(files/config.h.in config.h) + +set(vi_cv_path_preserve /var/tmp/vi.recover/) +if(APPLE) + set(vi_cv_path_msgcat /usr/local/share/vi/catalog/) +else() + set(vi_cv_path_msgcat /usr/share/vi/catalog/) +endif() + +configure_file(files/pathnames.h.in pathnames.h) +configure_file(files/recover.in recover @ONLY) Copied: vendor/nvi/2.2.0-05ed8b9/catalog/dump.c (from r366307, vendor/nvi/dist/catalog/dump.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/nvi/2.2.0-05ed8b9/catalog/dump.c Thu Oct 1 04:26:46 2020 (r366308, copy of r366307, vendor/nvi/dist/catalog/dump.c) @@ -0,0 +1,97 @@ +/*- + * Copyright (c) 1992, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include + +static void +parse(FILE *fp) +{ + int ch, s1, s2, s3; + +#define TESTD(s) do { \ + if ((s = getc(fp)) == EOF) \ + return; \ + if (!isdigit(s)) \ + continue; \ +} while (0) +#define TESTP do { \ + if ((ch = getc(fp)) == EOF) \ + return; \ + if (ch != '|') \ + continue; \ +} while (0) +#define MOVEC(t) do { \ + do { \ + if ((ch = getc(fp)) == EOF) \ + return; \ + } while (ch != (t)); \ +} while (0) + for (;;) { + MOVEC('"'); + TESTD(s1); + TESTD(s2); + TESTD(s3); + TESTP; + putchar('"'); + putchar(s1); + putchar(s2); + putchar(s3); + putchar('|'); + for (;;) { /* dump to end quote. */ + if ((ch = getc(fp)) == EOF) + return; + putchar(ch); + if (ch == '"') + break; + if (ch == '\\') { + if ((ch = getc(fp)) == EOF) + return; + putchar(ch); + } + } + putchar('\n'); + } +} + +int +main(int argc, char *argv[]) +{ + FILE *fp; + + for (; *argv != NULL; ++argv) { + if ((fp = fopen(*argv, "r")) == NULL) { + perror(*argv); + return (1); + } + parse(fp); + (void)fclose(fp); + } + return (0); +} Copied: vendor/nvi/2.2.0-05ed8b9/cl/cl.h (from r366307, vendor/nvi/dist/cl/cl.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/nvi/2.2.0-05ed8b9/cl/cl.h Thu Oct 1 04:26:46 2020 (r366308, copy of r366307, vendor/nvi/dist/cl/cl.h) @@ -0,0 +1,83 @@ +/*- + * Copyright (c) 1993, 1994 + * The Regents of the University of California. All rights reserved. + * Copyright (c) 1993, 1994, 1995, 1996 + * Keith Bostic. All rights reserved. + * + * See the LICENSE file for redistribution information. + */ + +#ifdef USE_WIDECHAR +#define _XOPEN_SOURCE_EXTENDED +#endif +#ifdef HAVE_NCURSESW_NCURSES_H +#include +#elif defined HAVE_NCURSES_H +#include +#else +#include +#endif + +typedef struct _cl_private { + char ibuf[256]; /* Input keys. */ + + size_t skip; /* Remaining keys. */ + + CONVWIN cw; /* Conversion buffer. */ + + int eof_count; /* EOF count. */ + + struct termios orig; /* Original terminal values. */ + struct termios ex_enter;/* Terminal values to enter ex. */ + struct termios vi_enter;/* Terminal values to enter vi. */ + + char *el; /* Clear to EOL terminal string. */ + char *cup; /* Cursor movement terminal string. */ + char *cuu1; /* Cursor up terminal string. */ + char *rmso, *smso; /* Inverse video terminal strings. */ + char *smcup, *rmcup; /* Terminal start/stop strings. */ + + char *oname; /* Original screen window name. */ + + SCR *focus; /* Screen that has the "focus". */ + + int killersig; /* Killer signal. */ +#define INDX_HUP 0 +#define INDX_INT 1 +#define INDX_TERM 2 +#define INDX_WINCH 3 +#define INDX_MAX 4 /* Original signal information. */ + struct sigaction oact[INDX_MAX]; + + enum { /* Tty group write mode. */ + TGW_UNKNOWN=0, TGW_SET, TGW_UNSET } tgw; + + enum { /* Terminal initialization strings. */ + TE_SENT=0, TI_SENT } ti_te; + +#define CL_IN_EX 0x0001 /* Currently running ex. */ +#define CL_LAYOUT 0x0002 /* Screen layout changed. */ +#define CL_RENAME 0x0004 /* X11 xterm icon/window renamed. */ +#define CL_RENAME_OK 0x0008 /* User wants the windows renamed. */ +#define CL_SCR_EX_INIT 0x0010 /* Ex screen initialized. */ +#define CL_SCR_VI_INIT 0x0020 /* Vi screen initialized. */ +#define CL_SIGHUP 0x0040 /* SIGHUP arrived. */ +#define CL_SIGINT 0x0080 /* SIGINT arrived. */ +#define CL_SIGTERM 0x0100 /* SIGTERM arrived. */ +#define CL_SIGWINCH 0x0200 /* SIGWINCH arrived. */ +#define CL_STDIN_TTY 0x0400 /* Talking to a terminal. */ + u_int32_t flags; +} CL_PRIVATE; + +#define CLP(sp) ((CL_PRIVATE *)((sp)->gp->cl_private)) +#define GCLP(gp) ((CL_PRIVATE *)gp->cl_private) +#define CLSP(sp) ((WINDOW *)((sp)->cl_private)) + +/* Return possibilities from the keyboard read routine. */ +typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_INTR, INP_TIMEOUT } input_t; + +/* The screen position relative to a specific window. */ +#define RCNO(sp, cno) (cno) +#define RLNO(sp, lno) (lno) + +#include "extern.h" Copied: vendor/nvi/2.2.0-05ed8b9/cl/cl_read.c (from r366307, vendor/nvi/dist/cl/cl_read.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/nvi/2.2.0-05ed8b9/cl/cl_read.c Thu Oct 1 04:26:46 2020 (r366308, copy of r366307, vendor/nvi/dist/cl/cl_read.c) @@ -0,0 +1,327 @@ +/*- + * Copyright (c) 1993, 1994 + * The Regents of the University of California. All rights reserved. + * Copyright (c) 1993, 1994, 1995, 1996 + * Keith Bostic. All rights reserved. + * + * See the LICENSE file for redistribution information. + */ + +#include "config.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../common/common.h" +#include "../ex/script.h" +#include "cl.h" + +/* Pollution by Solaris curses. */ +#undef columns +#undef lines + +static input_t cl_read(SCR *, + u_int32_t, char *, size_t, int *, struct timeval *); +static int cl_resize(SCR *, size_t, size_t); + +/* + * cl_event -- + * Return a single event. + * + * PUBLIC: int cl_event(SCR *, EVENT *, u_int32_t, int); + */ +int +cl_event(SCR *sp, EVENT *evp, u_int32_t flags, int ms) +{ + struct timeval t, *tp; + CL_PRIVATE *clp; + size_t lines, columns; + int changed, nr = 0; + CHAR_T *wp; + size_t wlen; + int rc; + + /* + * Queue signal based events. We never clear SIGHUP or SIGTERM events, + * so that we just keep returning them until the editor dies. + */ + clp = CLP(sp); +retest: if (LF_ISSET(EC_INTERRUPT) || F_ISSET(clp, CL_SIGINT)) { + if (F_ISSET(clp, CL_SIGINT)) { + F_CLR(clp, CL_SIGINT); + evp->e_event = E_INTERRUPT; + } else + evp->e_event = E_TIMEOUT; + return (0); + } + if (F_ISSET(clp, CL_SIGHUP | CL_SIGTERM | CL_SIGWINCH)) { + if (F_ISSET(clp, CL_SIGHUP)) { + evp->e_event = E_SIGHUP; + return (0); + } + if (F_ISSET(clp, CL_SIGTERM)) { + evp->e_event = E_SIGTERM; + return (0); + } + if (F_ISSET(clp, CL_SIGWINCH)) { + F_CLR(clp, CL_SIGWINCH); + if (cl_ssize(sp, 1, &lines, &columns, &changed)) + return (1); + if (changed) { + (void)cl_resize(sp, lines, columns); + evp->e_event = E_WRESIZE; + return (0); + } + /* No real change, ignore the signal. */ + } + } + + /* Set timer. */ + if (ms == 0) + tp = NULL; + else { + t.tv_sec = ms / 1000; + t.tv_usec = (ms % 1000) * 1000; + tp = &t; + } + + /* Read input characters. */ +read: + switch (cl_read(sp, LF_ISSET(EC_QUOTED | EC_RAW), + clp->ibuf + clp->skip, SIZE(clp->ibuf) - clp->skip, &nr, tp)) { + case INP_OK: + rc = INPUT2INT5(sp, clp->cw, clp->ibuf, nr + clp->skip, + wp, wlen); + evp->e_csp = wp; + evp->e_len = wlen; + evp->e_event = E_STRING; + if (rc < 0) { + int n = -rc; + memmove(clp->ibuf, clp->ibuf + nr + clp->skip - n, n); + clp->skip = n; + if (wlen == 0) + goto read; + } else if (rc == 0) + clp->skip = 0; + else + msgq(sp, M_ERR, "323|Invalid input. Truncated."); + break; + case INP_EOF: + evp->e_event = E_EOF; + break; + case INP_ERR: + evp->e_event = E_ERR; + break; + case INP_INTR: + goto retest; + case INP_TIMEOUT: + evp->e_event = E_TIMEOUT; + break; + default: + abort(); + } + return (0); +} + +/* + * cl_read -- + * Read characters from the input. + */ +static input_t +cl_read(SCR *sp, u_int32_t flags, char *bp, size_t blen, int *nrp, + struct timeval *tp) +{ + struct termios term1, term2; + CL_PRIVATE *clp; + GS *gp; + fd_set rdfd; + input_t rval; + int maxfd, nr, term_reset; + + gp = sp->gp; + clp = CLP(sp); + term_reset = 0; + + /* + * 1: A read from a file or a pipe. In this case, the reads + * never timeout regardless. This means that we can hang + * when trying to complete a map, but we're going to hang + * on the next read anyway. + */ + if (!F_ISSET(clp, CL_STDIN_TTY)) { + switch (nr = read(STDIN_FILENO, bp, blen)) { + case 0: + return (INP_EOF); + case -1: + goto err; + default: + *nrp = nr; + return (INP_OK); + } + /* NOTREACHED */ + } + + /* + * 2: A read with an associated timeout, e.g., trying to complete + * a map sequence. If input exists, we fall into #3. + */ + if (tp != NULL) { + FD_ZERO(&rdfd); + FD_SET(STDIN_FILENO, &rdfd); + switch (select(STDIN_FILENO + 1, &rdfd, NULL, NULL, tp)) { + case 0: + return (INP_TIMEOUT); + case -1: + goto err; + default: + break; + } + } + + /* + * The user can enter a key in the editor to quote a character. If we + * get here and the next key is supposed to be quoted, do what we can. + * Reset the tty so that the user can enter a ^C, ^Q, ^S. There's an + * obvious race here, when the key has already been entered, but there's + * nothing that we can do to fix that problem. + * + * The editor can ask for the next literal character even thought it's + * generally running in line-at-a-time mode. Do what we can. + */ + if (LF_ISSET(EC_QUOTED | EC_RAW) && !tcgetattr(STDIN_FILENO, &term1)) { + term_reset = 1; + if (LF_ISSET(EC_QUOTED)) { + term2 = term1; + term2.c_lflag &= ~ISIG; + term2.c_iflag &= ~(IXON | IXOFF); + (void)tcsetattr(STDIN_FILENO, + TCSASOFT | TCSADRAIN, &term2); + } else + (void)tcsetattr(STDIN_FILENO, + TCSASOFT | TCSADRAIN, &clp->vi_enter); + } + + /* + * 3: Wait for input. + * + * Select on the command input and scripting window file descriptors. + * It's ugly that we wait on scripting file descriptors here, but it's + * the only way to keep from locking out scripting windows. + */ + if (F_ISSET(gp, G_SCRWIN)) { +loop: FD_ZERO(&rdfd); + FD_SET(STDIN_FILENO, &rdfd); + maxfd = STDIN_FILENO; + if (F_ISSET(sp, SC_SCRIPT)) { + FD_SET(sp->script->sh_master, &rdfd); + if (sp->script->sh_master > maxfd) + maxfd = sp->script->sh_master; + } + switch (select(maxfd + 1, &rdfd, NULL, NULL, NULL)) { + case 0: + abort(); + case -1: + goto err; + default: + break; + } + if (!FD_ISSET(STDIN_FILENO, &rdfd)) { + if (sscr_input(sp)) + return (INP_ERR); + goto loop; + } + } + + /* + * 4: Read the input. + * + * !!! + * What's going on here is some scary stuff. Ex runs the terminal in + * canonical mode. So, the character terminating a line of + * input is returned in the buffer, but a trailing character is + * not similarly included. As ex uses 0 and ^ as autoindent + * commands, it has to see the trailing characters to determine + * the difference between the user entering "0ab" and "0ab". We + * leave an extra slot in the buffer, so that we can add a trailing + * character if the buffer isn't terminated by a . We + * lose if the buffer is too small for the line and exactly N characters + * are entered followed by an character. + */ +#define ONE_FOR_EOF 1 + switch (nr = read(STDIN_FILENO, bp, blen - ONE_FOR_EOF)) { + case 0: /* EOF. */ + /* + * ^D in canonical mode returns a read of 0, i.e. EOF. EOF is + * a valid command, but we don't want to loop forever because + * the terminal driver is returning EOF because the user has + * disconnected. The editor will almost certainly try to write + * something before this fires, which should kill us, but You + * Never Know. + */ + if (++clp->eof_count < 50) { + bp[0] = clp->orig.c_cc[VEOF]; + *nrp = 1; + rval = INP_OK; + + } else + rval = INP_EOF; + break; + case -1: /* Error or interrupt. */ +err: if (errno == EINTR) + rval = INP_INTR; + else { + rval = INP_ERR; + msgq(sp, M_SYSERR, "input"); + } + break; + default: /* Input characters. */ + if (F_ISSET(sp, SC_EX) && bp[nr - 1] != '\n') + bp[nr++] = clp->orig.c_cc[VEOF]; + *nrp = nr; + clp->eof_count = 0; + rval = INP_OK; + break; + } + + /* Restore the terminal state if it was modified. */ + if (term_reset) + (void)tcsetattr(STDIN_FILENO, TCSASOFT | TCSADRAIN, &term1); + return (rval); +} + +/* + * cl_resize -- + * Reset the options for a resize event. + */ +static int +cl_resize(SCR *sp, size_t lines, size_t columns) +{ + ARGS *argv[2], a, b; + CHAR_T b1[1024]; + + a.bp = b1; + b.bp = NULL; + a.len = b.len = 0; + argv[0] = &a; + argv[1] = &b; + + a.len = SPRINTF(b1, sizeof(b1), L("lines=%lu"), (u_long)lines); + if (opts_set(sp, argv, NULL)) + return (1); + a.len = SPRINTF(b1, sizeof(b1), L("columns=%lu"), (u_long)columns); + if (opts_set(sp, argv, NULL)) + return (1); + return (0); +} Copied: vendor/nvi/2.2.0-05ed8b9/cl/cl_term.c (from r366307, vendor/nvi/dist/cl/cl_term.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/nvi/2.2.0-05ed8b9/cl/cl_term.c Thu Oct 1 04:26:46 2020 (r366308, copy of r366307, vendor/nvi/dist/cl/cl_term.c) @@ -0,0 +1,492 @@ +/*- + * Copyright (c) 1993, 1994 + * The Regents of the University of California. All rights reserved. + * Copyright (c) 1993, 1994, 1995, 1996 + * Keith Bostic. All rights reserved. + * + * See the LICENSE file for redistribution information. + */ + +#include "config.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_TERM_H +#include +#endif +#include +#include + +#include "../common/common.h" +#include "cl.h" + +static int cl_pfmap(SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t); +static size_t atoz_or(const char *, size_t); + +/* + * XXX + * THIS REQUIRES THAT ALL SCREENS SHARE A TERMINAL TYPE. + */ +typedef struct _tklist { + char *ts; /* Key's termcap string. */ + char *output; /* Corresponding vi command. */ + char *name; /* Name. */ + u_char value; /* Special value (for lookup). */ +} TKLIST; +static TKLIST const c_tklist[] = { /* Command mappings. */ + {"kil1", "O", "insert line"}, + {"kdch1", "x", "delete character"}, + {"kcud1", "j", "cursor down"}, + {"kel", "D", "delete to eol"}, + {"kind", "\004", "scroll down"}, /* ^D */ + {"kll", "$", "go to eol"}, + {"kend", "$", "go to eol"}, + {"khome", "^", "go to sol"}, + {"kich1", "i", "insert at cursor"}, + {"kdl1", "dd", "delete line"}, + {"kcub1", "h", "cursor left"}, + {"knp", "\006", "page down"}, /* ^F */ + {"kpp", "\002", "page up"}, /* ^B */ + {"kri", "\025", "scroll up"}, /* ^U */ + {"ked", "dG", "delete to end of screen"}, + {"kcuf1", "l", "cursor right"}, + {"kcuu1", "k", "cursor up"}, + {NULL}, +}; +static TKLIST const m1_tklist[] = { /* Input mappings (lookup). */ + {NULL}, +}; +static TKLIST const m2_tklist[] = { /* Input mappings (set or delete). */ + {"kcud1", "\033ja", "cursor down"}, /* ^[ja */ + {"kcub1", "\033ha", "cursor left"}, /* ^[ha */ + {"kcuu1", "\033ka", "cursor up"}, /* ^[ka */ + {"kcuf1", "\033la", "cursor right"}, /* ^[la */ + {NULL}, +}; + +/* + * cl_term_init -- + * Initialize the special keys defined by the termcap/terminfo entry. + * + * PUBLIC: int cl_term_init(SCR *); + */ +int +cl_term_init(SCR *sp) +{ + KEYLIST *kp; + SEQ *qp; + TKLIST const *tkp; + char *t; + CHAR_T name[60]; + CHAR_T output[5]; + CHAR_T ts[20]; + CHAR_T *wp; + size_t wlen; + + /* Command mappings. */ + for (tkp = c_tklist; tkp->name != NULL; ++tkp) { + if ((t = tigetstr(tkp->ts)) == NULL || t == (char *)-1) + continue; + CHAR2INT(sp, tkp->name, strlen(tkp->name), wp, wlen); + MEMCPY(name, wp, wlen); + CHAR2INT(sp, t, strlen(t), wp, wlen); + MEMCPY(ts, wp, wlen); + CHAR2INT(sp, tkp->output, strlen(tkp->output), wp, wlen); + MEMCPY(output, wp, wlen); + if (seq_set(sp, name, strlen(tkp->name), ts, strlen(t), + output, strlen(tkp->output), SEQ_COMMAND, + SEQ_NOOVERWRITE | SEQ_SCREEN)) + return (1); + } + + /* Input mappings needing to be looked up. */ + for (tkp = m1_tklist; tkp->name != NULL; ++tkp) { + if ((t = tigetstr(tkp->ts)) == NULL || t == (char *)-1) + continue; + for (kp = keylist;; ++kp) + if (kp->value == tkp->value) + break; + if (kp == NULL) + continue; + CHAR2INT(sp, tkp->name, strlen(tkp->name), wp, wlen); + MEMCPY(name, wp, wlen); + CHAR2INT(sp, t, strlen(t), wp, wlen); + MEMCPY(ts, wp, wlen); + output[0] = (UCHAR_T)kp->ch; + if (seq_set(sp, name, strlen(tkp->name), ts, strlen(t), + output, 1, SEQ_INPUT, SEQ_NOOVERWRITE | SEQ_SCREEN)) + return (1); + } + + /* Input mappings that are already set or are text deletions. */ + for (tkp = m2_tklist; tkp->name != NULL; ++tkp) { + if ((t = tigetstr(tkp->ts)) == NULL || t == (char *)-1) + continue; + /* + * !!! + * Some terminals' keys send single + * characters. This is okay in command mapping, but not okay + * in input mapping. That combination is the only one we'll + * ever see, hopefully, so kluge it here for now. + */ + if (!strcmp(t, "\b")) + continue; + if (tkp->output == NULL) { + CHAR2INT(sp, tkp->name, strlen(tkp->name), wp, wlen); + MEMCPY(name, wp, wlen); + CHAR2INT(sp, t, strlen(t), wp, wlen); + MEMCPY(ts, wp, wlen); + if (seq_set(sp, name, strlen(tkp->name), + ts, strlen(t), NULL, 0, + SEQ_INPUT, SEQ_NOOVERWRITE | SEQ_SCREEN)) + return (1); + } else { + CHAR2INT(sp, tkp->name, strlen(tkp->name), wp, wlen); + MEMCPY(name, wp, wlen); + CHAR2INT(sp, t, strlen(t), wp, wlen); + MEMCPY(ts, wp, wlen); + CHAR2INT(sp, tkp->output, strlen(tkp->output), wp, wlen); + MEMCPY(output, wp, wlen); + if (seq_set(sp, name, strlen(tkp->name), + ts, strlen(t), output, strlen(tkp->output), + SEQ_INPUT, SEQ_NOOVERWRITE | SEQ_SCREEN)) + return (1); + } + } + + /* + * Rework any function key mappings that were set before the + * screen was initialized. + */ + SLIST_FOREACH(qp, sp->gp->seqq, q) + if (F_ISSET(qp, SEQ_FUNCMAP)) + (void)cl_pfmap(sp, qp->stype, + qp->input, qp->ilen, qp->output, qp->olen); + return (0); +} + +/* + * cl_term_end -- + * End the special keys defined by the termcap/terminfo entry. + * + * PUBLIC: int cl_term_end(GS *); + */ +int +cl_term_end(GS *gp) +{ + SEQ *qp, *nqp, *pre_qp = NULL; + + /* Delete screen specific mappings. */ + SLIST_FOREACH_SAFE(qp, gp->seqq, q, nqp) + if (F_ISSET(qp, SEQ_SCREEN)) { + if (qp == SLIST_FIRST(gp->seqq)) + SLIST_REMOVE_HEAD(gp->seqq, q); + else + SLIST_REMOVE_AFTER(pre_qp, q); + (void)seq_free(qp); + } else + pre_qp = qp; + return (0); +} + +/* + * cl_fmap -- + * Map a function key. + * + * PUBLIC: int cl_fmap(SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t); + */ +int +cl_fmap(SCR *sp, seq_t stype, CHAR_T *from, size_t flen, CHAR_T *to, size_t tlen) +{ + /* Ignore until the screen is running, do the real work then. */ + if (F_ISSET(sp, SC_VI) && !F_ISSET(sp, SC_SCR_VI)) + return (0); + if (F_ISSET(sp, SC_EX) && !F_ISSET(sp, SC_SCR_EX)) + return (0); + + return (cl_pfmap(sp, stype, from, flen, to, tlen)); +} + +/* + * cl_pfmap -- + * Map a function key (private version). + */ +static int +cl_pfmap(SCR *sp, seq_t stype, CHAR_T *from, size_t flen, CHAR_T *to, size_t tlen) +{ + size_t nlen; + char *p; + char name[64]; + CHAR_T keyname[64]; + CHAR_T ts[20]; + CHAR_T *wp; + size_t wlen; + + (void)snprintf(name, sizeof(name), "kf%d", + (int)STRTOL(from+1,NULL,10)); + if ((p = tigetstr(name)) == NULL || + p == (char *)-1 || strlen(p) == 0) + p = NULL; + if (p == NULL) { + msgq_wstr(sp, M_ERR, from, "233|This terminal has no %s key"); + return (1); + } + + nlen = SPRINTF(keyname, + SIZE(keyname), L("function key %d"), + (int)STRTOL(from+1,NULL,10)); + CHAR2INT(sp, p, strlen(p), wp, wlen); + MEMCPY(ts, wp, wlen); + return (seq_set(sp, keyname, nlen, + ts, strlen(p), to, tlen, stype, SEQ_NOOVERWRITE | SEQ_SCREEN)); +} + +/* + * cl_optchange -- + * Curses screen specific "option changed" routine. + * + * PUBLIC: int cl_optchange(SCR *, int, char *, u_long *); + */ +int +cl_optchange(SCR *sp, int opt, char *str, u_long *valp) +{ + CL_PRIVATE *clp; + + clp = CLP(sp); + + switch (opt) { + case O_TERM: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Thu Oct 1 15:40:26 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6DE7C42BA0B; Thu, 1 Oct 2020 15:40:26 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C2HQ22F0lz4HP9; Thu, 1 Oct 2020 15:40:26 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3088B12BF4; Thu, 1 Oct 2020 15:40:26 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 091FeQ4V093088; Thu, 1 Oct 2020 15:40:26 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 091FePrQ093083; Thu, 1 Oct 2020 15:40:25 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010011540.091FePrQ093083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Thu, 1 Oct 2020 15:40:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r366316 - in vendor/bc/dist: . include src X-SVN-Group: vendor X-SVN-Commit-Author: se X-SVN-Commit-Paths: in vendor/bc/dist: . include src X-SVN-Commit-Revision: 366316 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2020 15:40:26 -0000 Author: se Date: Thu Oct 1 15:40:24 2020 New Revision: 366316 URL: https://svnweb.freebsd.org/changeset/base/366316 Log: Update to version 3.1.6 Modified: vendor/bc/dist/Makefile.in vendor/bc/dist/NEWS.md vendor/bc/dist/include/bc.h vendor/bc/dist/release.sh vendor/bc/dist/src/data.c vendor/bc/dist/src/num.c Modified: vendor/bc/dist/Makefile.in ============================================================================== --- vendor/bc/dist/Makefile.in Thu Oct 1 15:04:55 2020 (r366315) +++ vendor/bc/dist/Makefile.in Thu Oct 1 15:40:24 2020 (r366316) @@ -29,7 +29,7 @@ # .POSIX: -VERSION = 3.1.5 +VERSION = 3.1.6 SRC = %%SRC%% OBJ = %%OBJ%% Modified: vendor/bc/dist/NEWS.md ============================================================================== --- vendor/bc/dist/NEWS.md Thu Oct 1 15:04:55 2020 (r366315) +++ vendor/bc/dist/NEWS.md Thu Oct 1 15:40:24 2020 (r366316) @@ -1,5 +1,13 @@ # News +## 3.1.6 + +This is a production release that fixes a new warning from Clang 12 for FreeBSD +and also removes some possible undefined behavior found by UBSan that compilers +did not seem to take advantage of. + +Users do ***NOT*** need to upgrade, if they do not want to. + ## 3.1.5 This is a production release that fixes the Chinese locales (which caused `bc` Modified: vendor/bc/dist/include/bc.h ============================================================================== --- vendor/bc/dist/include/bc.h Thu Oct 1 15:04:55 2020 (r366315) +++ vendor/bc/dist/include/bc.h Thu Oct 1 15:40:24 2020 (r366316) @@ -173,6 +173,10 @@ extern const BcParseNext bc_parse_next_elem; extern const BcParseNext bc_parse_next_for; extern const BcParseNext bc_parse_next_read; +#else // BC_ENABLED + +#define BC_PARSE_NO_EXEC(p) (0) + #endif // BC_ENABLED #endif // BC_BC_H Modified: vendor/bc/dist/release.sh ============================================================================== --- vendor/bc/dist/release.sh Thu Oct 1 15:04:55 2020 (r366315) +++ vendor/bc/dist/release.sh Thu Oct 1 15:40:24 2020 (r366316) @@ -383,6 +383,7 @@ build_set() { clang_flags="-Weverything -Wno-padded -Wno-switch-enum -Wno-format-nonliteral" clang_flags="$clang_flags -Wno-cast-align -Wno-missing-noreturn -Wno-disabled-macro-expansion" clang_flags="$clang_flags -Wno-unreachable-code -Wno-unreachable-code-return" +clang_flags="$clang_flags -Wno-implicit-fallthrough" gcc_flags="-Wno-maybe-uninitialized -Wno-clobbered" cflags="-Wall -Wextra -Werror -pedantic -Wno-conditional-uninitialized" Modified: vendor/bc/dist/src/data.c ============================================================================== --- vendor/bc/dist/src/data.c Thu Oct 1 15:04:55 2020 (r366315) +++ vendor/bc/dist/src/data.c Thu Oct 1 15:40:24 2020 (r366316) @@ -141,8 +141,8 @@ const char* const bc_err_msgs[] = { "empty expression", "bad print statement", "bad function definition", - "bad assignment: left side must be scale, ibase, " - "obase, seed, last, var, or array element", + ("bad assignment: left side must be scale, ibase, " + "obase, seed, last, var, or array element"), "no auto variable found", "function parameter or auto \"%s%s\" already exists", "block end cannot be found", Modified: vendor/bc/dist/src/num.c ============================================================================== --- vendor/bc/dist/src/num.c Thu Oct 1 15:04:55 2020 (r366315) +++ vendor/bc/dist/src/num.c Thu Oct 1 15:40:24 2020 (r366316) @@ -1457,7 +1457,8 @@ static void bc_num_parseDecimal(BcNum *restrict n, con for (i = 0; i < len && (zero = (val[i] == '0' || val[i] == '.')); ++i); - n->scale = (size_t) (rdx * ((val + len) - (ptr + 1))); + n->scale = (size_t) (rdx * (((uintptr_t) (val + len)) - + (((uintptr_t) ptr) + 1))); n->rdx = BC_NUM_RDX(n->scale); i = len - (ptr == val ? 0 : i) - rdx; @@ -1656,7 +1657,7 @@ static void bc_num_printDecimal(const BcNum *restrict memset(buffer, 0, BC_BASE_DIGS * sizeof(size_t)); for (j = 0; n9 && j < BC_BASE_DIGS; ++j) { - buffer[j] = n9 % BC_BASE; + buffer[j] = ((size_t) n9) % BC_BASE; n9 /= BC_BASE; } From owner-svn-src-vendor@freebsd.org Thu Oct 1 15:41:33 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6839B42BD05; Thu, 1 Oct 2020 15:41:33 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C2HRK2CkZz4Hb0; Thu, 1 Oct 2020 15:41:33 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 163DA12FBF; Thu, 1 Oct 2020 15:41:33 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 091FfW1p097092; Thu, 1 Oct 2020 15:41:32 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 091FfWVt097091; Thu, 1 Oct 2020 15:41:32 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010011541.091FfWVt097091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Thu, 1 Oct 2020 15:41:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r366317 - vendor/bc/3.1.6 X-SVN-Group: vendor X-SVN-Commit-Author: se X-SVN-Commit-Paths: vendor/bc/3.1.6 X-SVN-Commit-Revision: 366317 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2020 15:41:33 -0000 Author: se Date: Thu Oct 1 15:41:32 2020 New Revision: 366317 URL: https://svnweb.freebsd.org/changeset/base/366317 Log: Tag version 3.1.6 Added: vendor/bc/3.1.6/ - copied from r366316, vendor/bc/dist/ From owner-svn-src-vendor@freebsd.org Thu Oct 1 17:48:18 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF26042EF33; Thu, 1 Oct 2020 17:48:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C2LFZ6MFMz4S4d; Thu, 1 Oct 2020 17:48:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD4371494E; Thu, 1 Oct 2020 17:48:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 091HmI5H074025; Thu, 1 Oct 2020 17:48:18 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 091HmFdE074010; Thu, 1 Oct 2020 17:48:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202010011748.091HmFdE074010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Oct 2020 17:48:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r366333 - in vendor/llvm-project/release-11.x: lld/docs llvm/include/llvm-c llvm/include/llvm/ADT llvm/lib/CodeGen llvm/lib/CodeGen/AsmPrinter llvm/lib/CodeGen/GlobalISel llvm/lib/CodeG... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm-project/release-11.x: lld/docs llvm/include/llvm-c llvm/include/llvm/ADT llvm/lib/CodeGen llvm/lib/CodeGen/AsmPrinter llvm/lib/CodeGen/GlobalISel llvm/lib/CodeGen/SelectionDAG llvm/lib/... X-SVN-Commit-Revision: 366333 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2020 17:48:19 -0000 Author: dim Date: Thu Oct 1 17:48:15 2020 New Revision: 366333 URL: https://svnweb.freebsd.org/changeset/base/366333 Log: Vendor import of llvm-project branch release/11.x llvmorg-11.0.0-rc5-0-g60a25202a7d. Modified: vendor/llvm-project/release-11.x/lld/docs/ReleaseNotes.rst vendor/llvm-project/release-11.x/llvm/include/llvm-c/Core.h vendor/llvm-project/release-11.x/llvm/include/llvm/ADT/SmallPtrSet.h vendor/llvm-project/release-11.x/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm-project/release-11.x/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp vendor/llvm-project/release-11.x/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp vendor/llvm-project/release-11.x/llvm/lib/CodeGen/PHIEliminationUtils.cpp vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm-project/release-11.x/llvm/lib/IR/Core.cpp vendor/llvm-project/release-11.x/llvm/lib/IR/Globals.cpp vendor/llvm-project/release-11.x/llvm/lib/Support/APFloat.cpp vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp vendor/llvm-project/release-11.x/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp Modified: vendor/llvm-project/release-11.x/lld/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm-project/release-11.x/lld/docs/ReleaseNotes.rst Thu Oct 1 17:30:38 2020 (r366332) +++ vendor/llvm-project/release-11.x/lld/docs/ReleaseNotes.rst Thu Oct 1 17:48:15 2020 (r366333) @@ -5,11 +5,6 @@ lld 11.0.0 Release Notes .. contents:: :local: -.. warning:: - These are in-progress notes for the upcoming LLVM 11.0.0 release. - Release notes for previous releases can be found on - `the Download Page `_. - Introduction ============ @@ -176,12 +171,3 @@ MinGW Improvements ``--disable-runtime-pseudo-reloc``), the ``--no-seh`` flag and options for selecting file and section alignment (``--file-alignment`` and ``--section-alignment``). - -MachO Improvements ------------------- - -* Item 1. - -WebAssembly Improvements ------------------------- - Modified: vendor/llvm-project/release-11.x/llvm/include/llvm-c/Core.h ============================================================================== --- vendor/llvm-project/release-11.x/llvm/include/llvm-c/Core.h Thu Oct 1 17:30:38 2020 (r366332) +++ vendor/llvm-project/release-11.x/llvm/include/llvm-c/Core.h Thu Oct 1 17:48:15 2020 (r366333) @@ -3636,7 +3636,7 @@ void LLVMAddDestination(LLVMValueRef IndirectBr, LLVMB /* Get the number of clauses on the landingpad instruction */ unsigned LLVMGetNumClauses(LLVMValueRef LandingPad); -/* Get the value of the clause at idnex Idx on the landingpad instruction */ +/* Get the value of the clause at index Idx on the landingpad instruction */ LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned Idx); /* Add a catch or filter clause to the landingpad instruction */ @@ -3936,6 +3936,26 @@ LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering, LLVMBool SingleThread); + +/** + * Get the number of elements in the mask of a ShuffleVector instruction. + */ +unsigned LLVMGetNumMaskElements(LLVMValueRef ShuffleVectorInst); + +/** + * \returns a constant that specifies that the result of a \c ShuffleVectorInst + * is undefined. + */ +int LLVMGetUndefMaskElem(void); + +/** + * Get the mask value at position Elt in the mask of a ShuffleVector + * instruction. + * + * \Returns the result of \c LLVMGetUndefMaskElem() if the mask value is undef + * at that position. + */ +int LLVMGetMaskValue(LLVMValueRef ShuffleVectorInst, unsigned Elt); LLVMBool LLVMIsAtomicSingleThread(LLVMValueRef AtomicInst); void LLVMSetAtomicSingleThread(LLVMValueRef AtomicInst, LLVMBool SingleThread); Modified: vendor/llvm-project/release-11.x/llvm/include/llvm/ADT/SmallPtrSet.h ============================================================================== --- vendor/llvm-project/release-11.x/llvm/include/llvm/ADT/SmallPtrSet.h Thu Oct 1 17:30:38 2020 (r366332) +++ vendor/llvm-project/release-11.x/llvm/include/llvm/ADT/SmallPtrSet.h Thu Oct 1 17:48:15 2020 (r366333) @@ -378,6 +378,9 @@ class SmallPtrSetImpl : public SmallPtrSetImplBase { ( iterator find(ConstPtrType Ptr) const { return makeIterator(find_imp(ConstPtrTraits::getAsVoidPointer(Ptr))); } + bool contains(ConstPtrType Ptr) const { + return find_imp(ConstPtrTraits::getAsVoidPointer(Ptr)) != EndPointer(); + } template void insert(IterT I, IterT E) { Modified: vendor/llvm-project/release-11.x/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Thu Oct 1 17:30:38 2020 (r366332) +++ vendor/llvm-project/release-11.x/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Thu Oct 1 17:48:15 2020 (r366333) @@ -2779,7 +2779,7 @@ static void emitGlobalConstantImpl(const DataLayout &D if (const ConstantInt *CI = dyn_cast(CV)) { const uint64_t StoreSize = DL.getTypeStoreSize(CV->getType()); - if (StoreSize < 8) { + if (StoreSize <= 8) { if (AP.isVerbose()) AP.OutStreamer->GetCommentOS() << format("0x%" PRIx64 "\n", CI->getZExtValue()); Modified: vendor/llvm-project/release-11.x/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp Thu Oct 1 17:30:38 2020 (r366332) +++ vendor/llvm-project/release-11.x/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp Thu Oct 1 17:48:15 2020 (r366333) @@ -375,13 +375,15 @@ bool CallLowering::handleAssignments(CCState &CCInfo, << "Load/store a split arg to/from the stack not implemented yet"); return false; } - MVT VT = MVT::getVT(Args[i].Ty); - unsigned Size = VT == MVT::iPTR ? DL.getPointerSize() - : alignTo(VT.getSizeInBits(), 8) / 8; + + EVT LocVT = VA.getValVT(); + unsigned MemSize = LocVT == MVT::iPTR ? DL.getPointerSize() + : LocVT.getStoreSize(); + unsigned Offset = VA.getLocMemOffset(); MachinePointerInfo MPO; - Register StackAddr = Handler.getStackAddress(Size, Offset, MPO); - Handler.assignValueToAddress(Args[i], StackAddr, Size, MPO, VA); + Register StackAddr = Handler.getStackAddress(MemSize, Offset, MPO); + Handler.assignValueToAddress(Args[i], StackAddr, MemSize, MPO, VA); } else { // FIXME: Support byvals and other weirdness return false; Modified: vendor/llvm-project/release-11.x/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp Thu Oct 1 17:30:38 2020 (r366332) +++ vendor/llvm-project/release-11.x/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp Thu Oct 1 17:48:15 2020 (r366333) @@ -2368,10 +2368,11 @@ LegalizerHelper::lower(MachineInstr &MI, unsigned Type MI.RemoveOperand(1); Observer.changedInstr(MI); - MIRBuilder.setInsertPt(MIRBuilder.getMBB(), ++MIRBuilder.getInsertPt()); - auto HiPart = MIRBuilder.buildInstr(Opcode, {Ty}, {LHS, RHS}); auto Zero = MIRBuilder.buildConstant(Ty, 0); + + // Move insert point forward so we can use the Res register if needed. + MIRBuilder.setInsertPt(MIRBuilder.getMBB(), ++MIRBuilder.getInsertPt()); // For *signed* multiply, overflow is detected by checking: // (hi != (lo >> bitwidth-1)) Modified: vendor/llvm-project/release-11.x/llvm/lib/CodeGen/PHIEliminationUtils.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/CodeGen/PHIEliminationUtils.cpp Thu Oct 1 17:30:38 2020 (r366332) +++ vendor/llvm-project/release-11.x/llvm/lib/CodeGen/PHIEliminationUtils.cpp Thu Oct 1 17:48:15 2020 (r366333) @@ -27,31 +27,35 @@ llvm::findPHICopyInsertPoint(MachineBasicBlock* MBB, M // Usually, we just want to insert the copy before the first terminator // instruction. However, for the edge going to a landing pad, we must insert // the copy before the call/invoke instruction. Similarly for an INLINEASM_BR - // going to an indirect target. - if (!SuccMBB->isEHPad() && !SuccMBB->isInlineAsmBrIndirectTarget()) + // going to an indirect target. This is similar to SplitKit.cpp's + // computeLastInsertPoint, and similarly assumes that there cannot be multiple + // instructions that are Calls with EHPad successors or INLINEASM_BR in a + // block. + bool EHPadSuccessor = SuccMBB->isEHPad(); + if (!EHPadSuccessor && !SuccMBB->isInlineAsmBrIndirectTarget()) return MBB->getFirstTerminator(); - // Discover any defs/uses in this basic block. - SmallPtrSet DefUsesInMBB; + // Discover any defs in this basic block. + SmallPtrSet DefsInMBB; MachineRegisterInfo& MRI = MBB->getParent()->getRegInfo(); - for (MachineInstr &RI : MRI.reg_instructions(SrcReg)) { + for (MachineInstr &RI : MRI.def_instructions(SrcReg)) if (RI.getParent() == MBB) - DefUsesInMBB.insert(&RI); - } + DefsInMBB.insert(&RI); - MachineBasicBlock::iterator InsertPoint; - if (DefUsesInMBB.empty()) { - // No defs. Insert the copy at the start of the basic block. - InsertPoint = MBB->begin(); - } else if (DefUsesInMBB.size() == 1) { - // Insert the copy immediately after the def/use. - InsertPoint = *DefUsesInMBB.begin(); - ++InsertPoint; - } else { - // Insert the copy immediately after the last def/use. - InsertPoint = MBB->end(); - while (!DefUsesInMBB.count(&*--InsertPoint)) {} - ++InsertPoint; + MachineBasicBlock::iterator InsertPoint = MBB->begin(); + // Insert the copy at the _latest_ point of: + // 1. Immediately AFTER the last def + // 2. Immediately BEFORE a call/inlineasm_br. + for (auto I = MBB->rbegin(), E = MBB->rend(); I != E; ++I) { + if (DefsInMBB.contains(&*I)) { + InsertPoint = std::next(I.getReverse()); + break; + } + if ((EHPadSuccessor && I->isCall()) || + I->getOpcode() == TargetOpcode::INLINEASM_BR) { + InsertPoint = I.getReverse(); + break; + } } // Make sure the copy goes after any phi nodes but before Modified: vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Thu Oct 1 17:30:38 2020 (r366332) +++ vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Thu Oct 1 17:48:15 2020 (r366333) @@ -169,32 +169,6 @@ static cl::opt SwitchPeelThreshold( // store [4096 x i8] %data, [4096 x i8]* %buffer static const unsigned MaxParallelChains = 64; -// Return the calling convention if the Value passed requires ABI mangling as it -// is a parameter to a function or a return value from a function which is not -// an intrinsic. -static Optional getABIRegCopyCC(const Value *V) { - if (auto *R = dyn_cast(V)) - return R->getParent()->getParent()->getCallingConv(); - - if (auto *CI = dyn_cast(V)) { - const bool IsInlineAsm = CI->isInlineAsm(); - const bool IsIndirectFunctionCall = - !IsInlineAsm && !CI->getCalledFunction(); - - // It is possible that the call instruction is an inline asm statement or an - // indirect function call in which case the return value of - // getCalledFunction() would be nullptr. - const bool IsInstrinsicCall = - !IsInlineAsm && !IsIndirectFunctionCall && - CI->getCalledFunction()->getIntrinsicID() != Intrinsic::not_intrinsic; - - if (!IsInlineAsm && !IsInstrinsicCall) - return CI->getCallingConv(); - } - - return None; -} - static SDValue getCopyFromPartsVector(SelectionDAG &DAG, const SDLoc &DL, const SDValue *Parts, unsigned NumParts, MVT PartVT, EVT ValueVT, const Value *V, @@ -1624,7 +1598,7 @@ SDValue SelectionDAGBuilder::getValueImpl(const Value unsigned InReg = FuncInfo.InitializeRegForValue(Inst); RegsForValue RFV(*DAG.getContext(), TLI, DAG.getDataLayout(), InReg, - Inst->getType(), getABIRegCopyCC(V)); + Inst->getType(), None); SDValue Chain = DAG.getEntryNode(); return RFV.getCopyFromRegs(DAG, FuncInfo, getCurSDLoc(), Chain, nullptr, V); } @@ -5555,7 +5529,7 @@ bool SelectionDAGBuilder::EmitFuncArgumentDbgValue( if (VMI != FuncInfo.ValueMap.end()) { const auto &TLI = DAG.getTargetLoweringInfo(); RegsForValue RFV(V->getContext(), TLI, DAG.getDataLayout(), VMI->second, - V->getType(), getABIRegCopyCC(V)); + V->getType(), None); if (RFV.occupiesMultipleRegs()) { splitMultiRegDbgValue(RFV.getRegsAndSizes()); return true; Modified: vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Thu Oct 1 17:30:38 2020 (r366332) +++ vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Thu Oct 1 17:48:15 2020 (r366333) @@ -5751,8 +5751,10 @@ SDValue TargetLowering::getNegatedExpression(SDValue O // If we already have the use of the negated floating constant, it is free // to negate it even it has multiple uses. - if (!Op.hasOneUse() && CFP.use_empty()) + if (!Op.hasOneUse() && CFP.use_empty()) { + RemoveDeadNode(CFP); break; + } Cost = NegatibleCost::Neutral; return CFP; } @@ -5810,7 +5812,8 @@ SDValue TargetLowering::getNegatedExpression(SDValue O if (NegX && (CostX <= CostY)) { Cost = CostX; SDValue N = DAG.getNode(ISD::FSUB, DL, VT, NegX, Y, Flags); - RemoveDeadNode(NegY); + if (NegY != N) + RemoveDeadNode(NegY); return N; } @@ -5818,7 +5821,8 @@ SDValue TargetLowering::getNegatedExpression(SDValue O if (NegY) { Cost = CostY; SDValue N = DAG.getNode(ISD::FSUB, DL, VT, NegY, X, Flags); - RemoveDeadNode(NegX); + if (NegX != N) + RemoveDeadNode(NegX); return N; } break; @@ -5857,7 +5861,8 @@ SDValue TargetLowering::getNegatedExpression(SDValue O if (NegX && (CostX <= CostY)) { Cost = CostX; SDValue N = DAG.getNode(Opcode, DL, VT, NegX, Y, Flags); - RemoveDeadNode(NegY); + if (NegY != N) + RemoveDeadNode(NegY); return N; } @@ -5870,7 +5875,8 @@ SDValue TargetLowering::getNegatedExpression(SDValue O if (NegY) { Cost = CostY; SDValue N = DAG.getNode(Opcode, DL, VT, X, NegY, Flags); - RemoveDeadNode(NegX); + if (NegX != N) + RemoveDeadNode(NegX); return N; } break; @@ -5901,7 +5907,8 @@ SDValue TargetLowering::getNegatedExpression(SDValue O if (NegX && (CostX <= CostY)) { Cost = std::min(CostX, CostZ); SDValue N = DAG.getNode(Opcode, DL, VT, NegX, Y, NegZ, Flags); - RemoveDeadNode(NegY); + if (NegY != N) + RemoveDeadNode(NegY); return N; } @@ -5909,7 +5916,8 @@ SDValue TargetLowering::getNegatedExpression(SDValue O if (NegY) { Cost = std::min(CostY, CostZ); SDValue N = DAG.getNode(Opcode, DL, VT, X, NegY, NegZ, Flags); - RemoveDeadNode(NegX); + if (NegX != N) + RemoveDeadNode(NegX); return N; } break; Modified: vendor/llvm-project/release-11.x/llvm/lib/IR/Core.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/IR/Core.cpp Thu Oct 1 17:30:38 2020 (r366332) +++ vendor/llvm-project/release-11.x/llvm/lib/IR/Core.cpp Thu Oct 1 17:48:15 2020 (r366333) @@ -3952,6 +3952,19 @@ LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, singleThread ? SyncScope::SingleThread : SyncScope::System)); } +unsigned LLVMGetNumMaskElements(LLVMValueRef SVInst) { + Value *P = unwrap(SVInst); + ShuffleVectorInst *I = cast(P); + return I->getShuffleMask().size(); +} + +int LLVMGetMaskValue(LLVMValueRef SVInst, unsigned Elt) { + Value *P = unwrap(SVInst); + ShuffleVectorInst *I = cast(P); + return I->getMaskValue(Elt); +} + +int LLVMGetUndefMaskElem(void) { return UndefMaskElem; } LLVMBool LLVMIsAtomicSingleThread(LLVMValueRef AtomicInst) { Value *P = unwrap(AtomicInst); Modified: vendor/llvm-project/release-11.x/llvm/lib/IR/Globals.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/IR/Globals.cpp Thu Oct 1 17:30:38 2020 (r366332) +++ vendor/llvm-project/release-11.x/llvm/lib/IR/Globals.cpp Thu Oct 1 17:48:15 2020 (r366333) @@ -104,7 +104,8 @@ bool GlobalValue::isInterposable() const { bool GlobalValue::canBenefitFromLocalAlias() const { // See AsmPrinter::getSymbolPreferLocal(). - return GlobalObject::isExternalLinkage(getLinkage()) && !isDeclaration() && + return hasDefaultVisibility() && + GlobalObject::isExternalLinkage(getLinkage()) && !isDeclaration() && !isa(this) && !hasComdat(); } Modified: vendor/llvm-project/release-11.x/llvm/lib/Support/APFloat.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/Support/APFloat.cpp Thu Oct 1 17:30:38 2020 (r366332) +++ vendor/llvm-project/release-11.x/llvm/lib/Support/APFloat.cpp Thu Oct 1 17:48:15 2020 (r366333) @@ -2242,6 +2242,21 @@ IEEEFloat::opStatus IEEEFloat::convert(const fltSemant if (!X86SpecialNan && semantics == &semX87DoubleExtended) APInt::tcSetBit(significandParts(), semantics->precision - 1); + // If we are truncating NaN, it is possible that we shifted out all of the + // set bits in a signalling NaN payload. But NaN must remain NaN, so some + // bit in the significand must be set (otherwise it is Inf). + // This can only happen with sNaN. Set the 1st bit after the quiet bit, + // so that we still have an sNaN. + // FIXME: Set quiet and return opInvalidOp (on convert of any sNaN). + // But this requires fixing LLVM to parse 32-bit hex FP or ignoring + // conversions while parsing IR. + if (APInt::tcIsZero(significandParts(), newPartCount)) { + assert(shift < 0 && "Should not lose NaN payload on extend"); + assert(semantics->precision >= 3 && "Unexpectedly narrow significand"); + assert(*losesInfo && "Missing payload should have set lost info"); + APInt::tcSetBit(significandParts(), semantics->precision - 3); + } + // gcc forces the Quiet bit on, which means (float)(double)(float_sNan) // does not give you back the same bits. This is dubious, and we // don't currently do it. You're really supposed to get Modified: vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp Thu Oct 1 17:30:38 2020 (r366332) +++ vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp Thu Oct 1 17:48:15 2020 (r366333) @@ -84,11 +84,16 @@ struct IncomingArgHandler : public CallLowering::Value } } - void assignValueToAddress(Register ValVReg, Register Addr, uint64_t Size, + void assignValueToAddress(Register ValVReg, Register Addr, uint64_t MemSize, MachinePointerInfo &MPO, CCValAssign &VA) override { MachineFunction &MF = MIRBuilder.getMF(); + + // The reported memory location may be wider than the value. + const LLT RegTy = MRI.getType(ValVReg); + MemSize = std::min(static_cast(RegTy.getSizeInBytes()), MemSize); + auto MMO = MF.getMachineMemOperand( - MPO, MachineMemOperand::MOLoad | MachineMemOperand::MOInvariant, Size, + MPO, MachineMemOperand::MOLoad | MachineMemOperand::MOInvariant, MemSize, inferAlignFromPtrInfo(MF, MPO)); MIRBuilder.buildLoad(ValVReg, Addr, *MMO); } Modified: vendor/llvm-project/release-11.x/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp Thu Oct 1 17:30:38 2020 (r366332) +++ vendor/llvm-project/release-11.x/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp Thu Oct 1 17:48:15 2020 (r366333) @@ -129,13 +129,17 @@ struct IncomingArgHandler : public CallLowering::Value } } - void assignValueToAddress(Register ValVReg, Register Addr, uint64_t Size, + void assignValueToAddress(Register ValVReg, Register Addr, uint64_t MemSize, MachinePointerInfo &MPO, CCValAssign &VA) override { MachineFunction &MF = MIRBuilder.getMF(); + // The reported memory location may be wider than the value. + const LLT RegTy = MRI.getType(ValVReg); + MemSize = std::min(static_cast(RegTy.getSizeInBytes()), MemSize); + // FIXME: Get alignment auto MMO = MF.getMachineMemOperand( - MPO, MachineMemOperand::MOLoad | MachineMemOperand::MOInvariant, Size, + MPO, MachineMemOperand::MOLoad | MachineMemOperand::MOInvariant, MemSize, inferAlignFromPtrInfo(MF, MPO)); MIRBuilder.buildLoad(ValVReg, Addr, *MMO); } From owner-svn-src-vendor@freebsd.org Thu Oct 1 17:49:11 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B96DD42F21C; Thu, 1 Oct 2020 17:49:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C2LGb4YcKz4SNk; Thu, 1 Oct 2020 17:49:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6643314D86; Thu, 1 Oct 2020 17:49:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 091HnBVG074115; Thu, 1 Oct 2020 17:49:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 091HnBoi074114; Thu, 1 Oct 2020 17:49:11 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202010011749.091HnBoi074114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Oct 2020 17:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r366334 - vendor/llvm-project/llvmorg-11.0.0-rc5-0-g60a25202a7d X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-project/llvmorg-11.0.0-rc5-0-g60a25202a7d X-SVN-Commit-Revision: 366334 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2020 17:49:11 -0000 Author: dim Date: Thu Oct 1 17:49:10 2020 New Revision: 366334 URL: https://svnweb.freebsd.org/changeset/base/366334 Log: Tag llvm-project branch release/11.x llvmorg-11.0.0-rc5-0-g60a25202a7d. Added: vendor/llvm-project/llvmorg-11.0.0-rc5-0-g60a25202a7d/ - copied from r366333, vendor/llvm-project/release-11.x/ From owner-svn-src-vendor@freebsd.org Thu Oct 1 23:09:27 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3BFB7436C08; Thu, 1 Oct 2020 23:09:27 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C2TN713SMz3ZCN; Thu, 1 Oct 2020 23:09:27 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E252E18993; Thu, 1 Oct 2020 23:09:26 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 091N9QlB073064; Thu, 1 Oct 2020 23:09:26 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 091N9OJV073051; Thu, 1 Oct 2020 23:09:24 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202010012309.091N9OJV073051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 1 Oct 2020 23:09:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r366348 - in vendor-sys/openzfs/dist: . .github cmd/zfs config contrib/initramfs/scripts contrib/intel_qat contrib/intel_qat/patch include/os/freebsd/spl/sys include/os/linux/spl/sys in... X-SVN-Group: vendor-sys X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in vendor-sys/openzfs/dist: . .github cmd/zfs config contrib/initramfs/scripts contrib/intel_qat contrib/intel_qat/patch include/os/freebsd/spl/sys include/os/linux/spl/sys include/sys include/sys/lua... X-SVN-Commit-Revision: 366348 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2020 23:09:27 -0000 Author: mmacy Date: Thu Oct 1 23:09:24 2020 New Revision: 366348 URL: https://svnweb.freebsd.org/changeset/base/366348 Log: Update OpenZFS to 2.0.0-rc3-gfc5966 Added: vendor-sys/openzfs/dist/.github/ vendor-sys/openzfs/dist/.github/CONTRIBUTING.md vendor-sys/openzfs/dist/contrib/intel_qat/ vendor-sys/openzfs/dist/contrib/intel_qat/patch/ vendor-sys/openzfs/dist/contrib/intel_qat/patch/0001-cryptohash.diff vendor-sys/openzfs/dist/contrib/intel_qat/patch/0001-pci_aer.diff vendor-sys/openzfs/dist/contrib/intel_qat/patch/0001-timespec.diff vendor-sys/openzfs/dist/contrib/intel_qat/patch/LICENSE vendor-sys/openzfs/dist/contrib/intel_qat/readme.md vendor-sys/openzfs/dist/tests/zfs-tests/cmd/badsend/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/badsend/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/badsend/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/badsend/badsend.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send_invalid.ksh Modified: vendor-sys/openzfs/dist/cmd/zfs/zfs_main.c vendor-sys/openzfs/dist/config/kernel-config-defined.m4 vendor-sys/openzfs/dist/config/kernel-objtool.m4 vendor-sys/openzfs/dist/configure.ac vendor-sys/openzfs/dist/contrib/initramfs/scripts/zfs vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/kstat.h vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/procfs_list.h vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/simd_x86.h vendor-sys/openzfs/dist/include/os/linux/spl/sys/procfs_list.h vendor-sys/openzfs/dist/include/sys/frame.h vendor-sys/openzfs/dist/include/sys/lua/luaconf.h vendor-sys/openzfs/dist/include/sys/zfs_context.h vendor-sys/openzfs/dist/include/sys/zstd/zstd.h vendor-sys/openzfs/dist/lib/libshare/os/freebsd/nfs.c vendor-sys/openzfs/dist/lib/libshare/os/linux/nfs.c vendor-sys/openzfs/dist/lib/libzpool/kernel.c vendor-sys/openzfs/dist/man/man8/zfs-userspace.8 vendor-sys/openzfs/dist/man/man8/zpool-remove.8 vendor-sys/openzfs/dist/module/lua/llimits.h vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_kstat.c vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_procfs_list.c vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_taskq.c vendor-sys/openzfs/dist/module/os/freebsd/zfs/kmod_core.c vendor-sys/openzfs/dist/module/os/freebsd/zfs/sysctl_os.c vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_ioctl_compat.c vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_vfsops.c vendor-sys/openzfs/dist/module/os/freebsd/zfs/zio_crypt.c vendor-sys/openzfs/dist/module/os/linux/spl/spl-procfs-list.c vendor-sys/openzfs/dist/module/os/linux/zfs/vdev_disk.c vendor-sys/openzfs/dist/module/os/linux/zfs/zfs_debug.c vendor-sys/openzfs/dist/module/zfs/arc.c vendor-sys/openzfs/dist/module/zfs/dbuf_stats.c vendor-sys/openzfs/dist/module/zfs/dmu_send.c vendor-sys/openzfs/dist/module/zfs/dnode.c vendor-sys/openzfs/dist/module/zfs/dsl_crypt.c vendor-sys/openzfs/dist/module/zfs/spa_misc.c vendor-sys/openzfs/dist/module/zfs/spa_stats.c vendor-sys/openzfs/dist/module/zfs/zfs_log.c vendor-sys/openzfs/dist/module/zstd/zfs_zstd.c vendor-sys/openzfs/dist/tests/runfiles/common.run vendor-sys/openzfs/dist/tests/zfs-tests/cmd/Makefile.am vendor-sys/openzfs/dist/tests/zfs-tests/include/commands.cfg vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/Makefile.am Added: vendor-sys/openzfs/dist/.github/CONTRIBUTING.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/openzfs/dist/.github/CONTRIBUTING.md Thu Oct 1 23:09:24 2020 (r366348) @@ -0,0 +1,345 @@ +# Contributing to OpenZFS +

+ OpenZFS Logo +

+ +*First of all, thank you for taking the time to contribute!* + +By using the following guidelines, you can help us make OpenZFS even better. + +## Table Of Contents +[What should I know before I get +started?](#what-should-i-know-before-i-get-started) + + * [Get ZFS](#get-zfs) + * [Debug ZFS](#debug-zfs) + * [Where can I ask for help?](#where-can-I-ask-for-help) + +[How Can I Contribute?](#how-can-i-contribute) + + * [Reporting Bugs](#reporting-bugs) + * [Suggesting Enhancements](#suggesting-enhancements) + * [Pull Requests](#pull-requests) + * [Testing](#testing) + +[Style Guides](#style-guides) + + * [Coding Conventions](#coding-conventions) + * [Commit Message Formats](#commit-message-formats) + * [New Changes](#new-changes) + * [OpenZFS Patch Ports](#openzfs-patch-ports) + * [Coverity Defect Fixes](#coverity-defect-fixes) + * [Signed Off By](#signed-off-by) + +Helpful resources + + * [OpenZFS Documentation](https://openzfs.github.io/openzfs-docs/) + * [OpenZFS Developer Resources](http://open-zfs.org/wiki/Developer_resources) + * [Git and GitHub for beginners](https://openzfs.github.io/openzfs-docs/Developer%20Resources/Git%20and%20GitHub%20for%20beginners.html) + +## What should I know before I get started? + +### Get ZFS +You can build zfs packages by following [these +instructions](https://openzfs.github.io/openzfs-docs/Developer%20Resources/Building%20ZFS.html), +or install stable packages from [your distribution's +repository](https://openzfs.github.io/openzfs-docs/Getting%20Started/index.html). + +### Debug ZFS +A variety of methods and tools are available to aid ZFS developers. +It's strongly recommended that when developing a patch the `--enable-debug` +configure option should be set. This will enable additional correctness +checks and all the ASSERTs to help quickly catch potential issues. + +In addition, there are numerous utilities and debugging files which +provide visibility into the inner workings of ZFS. The most useful +of these tools are discussed in detail on the [Troubleshooting +page](https://openzfs.github.io/openzfs-docs/Basic%20Concepts/Troubleshooting.html). + +### Where can I ask for help? +The [zfs-discuss mailing +list](https://openzfs.github.io/openzfs-docs/Project%20and%20Community/Mailing%20Lists.html) +or IRC are the best places to ask for help. Please do not file +support requests on the GitHub issue tracker. + +## How Can I Contribute? + +### Reporting Bugs +*Please* contact us via the [zfs-discuss mailing +list](https://openzfs.github.io/openzfs-docs/Project%20and%20Community/Mailing%20Lists.html) +or IRC if you aren't certain that you are experiencing a bug. + +If you run into an issue, please search our [issue +tracker](https://github.com/openzfs/zfs/issues) *first* to ensure the +issue hasn't been reported before. Open a new issue only if you haven't +found anything similar to your issue. + +You can open a new issue and search existing issues using the public [issue +tracker](https://github.com/openzfs/zfs/issues). + +#### When opening a new issue, please include the following information at the top of the issue: +* What distribution (with version) you are using. +* The spl and zfs versions you are using, installation method (repository +or manual compilation). +* Describe the issue you are experiencing. +* Describe how to reproduce the issue. +* Including any warning/errors/backtraces from the system logs. + +When a new issue is opened, it is not uncommon for developers to request +additional information. + +In general, the more detail you share about a problem the quicker a +developer can resolve it. For example, providing a simple test case is always +exceptionally helpful. + +Be prepared to work with the developers investigating your issue. Your +assistance is crucial in providing a quick solution. They may ask for +information like: + +* Your pool configuration as reported by `zdb` or `zpool status`. +* Your hardware configuration, such as + * Number of CPUs. + * Amount of memory. + * Whether your system has ECC memory. + * Whether it is running under a VMM/Hypervisor. + * Kernel version. + * Values of the spl/zfs module parameters. +* Stack traces which may be logged to `dmesg`. + +### Suggesting Enhancements +OpenZFS is a widely deployed production filesystem which is under active +development. The team's primary focus is on fixing known issues, improving +performance, and adding compelling new features. + +You can view the list of proposed features +by filtering the issue tracker by the ["Type: Feature" +label](https://github.com/openzfs/zfs/issues?q=is%3Aopen+is%3Aissue+label%3A%22Type%3A+Feature%22). +If you have an idea for a feature first check this list. If your idea already +appears then add a +1 to the top most comment, this helps us gauge interest +in that feature. + +Otherwise, open a new issue and describe your proposed feature. Why is this +feature needed? What problem does it solve? + +### Pull Requests + +#### General + +* All pull requests must be based on the current master branch and apply +without conflicts. +* Please attempt to limit pull requests to a single commit which resolves +one specific issue. +* Make sure your commit messages are in the correct format. See the +[Commit Message Formats](#commit-message-formats) section for more information. +* When updating a pull request squash multiple commits by performing a +[rebase](https://git-scm.com/docs/git-rebase) (squash). +* For large pull requests consider structuring your changes as a stack of +logically independent patches which build on each other. This makes large +changes easier to review and approve which speeds up the merging process. +* Try to keep pull requests simple. Simple code with comments is much easier +to review and approve. +* All proposed changes must be approved by an OpenZFS organization member. +* If you have an idea you'd like to discuss or which requires additional testing, consider opening it as a draft pull request. +Once everything is in good shape and the details have been worked out you can remove its draft status. +Any required reviews can then be finalized and the pull request merged. + +#### Tests and Benchmarks +* Every pull request will by tested by the buildbot on multiple platforms by running the [zfs-tests.sh and zloop.sh]( +https://openzfs.github.io/openzfs-docs/Developer%20Resources/Building%20ZFS.html#running-zloop-sh-and-zfs-tests-sh) test suites. +* To verify your changes conform to the [style guidelines]( +https://github.com/openzfs/zfs/blob/master/.github/CONTRIBUTING.md#style-guides +), please run `make checkstyle` and resolve any warnings. +* Static code analysis of each pull request is performed by the buildbot; run `make lint` to check your changes. +* Test cases should be provided when appropriate. +This includes making sure new features have adequate code coverage. +* If your pull request improves performance, please include some benchmarks. +* The pull request must pass all required [ZFS +Buildbot](http://build.zfsonlinux.org/) builders before +being accepted. If you are experiencing intermittent TEST +builder failures, you may be experiencing a [test suite +issue](https://github.com/openzfs/zfs/issues?q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Test+Suite%22). +There are also various [buildbot options](https://openzfs.github.io/openzfs-docs/Developer%20Resources/Buildbot%20Options.html) +to control how changes are tested. + +### Testing +All help is appreciated! If you're in a position to run the latest code +consider helping us by reporting any functional problems, performance +regressions or other suspected issues. By running the latest code to a wide +range of realistic workloads, configurations and architectures we're better +able quickly identify and resolve potential issues. + +Users can also run the [ZFS Test +Suite](https://github.com/openzfs/zfs/tree/master/tests) on their systems +to verify ZFS is behaving as intended. + +## Style Guides + +### Repository Structure + +OpenZFS uses a standardised branching structure. +- The "development and main branch", is the branch all development should be based on. +- "Release branches" contain the latest released code for said version. +- "Staging branches" contain selected commits prior to being released. + +**Branch Names:** +- Development and Main branch: `master` +- Release branches: `zfs-$VERSION-release` +- Staging branches: `zfs-$VERSION-staging` + +`$VERSION` should be replaced with the `major.minor` version number. +_(This is the version number without the `.patch` version at the end)_ + +### Coding Conventions +We currently use [C Style and Coding Standards for +SunOS](http://www.cis.upenn.edu/%7Elee/06cse480/data/cstyle.ms.pdf) as our +coding convention. + +This repository has an `.editorconfig` file. If your editor [supports +editorconfig](https://editorconfig.org/#download), it will +automatically respect most of this project's whitespace preferences. + +Additionally, Git can help warn on whitespace problems as well: + +``` +git config --local core.whitespace trailing-space,space-before-tab,indent-with-non-tab,-tab-in-indent +``` + +### Commit Message Formats +#### New Changes +Commit messages for new changes must meet the following guidelines: +* In 72 characters or less, provide a summary of the change as the +first line in the commit message. +* A body which provides a description of the change. If necessary, +please summarize important information such as why the proposed +approach was chosen or a brief description of the bug you are resolving. +Each line of the body must be 72 characters or less. +* The last line must be a `Signed-off-by:` tag. See the +[Signed Off By](#signed-off-by) section for more information. + +An example commit message for new changes is provided below. + +``` +This line is a brief summary of your change + +Please provide at least a couple sentences describing the +change. If necessary, please summarize decisions such as +why the proposed approach was chosen or what bug you are +attempting to solve. + +Signed-off-by: Contributor +``` + +#### OpenZFS Patch Ports +If you are porting OpenZFS patches, the commit message must meet +the following guidelines: +* The first line must be the summary line from the most important OpenZFS commit being ported. +It must begin with `OpenZFS dddd, dddd - ` where `dddd` are OpenZFS issue numbers. +* Provides a `Authored by:` line to attribute each patch for each original author. +* Provides the `Reviewed by:` and `Approved by:` lines from each original +OpenZFS commit. +* Provides a `Ported-by:` line with the developer's name followed by +their email for each OpenZFS commit. +* Provides a `OpenZFS-issue:` line with link for each original illumos +issue. +* Provides a `OpenZFS-commit:` line with link for each original OpenZFS commit. +* If necessary, provide some porting notes to describe any deviations from +the original OpenZFS commits. + +An example OpenZFS patch port commit message for a single patch is provided +below. +``` +OpenZFS 1234 - Summary from the original OpenZFS commit + +Authored by: Original Author +Reviewed by: Reviewer One +Reviewed by: Reviewer Two +Approved by: Approver One +Ported-by: ZFS Contributor + +Provide some porting notes here if necessary. + +OpenZFS-issue: https://www.illumos.org/issues/1234 +OpenZFS-commit: https://github.com/openzfs/openzfs/commit/abcd1234 +``` + +If necessary, multiple OpenZFS patches can be combined in a single port. +This is useful when you are porting a new patch and its subsequent bug +fixes. An example commit message is provided below. +``` +OpenZFS 1234, 5678 - Summary of most important OpenZFS commit + +1234 Summary from original OpenZFS commit for 1234 + +Authored by: Original Author +Reviewed by: Reviewer Two +Approved by: Approver One +Ported-by: ZFS Contributor + +Provide some porting notes here for 1234 if necessary. + +OpenZFS-issue: https://www.illumos.org/issues/1234 +OpenZFS-commit: https://github.com/openzfs/openzfs/commit/abcd1234 + +5678 Summary from original OpenZFS commit for 5678 + +Authored by: Original Author2 +Reviewed by: Reviewer One +Approved by: Approver Two +Ported-by: ZFS Contributor + +Provide some porting notes here for 5678 if necessary. + +OpenZFS-issue: https://www.illumos.org/issues/5678 +OpenZFS-commit: https://github.com/openzfs/openzfs/commit/efgh5678 +``` + +#### Coverity Defect Fixes +If you are submitting a fix to a +[Coverity defect](https://scan.coverity.com/projects/zfsonlinux-zfs), +the commit message should meet the following guidelines: +* Provides a subject line in the format of +`Fix coverity defects: CID dddd, dddd...` where `dddd` represents +each CID fixed by the commit. +* Provides a body which lists each Coverity defect and how it was corrected. +* The last line must be a `Signed-off-by:` tag. See the +[Signed Off By](#signed-off-by) section for more information. + +An example Coverity defect fix commit message is provided below. +``` +Fix coverity defects: CID 12345, 67890 + +CID 12345: Logically dead code (DEADCODE) + +Removed the if(var != 0) block because the condition could never be +satisfied. + +CID 67890: Resource Leak (RESOURCE_LEAK) + +Ensure free is called after allocating memory in function(). + +Signed-off-by: Contributor +``` + +#### Signed Off By +A line tagged as `Signed-off-by:` must contain the developer's +name followed by their email. This is the developer's certification +that they have the right to submit the patch for inclusion into +the code base and indicates agreement to the [Developer's Certificate +of Origin](https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin). +Code without a proper signoff cannot be merged. + +Git can append the `Signed-off-by` line to your commit messages. Simply +provide the `-s` or `--signoff` option when performing a `git commit`. +For more information about writing commit messages, visit [How to Write +a Git Commit Message](https://chris.beams.io/posts/git-commit/). + +#### Co-authored By +If someone else had part in your pull request, please add the following to the commit: +`Co-authored-by: Name ` +This is useful if their authorship was lost during squashing, rebasing, etc., +but may be used in any situation where there are co-authors. + +The email address used here should be the same as on the GitHub profile of said user. +If said user does not have their email address public, please use the following instead: +`Co-authored-by: Name <[username]@users.noreply.github.com>` Modified: vendor-sys/openzfs/dist/cmd/zfs/zfs_main.c ============================================================================== --- vendor-sys/openzfs/dist/cmd/zfs/zfs_main.c Thu Oct 1 22:20:29 2020 (r366347) +++ vendor-sys/openzfs/dist/cmd/zfs/zfs_main.c Thu Oct 1 23:09:24 2020 (r366348) @@ -363,16 +363,16 @@ get_usage(zfs_help_t idx) return (gettext("\tuserspace [-Hinp] [-o field[,...]] " "[-s field] ...\n" "\t [-S field] ... [-t type[,...]] " - "\n")); + "\n")); case HELP_GROUPSPACE: return (gettext("\tgroupspace [-Hinp] [-o field[,...]] " "[-s field] ...\n" "\t [-S field] ... [-t type[,...]] " - "\n")); + "\n")); case HELP_PROJECTSPACE: return (gettext("\tprojectspace [-Hp] [-o field[,...]] " "[-s field] ... \n" - "\t [-S field] ... \n")); + "\t [-S field] ... \n")); case HELP_PROJECT: return (gettext("\tproject [-d|-r] \n" "\tproject -c [-0] [-d|-r] [-p id] \n" @@ -2481,11 +2481,13 @@ zfs_do_upgrade(int argc, char **argv) /* * zfs userspace [-Hinp] [-o field[,...]] [-s field [-s field]...] - * [-S field [-S field]...] [-t type[,...]] filesystem | snapshot + * [-S field [-S field]...] [-t type[,...]] + * filesystem | snapshot | path * zfs groupspace [-Hinp] [-o field[,...]] [-s field [-s field]...] - * [-S field [-S field]...] [-t type[,...]] filesystem | snapshot + * [-S field [-S field]...] [-t type[,...]] + * filesystem | snapshot | path * zfs projectspace [-Hp] [-o field[,...]] [-s field [-s field]...] - * [-S field [-S field]...] filesystem | snapshot + * [-S field [-S field]...] filesystem | snapshot | path * * -H Scripted mode; elide headers and separate columns by tabs. * -i Translate SID to POSIX ID. @@ -3191,7 +3193,7 @@ zfs_do_userspace(int argc, char **argv) } while (delim != NULL); } - if ((zhp = zfs_open(g_zfs, argv[0], ZFS_TYPE_FILESYSTEM | + if ((zhp = zfs_path_to_zhandle(g_zfs, argv[0], ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT)) == NULL) return (1); if (zhp->zfs_head_type != ZFS_TYPE_FILESYSTEM) { Modified: vendor-sys/openzfs/dist/config/kernel-config-defined.m4 ============================================================================== --- vendor-sys/openzfs/dist/config/kernel-config-defined.m4 Thu Oct 1 22:20:29 2020 (r366347) +++ vendor-sys/openzfs/dist/config/kernel-config-defined.m4 Thu Oct 1 23:09:24 2020 (r366348) @@ -91,7 +91,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_CONFIG_DEBUG_LOCK_ALLOC], AC_DEFUN([ZFS_AC_KERNEL_CONFIG_DEBUG_LOCK_ALLOC], [ AC_MSG_CHECKING([whether mutex_lock() is GPL-only]) - ZFS_LINUX_TEST_RESULT([config_debug_lock_alloc], [ + ZFS_LINUX_TEST_RESULT([config_debug_lock_alloc_license], [ AC_MSG_RESULT(no) ],[ AC_MSG_RESULT(yes) Modified: vendor-sys/openzfs/dist/config/kernel-objtool.m4 ============================================================================== --- vendor-sys/openzfs/dist/config/kernel-objtool.m4 Thu Oct 1 22:20:29 2020 (r366347) +++ vendor-sys/openzfs/dist/config/kernel-objtool.m4 Thu Oct 1 23:09:24 2020 (r366348) @@ -6,10 +6,11 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_OBJTOOL], [ dnl # 4.6 API for compile-time stack validation ZFS_LINUX_TEST_SRC([objtool], [ #undef __ASSEMBLY__ + #include #include ],[ #if !defined(FRAME_BEGIN) - CTASSERT(1); + #error "FRAME_BEGIN is not defined" #endif ]) @@ -18,7 +19,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_OBJTOOL], [ #include ],[ #if !defined(STACK_FRAME_NON_STANDARD) - CTASSERT(1); + #error "STACK_FRAME_NON_STANDARD is not defined." #endif ]) ]) Modified: vendor-sys/openzfs/dist/configure.ac ============================================================================== --- vendor-sys/openzfs/dist/configure.ac Thu Oct 1 22:20:29 2020 (r366347) +++ vendor-sys/openzfs/dist/configure.ac Thu Oct 1 23:09:24 2020 (r366348) @@ -204,6 +204,7 @@ AC_CONFIG_FILES([ tests/zfs-tests/Makefile tests/zfs-tests/callbacks/Makefile tests/zfs-tests/cmd/Makefile + tests/zfs-tests/cmd/badsend/Makefile tests/zfs-tests/cmd/btree_test/Makefile tests/zfs-tests/cmd/chg_usr_exec/Makefile tests/zfs-tests/cmd/devname2devid/Makefile Modified: vendor-sys/openzfs/dist/contrib/initramfs/scripts/zfs ============================================================================== --- vendor-sys/openzfs/dist/contrib/initramfs/scripts/zfs Thu Oct 1 22:20:29 2020 (r366347) +++ vendor-sys/openzfs/dist/contrib/initramfs/scripts/zfs Thu Oct 1 23:09:24 2020 (r366348) @@ -15,8 +15,8 @@ # See "4.5 Disable root prompt on the initramfs" of Securing Debian Manual: # https://www.debian.org/doc/manuals/securing-debian-howto/ch4.en.html shell() { - if type panic > /dev/null 2>&1; then - panic $@ + if command -v panic > /dev/null 2>&1; then + panic else /bin/sh fi @@ -26,22 +26,23 @@ shell() { # pools and mounting any filesystems. pre_mountroot() { - if type run_scripts > /dev/null 2>&1 && \ - [ -f "/scripts/local-top" -o -d "/scripts/local-top" ] + if command -v run_scripts > /dev/null 2>&1 then - [ "$quiet" != "y" ] && \ - zfs_log_begin_msg "Running /scripts/local-top" - run_scripts /scripts/local-top - [ "$quiet" != "y" ] && zfs_log_end_msg - fi + if [ -f "/scripts/local-top" ] || [ -d "/scripts/local-top" ] + then + [ "$quiet" != "y" ] && \ + zfs_log_begin_msg "Running /scripts/local-top" + run_scripts /scripts/local-top + [ "$quiet" != "y" ] && zfs_log_end_msg + fi - if type run_scripts > /dev/null 2>&1 && \ - [ -f "/scripts/local-premount" -o -d "/scripts/local-premount" ] - then - [ "$quiet" != "y" ] && \ - zfs_log_begin_msg "Running /scripts/local-premount" - run_scripts /scripts/local-premount - [ "$quiet" != "y" ] && zfs_log_end_msg + if [ -f "/scripts/local-premount" ] || [ -d "/scripts/local-premount" ] + then + [ "$quiet" != "y" ] && \ + zfs_log_begin_msg "Running /scripts/local-premount" + run_scripts /scripts/local-premount + [ "$quiet" != "y" ] && zfs_log_end_msg + fi fi } @@ -57,10 +58,10 @@ disable_plymouth() # Get a ZFS filesystem property value. get_fs_value() { - local fs="$1" - local value=$2 + fs="$1" + value=$2 - "${ZFS}" get -H -ovalue $value "$fs" 2> /dev/null + "${ZFS}" get -H -ovalue "$value" "$fs" 2> /dev/null } # Find the 'bootfs' property on pool $1. @@ -68,7 +69,7 @@ get_fs_value() # pool by exporting it again. find_rootfs() { - local pool="$1" + pool="$1" # If 'POOL_IMPORTED' isn't set, no pool imported and therefore # we won't be able to find a root fs. @@ -84,7 +85,7 @@ find_rootfs() # Make sure it's not '-' and that it starts with /. if [ "${ZFS_BOOTFS}" != "-" ] && \ - $(get_fs_value "${ZFS_BOOTFS}" mountpoint | grep -q '^/$') + get_fs_value "${ZFS_BOOTFS}" mountpoint | grep -q '^/$' then # Keep it mounted POOL_IMPORTED=1 @@ -101,14 +102,13 @@ find_rootfs() # Support function to get a list of all pools, separated with ';' find_pools() { - local CMD="$*" - local pools pool + CMD="$*" pools=$($CMD 2> /dev/null | \ grep -E "pool:|^[a-zA-Z0-9]" | \ sed 's@.*: @@' | \ - while read pool; do \ - echo -n "$pool;" + while read -r pool; do \ + printf "%s" "$pool;" done) echo "${pools%%;}" # Return without the last ';'. @@ -117,8 +117,6 @@ find_pools() # Get a list of all available pools get_pools() { - local available_pools npools - if [ -n "${ZFS_POOL_IMPORT}" ]; then echo "$ZFS_POOL_IMPORT" return 0 @@ -159,9 +157,8 @@ get_pools() # Filter out any exceptions... if [ -n "$ZFS_POOL_EXCEPTIONS" ] then - local found="" - local apools="" - local pool exception + found="" + apools="" OLD_IFS="$IFS" ; IFS=";" for pool in $available_pools @@ -194,8 +191,7 @@ get_pools() # Import given pool $1 import_pool() { - local pool="$1" - local dirs dir + pool="$1" # Verify that the pool isn't already imported # Make as sure as we can to not require '-f' to import. @@ -205,7 +201,7 @@ import_pool() # to something we can use later with the real import(s). We want to # make sure we find all by* dirs, BUT by-vdev should be first (if it # exists). - if [ -n "$USE_DISK_BY_ID" -a -z "$ZPOOL_IMPORT_PATH" ] + if [ -n "$USE_DISK_BY_ID" ] && [ -z "$ZPOOL_IMPORT_PATH" ] then dirs="$(for dir in $(echo /dev/disk/by-*) do @@ -213,7 +209,7 @@ import_pool() echo "$dir" | grep -q /by-vdev && continue [ ! -d "$dir" ] && continue - echo -n "$dir:" + printf "%s" "$dir:" done | sed 's,:$,,g')" if [ -d "/dev/disk/by-vdev" ] @@ -277,7 +273,7 @@ import_pool() # with more logging etc. load_module_initrd() { - if [ "$ZFS_INITRD_PRE_MOUNTROOT_SLEEP" > 0 ] + if [ "$ZFS_INITRD_PRE_MOUNTROOT_SLEEP" -gt 0 ] 2>/dev/null then if [ "$quiet" != "y" ]; then zfs_log_begin_msg "Sleeping for" \ @@ -288,9 +284,9 @@ load_module_initrd() fi # Wait for all of the /dev/{hd,sd}[a-z] device nodes to appear. - if type wait_for_udev > /dev/null 2>&1 ; then + if command -v wait_for_udev > /dev/null 2>&1 ; then wait_for_udev 10 - elif type wait_for_dev > /dev/null 2>&1 ; then + elif command -v wait_for_dev > /dev/null 2>&1 ; then wait_for_dev fi @@ -300,7 +296,7 @@ load_module_initrd() # Load the module load_module "zfs" || return 1 - if [ "$ZFS_INITRD_POST_MODPROBE_SLEEP" > 0 ] + if [ "$ZFS_INITRD_POST_MODPROBE_SLEEP" -gt 0 ] 2>/dev/null then if [ "$quiet" != "y" ]; then zfs_log_begin_msg "Sleeping for" \ @@ -316,12 +312,10 @@ load_module_initrd() # Mount a given filesystem mount_fs() { - local fs="$1" - local mountpoint + fs="$1" # Check that the filesystem exists - "${ZFS}" list -oname -tfilesystem -H "${fs}" > /dev/null 2>&1 - [ "$?" -ne 0 ] && return 1 + "${ZFS}" list -oname -tfilesystem -H "${fs}" > /dev/null 2>&1 || return 1 # Skip filesystems with canmount=off. The root fs should not have # canmount=off, but ignore it for backwards compatibility just in case. @@ -333,14 +327,14 @@ mount_fs() # Need the _original_ datasets mountpoint! mountpoint=$(get_fs_value "$fs" mountpoint) - if [ "$mountpoint" = "legacy" -o "$mountpoint" = "none" ]; then + if [ "$mountpoint" = "legacy" ] || [ "$mountpoint" = "none" ]; then # Can't use the mountpoint property. Might be one of our # clones. Check the 'org.zol:mountpoint' property set in # clone_snap() if that's usable. mountpoint=$(get_fs_value "$fs" org.zol:mountpoint) - if [ "$mountpoint" = "legacy" -o \ - "$mountpoint" = "none" -o \ - "$mountpoint" = "-" ] + if [ "$mountpoint" = "legacy" ] || + [ "$mountpoint" = "none" ] || + [ "$mountpoint" = "-" ] then if [ "$fs" != "${ZFS_BOOTFS}" ]; then # We don't have a proper mountpoint and this @@ -396,10 +390,10 @@ mount_fs() # Unlock a ZFS native encrypted filesystem. decrypt_fs() { - local fs="$1" - + fs="$1" + # If pool encryption is active and the zfs command understands '-o encryption' - if [ "$(zpool list -H -o feature@encryption $(echo "${fs}" | awk -F\/ '{print $1}'))" = 'active' ]; then + if [ "$(zpool list -H -o feature@encryption "$(echo "${fs}" | awk -F/ '{print $1}')")" = 'active' ]; then # Determine dataset that holds key for root dataset ENCRYPTIONROOT="$(get_fs_value "${fs}" encryptionroot)" @@ -427,7 +421,7 @@ decrypt_fs() TRY_COUNT=$((TRY_COUNT - 1)) done - # Prompt with systemd, if active + # Prompt with systemd, if active elif [ -e /run/systemd/system ]; then echo "systemd-ask-password" > /run/zfs_console_askpwd_cmd while [ $TRY_COUNT -gt 0 ]; do @@ -454,7 +448,7 @@ decrypt_fs() # Destroy a given filesystem. destroy_fs() { - local fs="$1" + fs="$1" [ "$quiet" != "y" ] && \ zfs_log_begin_msg "Destroying '$fs'" @@ -489,9 +483,9 @@ destroy_fs() # mounted with a 'zfs mount -a' in the init/systemd scripts). clone_snap() { - local snap="$1" - local destfs="$2" - local mountpoint="$3" + snap="$1" + destfs="$2" + mountpoint="$3" [ "$quiet" != "y" ] && zfs_log_begin_msg "Cloning '$snap' to '$destfs'" @@ -529,7 +523,7 @@ clone_snap() # Rollback a given snapshot. rollback_snap() { - local snap="$1" + snap="$1" [ "$quiet" != "y" ] && zfs_log_begin_msg "Rollback $snap" @@ -559,9 +553,8 @@ rollback_snap() # to the user to choose from. ask_user_snap() { - local fs="$1" - local i=1 - local SNAP snapnr snap debug + fs="$1" + i=1 # We need to temporarily disable debugging. Set 'debug' so we # remember to enabled it again. @@ -574,16 +567,16 @@ ask_user_snap() # Because we need the resulting snapshot, which is sent on # stdout to the caller, we use stderr for our questions. echo "What snapshot do you want to boot from?" > /dev/stderr - while read snap; do + while read -r snap; do echo " $i: ${snap}" > /dev/stderr - eval `echo SNAP_$i=$snap` + eval "$(echo SNAP_$i=$snap)" i=$((i + 1)) done < /dev/stderr - read snapnr + echo "%s" " Snap nr [1-$((i-1))]? " > /dev/stderr + read -r snapnr # Re-enable debugging. if [ -n "${debug}" ]; then @@ -591,16 +584,16 @@ EOT set -x fi - echo "$(eval echo "$"SNAP_$snapnr)" + echo "$(eval echo '$SNAP_'$snapnr)" } setup_snapshot_booting() { - local snap="$1" - local s destfs subfs mountpoint retval=0 filesystems fs + snap="$1" + retval=0 - # Make sure that the snapshot specified actually exist. - if [ ! $(get_fs_value "${snap}" type) ] + # Make sure that the snapshot specified actually exists. + if [ ! "$(get_fs_value "${snap}" type)" ] then # Snapshot does not exist (...@ ?) # ask the user for a snapshot to use. @@ -617,7 +610,7 @@ setup_snapshot_booting() then # If the destination dataset for the clone # already exists, destroy it. Recursively - if [ $(get_fs_value "${rootfs}_${snapname}" type) ]; then + if [ "$(get_fs_value "${rootfs}_${snapname}" type)" ]; then filesystems=$("${ZFS}" list -oname -tfilesystem -H \ -r -Sname "${ZFS_BOOTFS}") for fs in $filesystems; do @@ -652,8 +645,8 @@ setup_snapshot_booting() # with clone_snap(). If legacy or none, then use # the sub fs value. mountpoint=$(get_fs_value "${s%%@*}" mountpoint) - if [ "$mountpoint" = "legacy" -o \ - "$mountpoint" = "none" ] + if [ "$mountpoint" = "legacy" ] || \ + [ "$mountpoint" = "none" ] then if [ -n "${subfs}" ]; then mountpoint="${subfs}" @@ -678,8 +671,6 @@ setup_snapshot_booting() # This is the main function. mountroot() { - local snaporig snapsub destfs pool POOLS - # ---------------------------------------------------------------- # I N I T I A L S E T U P @@ -742,7 +733,7 @@ mountroot() # No longer set in the defaults file, but it could have been set in # get_pools() in some circumstances. If it's something, but not 'yes', # it's no good to us. - [ -n "$USE_DISK_BY_ID" -a "$USE_DISK_BY_ID" != 'yes' ] && \ + [ -n "$USE_DISK_BY_ID" ] && [ "$USE_DISK_BY_ID" != 'yes' ] && \ unset USE_DISK_BY_ID # ---------------------------------------------------------------- @@ -788,12 +779,12 @@ mountroot() # ------------ # If we have 'ROOT' (see above), but not 'ZFS_BOOTFS', then use # 'ROOT' - [ -n "$ROOT" -a -z "${ZFS_BOOTFS}" ] && ZFS_BOOTFS="$ROOT" + [ -n "$ROOT" ] && [ -z "${ZFS_BOOTFS}" ] && ZFS_BOOTFS="$ROOT" # ------------ # Check for the `-B zfs-bootfs=%s/%u,...` kind of parameter. # NOTE: Only use the pool name and dataset. The rest is not - # supported by ZoL (whatever it's for). + # supported by OpenZFS (whatever it's for). if [ -z "$ZFS_RPOOL" ] then # The ${zfs-bootfs} variable is set at the kernel command @@ -809,11 +800,11 @@ mountroot() # ------------ # No root fs or pool specified - do auto detect. - if [ -z "$ZFS_RPOOL" -a -z "${ZFS_BOOTFS}" ] + if [ -z "$ZFS_RPOOL" ] && [ -z "${ZFS_BOOTFS}" ] then # Do auto detect. Do this by 'cheating' - set 'root=zfs:AUTO' # which will be caught later - ROOT=zfs:AUTO + ROOT='zfs:AUTO' fi # ---------------------------------------------------------------- @@ -858,7 +849,7 @@ mountroot() fi # Import the pool (if not already done so in the AUTO check above). - if [ -n "$ZFS_RPOOL" -a -z "${POOL_IMPORTED}" ] + if [ -n "$ZFS_RPOOL" ] && [ -z "${POOL_IMPORTED}" ] then [ "$quiet" != "y" ] && \ zfs_log_begin_msg "Importing ZFS root pool '$ZFS_RPOOL'" @@ -971,7 +962,7 @@ mountroot() touch /run/zfs_unlock_complete if [ -e /run/zfs_unlock_complete_notify ]; then - read zfs_unlock_complete_notify < /run/zfs_unlock_complete_notify + read -r zfs_unlock_complete_notify < /run/zfs_unlock_complete_notify fi # ------------ @@ -989,8 +980,8 @@ mountroot() echo echo "=> waiting for ENTER before continuing because of 'zfsdebug=1'. " - echo -n " 'c' for shell, 'r' for reboot, 'ENTER' to continue. " - read b + printf "%s" " 'c' for shell, 'r' for reboot, 'ENTER' to continue. " + read -r b [ "$b" = "c" ] && /bin/sh [ "$b" = "r" ] && reboot -f @@ -1000,12 +991,14 @@ mountroot() # ------------ # Run local bottom script - if type run_scripts > /dev/null 2>&1 && \ - [ -f "/scripts/local-bottom" -o -d "/scripts/local-bottom" ] + if command -v run_scripts > /dev/null 2>&1 then - [ "$quiet" != "y" ] && \ - zfs_log_begin_msg "Running /scripts/local-bottom" - run_scripts /scripts/local-bottom - [ "$quiet" != "y" ] && zfs_log_end_msg + if [ -f "/scripts/local-bottom" ] || [ -d "/scripts/local-bottom" ] + then + [ "$quiet" != "y" ] && \ + zfs_log_begin_msg "Running /scripts/local-bottom" + run_scripts /scripts/local-bottom + [ "$quiet" != "y" ] && zfs_log_end_msg + fi fi } Added: vendor-sys/openzfs/dist/contrib/intel_qat/patch/0001-cryptohash.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/openzfs/dist/contrib/intel_qat/patch/0001-cryptohash.diff Thu Oct 1 23:09:24 2020 (r366348) @@ -0,0 +1,17 @@ +cryptohash.h was dropped and merged with crypto/sha.sh in 5.8 kernel. Details in: +https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=228c4f265c6eb60eaa4ed0edb3bf7c113173576c + +--- +diff --git a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c +index 4c389da..e602377 100644 +--- a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c ++++ b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c +@@ -66,7 +66,7 @@ + + #include "Osal.h" + #include +-#include ++#include + #include + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + #include Added: vendor-sys/openzfs/dist/contrib/intel_qat/patch/0001-pci_aer.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/openzfs/dist/contrib/intel_qat/patch/0001-pci_aer.diff Thu Oct 1 23:09:24 2020 (r366348) @@ -0,0 +1,20 @@ +In kernel 5.7 the pci_cleanup_aer_uncorrect_error_status() function was +renamed with the following commit: + +git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=894020fdd88c1e9a74c60b67c0f19f1c7696ba2f + +This simply updates the function call with the proper name (pci_aer_clear_nonfatal_status()). + +--- +diff --git a/quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c b/quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c +index a6ce6df..545bb79 100644 +--- a/quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c ++++ b/quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c +@@ -304,7 +304,7 @@ static pci_ers_result_t adf_slot_reset(struct pci_dev *pdev) + pr_err("QAT: Can't find acceleration device\n"); + return PCI_ERS_RESULT_DISCONNECT; + } +- pci_cleanup_aer_uncorrect_error_status(pdev); ++ pci_aer_clear_nonfatal_status(pdev); + if (adf_dev_aer_schedule_reset(accel_dev, ADF_DEV_RESET_SYNC)) + return PCI_ERS_RESULT_DISCONNECT; Added: vendor-sys/openzfs/dist/contrib/intel_qat/patch/0001-timespec.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/openzfs/dist/contrib/intel_qat/patch/0001-timespec.diff Thu Oct 1 23:09:24 2020 (r366348) @@ -0,0 +1,35 @@ +This patch attempts to expose timespec and getnstimeofday which were +explicitly hidden in the 5.6 kernel with the introduction of the +following commits: + +git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c766d1472c70d25ad475cf56042af1652e792b23 +git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=412c53a680a97cb1ae2c0ab60230e193bee86387 + +Code received from users@dpdk.org, issue tracked under QATE-59888. + +--- +diff --git a/quickassist/lookaside/access_layer/src/sample_code/performance/framework/linux/kernel_space/cpa_sample_code_utils.c b/quickassist/lookaside/access_layer/src/sample_code/performance/framework/linux/kernel_space/cpa_sample_code_utils.c +index 4639834..523e376 100644 +--- a/quickassist/lookaside/access_layer/src/sample_code/performance/framework/linux/kernel_space/cpa_sample_code_utils.c ++++ b/quickassist/lookaside/access_layer/src/sample_code/performance/framework/linux/kernel_space/cpa_sample_code_utils.c +@@ -107,6 +107,8 @@ atomic_t arrived; + extern struct device perf_device; + #endif + ++#define timespec timespec64 ++#define getnstimeofday ktime_get_real_ts64 + + /* Define a number for timeout */ + #define SAMPLE_CODE_MAX_LONG (0x7FFFFFFF) +diff --git a/quickassist/qat/compat/qat_compat.h b/quickassist/qat/compat/qat_compat.h +index 2a02eaf..3515092 100644 +--- a/quickassist/qat/compat/qat_compat.h ++++ b/quickassist/qat/compat/qat_compat.h +@@ -466,4 +466,7 @@ static inline void pci_ignore_hotplug(struct pci_dev *dev) + #if (RHEL_RELEASE_CODE && RHEL_RELEASE_VERSION(7, 3) <= RHEL_RELEASE_CODE) + #define QAT_KPT_CAP_DISCOVERY + #endif ++ ++#define timespec timespec64 ++#define getnstimeofday ktime_get_real_ts64 + #endif /* _QAT_COMPAT_H_ */ Added: vendor-sys/openzfs/dist/contrib/intel_qat/patch/LICENSE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/openzfs/dist/contrib/intel_qat/patch/LICENSE Thu Oct 1 23:09:24 2020 (r366348) @@ -0,0 +1,30 @@ +BSD LICENSE + +Copyright (c) Intel Corporation. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Added: vendor-sys/openzfs/dist/contrib/intel_qat/readme.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/openzfs/dist/contrib/intel_qat/readme.md Thu Oct 1 23:09:24 2020 (r366348) @@ -0,0 +1,27 @@ +# Intel_QAT easy install script + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Thu Oct 1 23:11:59 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F784436DA2; Thu, 1 Oct 2020 23:11:59 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C2TR30S0Cz3ZBZ; Thu, 1 Oct 2020 23:11:59 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CDD4918A19; Thu, 1 Oct 2020 23:11:58 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 091NBwH4077410; Thu, 1 Oct 2020 23:11:58 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 091NBwWj077409; Thu, 1 Oct 2020 23:11:58 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202010012311.091NBwWj077409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 1 Oct 2020 23:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r366349 - vendor-sys/openzfs/2.0-rc3-gfc5966 X-SVN-Group: vendor-sys X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: vendor-sys/openzfs/2.0-rc3-gfc5966 X-SVN-Commit-Revision: 366349 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2020 23:11:59 -0000 Author: mmacy Date: Thu Oct 1 23:11:58 2020 New Revision: 366349 URL: https://svnweb.freebsd.org/changeset/base/366349 Log: checkpoint OpenZFS 2.0-rc3-gfc5966 Added: vendor-sys/openzfs/2.0-rc3-gfc5966/ - copied from r366348, vendor-sys/openzfs/dist/