summaryrefslogtreecommitdiff
path: root/sbin/dump
diff options
context:
space:
mode:
authorchs <chs@NetBSD.org>2022-11-17 06:40:38 +0000
committerchs <chs@NetBSD.org>2022-11-17 06:40:38 +0000
commitfc045a9d183f85bd23de76a1f7fd30f941ccc178 (patch)
tree5404f15a8224e3aad20068954d19c826a62f850e /sbin/dump
parentf281a463874081e49743e76f8c259f85052d3627 (diff)
Restore backward compatibility of UFS2 with previous NetBSD releases by
disabling support in UFS2 for extended attributes (including ACLs). Add a new variant of UFS2 called "UFS2ea" that does support extended attributes. Add new fsck_ffs operations "-c ea" and "-c no-ea" to convert file systems from UFS2 to UFS2ea and vice-versa (both of which delete all existing extended attributes in the process).
Diffstat (limited to 'sbin/dump')
-rw-r--r--sbin/dump/ffs_inode.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sbin/dump/ffs_inode.c b/sbin/dump/ffs_inode.c
index 42b25f255b2..d5b8b021377 100644
--- a/sbin/dump/ffs_inode.c
+++ b/sbin/dump/ffs_inode.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_inode.c,v 1.23 2019/03/01 16:42:11 christos Exp $ */
+/* $NetBSD: ffs_inode.c,v 1.24 2022/11/17 06:40:38 chs Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1991, 1993, 1994\
#endif /* not lint */
#ifndef lint
-__RCSID("$NetBSD: ffs_inode.c,v 1.23 2019/03/01 16:42:11 christos Exp $");
+__RCSID("$NetBSD: ffs_inode.c,v 1.24 2022/11/17 06:40:38 chs Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -83,11 +83,17 @@ fs_read_sblock(char *superblock)
rawread(sblock_try[i], (char *)superblock, MAXBSIZE);
switch(sblock->fs_magic) {
+ case FS_UFS2EA_MAGIC:
+ sblock->fs_magic = FS_UFS2_MAGIC;
+ /*FALLTHROUGH*/
case FS_UFS2_MAGIC:
is_ufs2 = 1;
/*FALLTHROUGH*/
case FS_UFS1_MAGIC:
break;
+ case FS_UFS2EA_MAGIC_SWAPPED:
+ sblock->fs_magic = FS_UFS2_MAGIC_SWAPPED;
+ /*FALLTHROUGH*/
case FS_UFS2_MAGIC_SWAPPED:
is_ufs2 = 1;
/*FALLTHROUGH*/