git: 43378dc6f882 - stable/13 - Clean up error output for extended attributes in fsck_ffs(8).
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 04 Dec 2022 06:53:57 UTC
The branch stable/13 has been updated by mckusick:
URL: https://cgit.FreeBSD.org/src/commit/?id=43378dc6f8820e1479f1e206493b9f16d2dbc60a
commit 43378dc6f8820e1479f1e206493b9f16d2dbc60a
Author: Kirk McKusick <mckusick@FreeBSD.org>
AuthorDate: 2022-11-07 22:31:59 +0000
Commit: Kirk McKusick <mckusick@FreeBSD.org>
CommitDate: 2022-12-04 06:18:13 +0000
Clean up error output for extended attributes in fsck_ffs(8).
(cherry picked from commit f515a279f7200fb69763fedd716b1a5e32e2cae9)
Sponsored by: The FreeBSD Foundation
---
sbin/fsck_ffs/ea.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sbin/fsck_ffs/ea.c b/sbin/fsck_ffs/ea.c
index 54353005bdc0..f46d883e12ad 100644
--- a/sbin/fsck_ffs/ea.c
+++ b/sbin/fsck_ffs/ea.c
@@ -61,10 +61,9 @@ eascan(struct inodesc *idesc, struct ufs2_dinode *dp)
return (0);
#else
struct bufarea *bp;
- u_int dsize, n;
+ u_int n;
u_char *cp;
long blksiz;
- char dbuf[DIRBLKSIZ];
printf("Inode %ju extsize %ju\n",
(intmax_t)idesc->id_number, (uintmax_t)dp->di_extsize);
@@ -74,8 +73,10 @@ eascan(struct inodesc *idesc, struct ufs2_dinode *dp)
blksiz = sblock.fs_fsize;
else
blksiz = sblock.fs_bsize;
- printf("blksiz = %ju\n", (intmax_t)blksiz);
bp = getdatablk(dp->di_extb[0], blksiz, BT_EXTATTR);
+ if (bp->b_errs)
+ return (STOP);
+ printf("blksiz = %ju\n", (intmax_t)blksiz);
cp = (u_char *)bp->b_un.b_buf;
for (n = 0; n < blksiz; n++) {
printf("%02x", cp[n]);