Clean up error output for extended attributes in fsck_ffs(8).

MFC after:    1 week
Sponsored by: The FreeBSD Foundation
This commit is contained in:
Kirk McKusick 2022-11-07 14:31:59 -08:00
parent 118cfb829f
commit f515a279f7

View File

@ -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]);