From nobody Mon Dec 06 18:58:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2F0E118BB2BC; Mon, 6 Dec 2021 18:58:04 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J7CP75gz0z4ZnG; Mon, 6 Dec 2021 18:58:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A02CF115B0; Mon, 6 Dec 2021 18:58:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1B6Iw3jm079753; Mon, 6 Dec 2021 18:58:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B6Iw3q2079752; Mon, 6 Dec 2021 18:58:03 GMT (envelope-from git) Date: Mon, 6 Dec 2021 18:58:03 GMT Message-Id: <202112061858.1B6Iw3q2079752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: db158b9942c1 - main - libnv: let nvlist_recv() pass flags to recv() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db158b9942c15f13f4fa09bd29435da882cf865c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638817083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hnBmru2DjffULKzVxFSeOPRcIHro1CyFD/DMOZOUfBQ=; b=xA/vRoZl4vSIS8Wna1SUtO7PZcEmGqIpto/kd+r+tLJpUrqHNrOytHiDOAGNULU9PxA/fb q1qFAK2T8HFagNHcUBP2euReTtI6b/V3bn/xKMpPfq8YKMBaAQtaoL5lP5kEwk5EmLh5cQ 3l6Txkehetd68ScPzvIwQw47j/MgkZRwLXNQ8OCZbrTe7XK1TQ1It0mQDRAk5rs7mLYW/k 0VLoa0mnOmhEE6TO1GiTFmt07nIxdANsQg7C8FsbEEb3TihsEpvRZJ6xgMbMJzXraUCFY2 +CdC/D7nEEFUNJjTPp2XHREEfljtx7Sw2fNrHzmWPVzRbeDHf/yVMI66XLOU/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638817083; a=rsa-sha256; cv=none; b=thN9NY81dsDThNst8la/JsFHnkFEr+gZaXWjJhULfoXK1Z9fGkA+DBb7h+i9ZHm/aST+MK vOut296sie3+yzJqvZNH1W8kcGzgcopGrIdDpeaCQ5zF69+oSJU9cDfcD5TCgngEq9++gn 7E506B18ASQldFIN/OiAh/otcSu3r82X2vdSDW2hg25PBWLcwrwHmZo670dU4CZ0z/KDm4 nJqFw5lqYzTaeXjvYj3f8e3Pq7g6tn47z+OPkdEcQv3Qw1e/0VCldJUvXuJ9ke+3f1UUiH Q9lhmNjQpddEC1N0KXC3vz6eFmIoKKr5HEL8BxUHBufNZgQJKWIgTZ7oRhoSww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=db158b9942c15f13f4fa09bd29435da882cf865c commit db158b9942c15f13f4fa09bd29435da882cf865c Author: Robert Wing AuthorDate: 2021-12-06 18:36:37 +0000 Commit: Robert Wing CommitDate: 2021-12-06 18:54:55 +0000 libnv: let nvlist_recv() pass flags to recv() Differential Revision: https://reviews.freebsd.org/D32721 --- lib/libnv/msgio.c | 4 ++-- lib/libnv/msgio.h | 2 +- sys/contrib/libnv/nvlist.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/libnv/msgio.c b/lib/libnv/msgio.c index 7cec4c898f04..899f2d3a0ff1 100644 --- a/lib/libnv/msgio.c +++ b/lib/libnv/msgio.c @@ -450,7 +450,7 @@ buf_send(int sock, void *buf, size_t size) } int -buf_recv(int sock, void *buf, size_t size) +buf_recv(int sock, void *buf, size_t size, int flags) { ssize_t done; unsigned char *ptr; @@ -461,7 +461,7 @@ buf_recv(int sock, void *buf, size_t size) ptr = buf; while (size > 0) { fd_wait(sock, true); - done = recv(sock, ptr, size, 0); + done = recv(sock, ptr, size, flags); if (done == -1) { if (errno == EINTR) continue; diff --git a/lib/libnv/msgio.h b/lib/libnv/msgio.h index 13592e4cd0fb..0686c47f294c 100644 --- a/lib/libnv/msgio.h +++ b/lib/libnv/msgio.h @@ -47,6 +47,6 @@ int fd_send(int sock, const int *fds, size_t nfds); int fd_recv(int sock, int *fds, size_t nfds); int buf_send(int sock, void *buf, size_t size); -int buf_recv(int sock, void *buf, size_t size); +int buf_recv(int sock, void *buf, size_t size, int flags); #endif /* !_MSGIO_H_ */ diff --git a/sys/contrib/libnv/nvlist.c b/sys/contrib/libnv/nvlist.c index 31ab62abeb67..0ede1ca2f894 100644 --- a/sys/contrib/libnv/nvlist.c +++ b/sys/contrib/libnv/nvlist.c @@ -1280,7 +1280,7 @@ nvlist_recv(int sock, int flags) size_t nfds, size, i; int *fds; - if (buf_recv(sock, &nvlhdr, sizeof(nvlhdr)) == -1) + if (buf_recv(sock, &nvlhdr, sizeof(nvlhdr), 0) == -1) return (NULL); if (!nvlist_check_header(&nvlhdr)) @@ -1298,7 +1298,7 @@ nvlist_recv(int sock, int flags) ret = NULL; fds = NULL; - if (buf_recv(sock, buf + sizeof(nvlhdr), size - sizeof(nvlhdr)) == -1) + if (buf_recv(sock, buf + sizeof(nvlhdr), size - sizeof(nvlhdr), 0) == -1) goto out; if (nfds > 0) {