aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsck_ffs/ea.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/fsck_ffs/ea.c')
-rw-r--r--sbin/fsck_ffs/ea.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sbin/fsck_ffs/ea.c b/sbin/fsck_ffs/ea.c
index 54353005bdc0..f6ebc5c072fc 100644
--- a/sbin/fsck_ffs/ea.c
+++ b/sbin/fsck_ffs/ea.c
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-3-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 2002 Poul-Henning Kamp
* Copyright (c) 2002 Networks Associates Technology, Inc.
@@ -35,9 +35,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <sys/param.h>
#include <sys/time.h>
#include <sys/stdint.h>
@@ -61,10 +58,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 +70,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]);