From nobody Fri Apr 28 19:37:40 2023 X-Original-To: dev-commits-src-main@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 4Q7NDP0pGcz47sZj; Fri, 28 Apr 2023 19:37:41 +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 4Q7NDP0DKCz3FZR; Fri, 28 Apr 2023 19:37:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682710661; 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=/JOss1wlP2iQLIQaLnMydBUu0CHF5bJcfzyj4Tq+j/U=; b=wsfECEZCKreFuAPEiwfz28eWd8XMHSpIWYgnxBUwBTnkBlKXfV0TulewMvP00hJ472EzaY atgKd2F4tG6s+p+ILXOIhsADLAo93cVfvGgGCHp/JUJ6nV24acyyLa7hJJJJjV99tE2IQQ 4882cOS1ec5RH/NmKq+nB1cXnJgqoLQxmvD9JltEanjR+ShAZmg3vSyitM9uOnV7BIjE44 4jGSpCE3JxVA8nM7XXPl2SnSXFO+pB2qunTkNdbOGzQWjBwJe4JheuRfOuO3UPSrfe/AmA uygMtuUaqMbuWf+v8YR29gPoGltQGWGNIju5BSNfeaB+q8w/Pgxm0Ynt1Gh9Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682710661; 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=/JOss1wlP2iQLIQaLnMydBUu0CHF5bJcfzyj4Tq+j/U=; b=tpI8rX0XSKz8ltEgnsUwRMaZzrCc+TYLR/RppD41cb//WajUPgNZQLjWWT/0G7cvEaFZSQ BZS4md+wUpVSdyjloUf68rj0qIGyzrp3rpPgF8fo2l1YfhJ76KgMtZib4G7y04wbesn+ZJ w6HuNkYKZ0amEUuAfe9AsSETgLYc7N836kgNV2KOS/XZ2TDF8k0vx95c+1xFpdBqKohp8d NEx9QrDO5uTg1O7FROMP7x6Qq2iVvD0joggqQqe8wbU6sEDgFNeuVToq4jQdz9Vs3sy20N 90+9zxmt8aXF+GFR4KkuQjwLFX5qiIyq6+JKTYwdWVcNIos3DpJfxYF1bF3I7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682710661; a=rsa-sha256; cv=none; b=gh1L8maivMCTs8ZqOm+/AgpIZdb022fY8zBnbiFfBjJm+pKQDAcMTR3MwKtlYcfzt8+Lmw gpZesYJBNu8sZL2NRRpgtOQcmw+rjUwNLSAjWngmWIdMNFfKJE1ka/ngZ3huC83rRCDnhT 0thdX/FxIe05qZK1IwwmBP+dIeiegCb9M9BmPzXQFb+p415RschVrItgzRVzVjTRVHdGQg JBWV//lc0cIWW0Wv+bNzlIDu2d+Gp0kZ9KJMm+Y9M/lCojdOtWavnAT14uSYcafqOcEZf/ YSsGSxz08efz71C9MqHr84AlQkxIHO+qk0T7XnOCKVMPfz8FvLMF0btgPvm8Mw== 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 4Q7NDN61LGz1B8Z; Fri, 28 Apr 2023 19:37:40 +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 33SJbeNw075089; Fri, 28 Apr 2023 19:37:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33SJbeAC075088; Fri, 28 Apr 2023 19:37:40 GMT (envelope-from git) Date: Fri, 28 Apr 2023 19:37:40 GMT Message-Id: <202304281937.33SJbeAC075088@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: c21d87a88c72 - main - vfs: vn_dir_next_dirent(): Adapt comments to style(9) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c21d87a88c72804bc4fb86d7b0e8a846230e4ad0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c21d87a88c72804bc4fb86d7b0e8a846230e4ad0 commit c21d87a88c72804bc4fb86d7b0e8a846230e4ad0 Author: Olivier Certner AuthorDate: 2023-04-28 09:04:16 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-28 19:37:35 +0000 vfs: vn_dir_next_dirent(): Adapt comments to style(9) No functional change. Reviewed by: kib MFC after: 1 week --- sys/kern/vfs_vnops.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 415ed158b5a3..d2b1a9b0570b 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3746,33 +3746,33 @@ _Static_assert(_GENERIC_MAXDIRSIZ == sizeof(struct dirent), "(see _GENERIC_DIRLEN())"); /* - * Returns successive directory entries through some caller's provided buffer + * Returns successive directory entries through some caller's provided buffer. * * This function automatically refills the provided buffer with calls to * VOP_READDIR() (after MAC permission checks). * - * 'td' is used for credentials and passed to uiomove(). 'dirbuf' is the - * caller's buffer to fill and 'dirbuflen' its allocated size. 'dirbuf' must be - * properly aligned to access 'struct dirent' structures and 'dirbuflen' must - * be greater than GENERIC_MAXDIRSIZ to avoid VOP_READDIR() returning EINVAL - * (the latter is not a strong guarantee (yet); but EINVAL will always be - * returned if this requirement is not verified). '*dpp' points to the current - * directory entry in the buffer and '*len' contains the remaining valid bytes - * in 'dirbuf' after 'dpp' (including the pointed entry). + * 'td' is used for credentials and passed to uiomove(). 'dirbuf' is the + * caller's buffer to fill and 'dirbuflen' its allocated size. 'dirbuf' must + * be properly aligned to access 'struct dirent' structures and 'dirbuflen' + * must be greater than GENERIC_MAXDIRSIZ to avoid VOP_READDIR() returning + * EINVAL (the latter is not a strong guarantee (yet); but EINVAL will always + * be returned if this requirement is not verified). '*dpp' points to the + * current directory entry in the buffer and '*len' contains the remaining + * valid bytes in 'dirbuf' after 'dpp' (including the pointed entry). * * At first call (or when restarting the read), '*len' must have been set to 0, - * '*off' to 0 (or any valid start offset) and '*eofflag' to 0. There are no - * more entries as soon as '*len' is 0 after a call that returned 0. Calling + * '*off' to 0 (or any valid start offset) and '*eofflag' to 0. There are no + * more entries as soon as '*len' is 0 after a call that returned 0. Calling * again this function after such a condition is considered an error and EINVAL - * will be returned. Other possible error codes are those of VOP_READDIR(), + * will be returned. Other possible error codes are those of VOP_READDIR(), * EINTEGRITY if the returned entries do not pass coherency tests, or EINVAL - * (bad call). All errors are unrecoverable, i.e., the state ('*len', '*off' - * and '*eofflag') must be re-initialized before a subsequent call. On error or - * at end of directory, '*dpp' is reset to NULL. + * (bad call). All errors are unrecoverable, i.e., the state ('*len', '*off' + * and '*eofflag') must be re-initialized before a subsequent call. On error + * or at end of directory, '*dpp' is reset to NULL. * * '*len', '*off' and '*eofflag' are internal state the caller should not - * tamper with except as explained above. '*off' is the next directory offset - * to read from to refill the buffer. '*eofflag' is set to 0 or 1 by the last + * tamper with except as explained above. '*off' is the next directory offset + * to read from to refill the buffer. '*eofflag' is set to 0 or 1 by the last * internal call to VOP_READDIR() that returned without error, indicating * whether it reached the end of the directory, and to 2 by this function after * all entries have been read. @@ -3804,7 +3804,7 @@ vn_dir_next_dirent(struct vnode *vp, struct thread *td, /* * The caller continued to call us after an error (we set dp to - * NULL in a previous iteration). Bail out right now. + * NULL in a previous iteration). Bail out right now. */ if (__predict_false(dp == NULL)) return (EINVAL);