aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Certner <olce.freebsd@certner.fr>2023-04-28 09:04:16 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2023-05-05 06:20:58 +0000
commit21cc0c6cad6597ef696e72a8ded6fc34e977ce6f (patch)
treedbb39adacefed0e78de12474f47e289e7c9be565
parent6a53a4ff653722488379cedf4326deabbfccd749 (diff)
downloadsrc-21cc0c6cad6597ef696e72a8ded6fc34e977ce6f.tar.gz
src-21cc0c6cad6597ef696e72a8ded6fc34e977ce6f.zip
vfs: vn_dir_next_dirent(): Adapt comments to style(9)
(cherry picked from commit c21d87a88c72804bc4fb86d7b0e8a846230e4ad0)
-rw-r--r--sys/kern/vfs_vnops.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 6206c521ba48..8ad66be142b2 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -3606,33 +3606,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.
@@ -3664,7 +3664,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);