[File] [PATCH] bcachefs: add support for new magic

Thomas Weißschuh thomas at t-8ch.de
Fri Feb 10 05:47:29 UTC 2023


---
 magic/Magdir/filesystems |  30 ++++++++++++++++++------------
 tests/bcachefs2.result   |   1 +
 tests/bcachefs2.testfile | Bin 0 -> 8192 bytes
 3 files changed, 19 insertions(+), 12 deletions(-)
 create mode 100644 tests/bcachefs2.result
 create mode 100644 tests/bcachefs2.testfile

diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems
index 0213bed5cd9d..f0e46ca4fadf 100644
--- a/magic/Magdir/filesystems
+++ b/magic/Magdir/filesystems
@@ -2603,19 +2603,25 @@
 >10	ubelong		x	\b-%08x
 >14	ubeshort	x	\b%04x
 
-0x1018		string		\xc6\x85\x73\xf6\x4e\x1a\x45\xca\x82\x65\xf5\x7f\x48\xba\x6d\x81	bcachefs
->0x1068		lequad		8	\b, UUID=
->>0x1038	use		bcachefs-uuid
->>0x1048	string		>0	\b, label "%.32s"
->>0x1010	uleshort	x	\b, version %u
->>0x1012	uleshort	x	\b, min version %u
->>0x107a	byte		x	\b, device %d
+0	name	bcachefs	bcachefs
+>0x68	lequad		8	\b, UUID=
+>>0x38	use		bcachefs-uuid
+>>0x48	string		>0	\b, label "%.32s"
+>>0x10	uleshort	x	\b, version %u
+>>0x12	uleshort	x	\b, min version %u
+>>0x7a	byte		x	\b, device %d
 # assumes the first field is the members field
->>0x12f4	ulelong		0x01	\b/UUID=
->>>0x12f0	default		x
->>>&(0x107a.b*56)	use	bcachefs-uuid
->>0x107b	byte		x	\b, %d devices
->>0x1090	byte		^0x02	\b (unclean)
+>>0x2f4	ulelong		0x01	\b/UUID=
+>>>0x2f0	default		x
+>>>&(0x07a.b*56)	use	bcachefs-uuid
+>>0x07b	byte		x	\b, %d devices
+>>0x090	byte		^0x02	\b (unclean)
+
+0x1018		string		\xc6\x85\x73\xf6\x4e\x1a\x45\xca\x82\x65\xf5\x7f\x48\xba\x6d\x81
+>0x1000		use		bcachefs
+
+0x1018          string          \xc6\x85\x73\xf6\x66\xce\x90\xa9\xd9\x6a\x60\xcf\x80\x3d\xf7\xef
+>0x1000		use		bcachefs
 
 # EROFS
 # https://kernel.googlesource.com/pub/scm/linux/kernel/git/xiang/erofs-utils/\
diff --git a/tests/bcachefs2.result b/tests/bcachefs2.result
new file mode 100644
index 000000000000..9ebf64bb55bc
--- /dev/null
+++ b/tests/bcachefs2.result
@@ -0,0 +1 @@
+bcachefs, UUID=4fa11b1e-75e6-4210-9167-34e1769c0fe1, label "Label", version 26, min version 26, device 0/UUID=0a3643b7-c515-47f8-a0ea-91fc38d043d1, 1 devices (unclean)
\ No newline at end of file
diff --git a/tests/bcachefs2.testfile b/tests/bcachefs2.testfile
new file mode 100644
index 0000000000000000000000000000000000000000..3391822a79a48217c1e0dd73287070afc9e9579e
GIT binary patch
literal 8192
zcmZQz7zLvtFd71*Aut*OqaiRF0;3@?8UmvsFd71*Aut*OBOwHiwHAL%J2zqF&8&p;
z4YuFkGjKD5z0CphJQtK90TURdhjR!>F-U>Ehn_Bu&UV*7TIlVt`M};cGk&@p_FpJ1
zSNhCJU}Cz-!?HR24}B7oQgiSG3_LwS)i5$JFoMLmx#wQ>i*ynP2?NDIq74j!f{aWD
z1;Jd95EK~v0y0v77+nIU07N(JVn^m;u+jZBn%*&jXjlt?(i|xLaG5!8KPu|}W5KJ5
ze=IIIUvz-`x&h9DF!&VE1V*`|Aut*OqaiRF0;3@?8UmvsFd71*Aut*OqaiRPLjVAj
CnL)q+

literal 0
HcmV?d00001

-- 
2.39.1



More information about the File mailing list