The patch is attached.

Adam Buchbinder
Author: Adam Buchbinder <[email protected]>
Description: Adding new magic for JFS filesystem images (Closes: #XXXXX).

diff -Naurp file.orig/magic/Magdir/filesystems file/magic/Magdir/filesystems
--- file.orig/magic/Magdir/filesystems.old	2010-07-14 12:08:50.000000000 -0400
+++ file/magic/Magdir/filesystems	2010-07-14 13:16:05.000000000 -0400
@@ -1490,3 +1490,19 @@
 0	string XFSM
 >0x200	string XFSB	XFS filesystem metadump image
 
+# JFS2 (Journaling File System) image. (Old JFS1 has superblock at 0x1000.)
+# See linux/fs/jfs/jfs_superblock.h for layout; see jfs_filsys.h for flags.
+# From: Adam Buchbinder <[email protected]>
+0x8000	string	JFS1
+# Because it's text-only magic, check a binary value (version) to be sure.
+# Should always be 2, but mkfs.jfs writes it as 1. Needs to be 2 or 1 to be
+# mountable.
+>&0	lelong	<3	JFS2 filesystem image
+# Label is followed by a UUID; we have to limit string length to avoid
+# appending the UUID in the case of a 16-byte label.
+>>&144	regex	[\x20-\x7E]{1,16} 	(label "%s")
+>>&0	lequad	x	\b, %lld blocks
+>>&8	lelong	x	\b, blocksize %d
+>>&32	lelong&0x00000006	>0	(dirty)
+>>&36	lelong	>0	(compressed)
+

Reply via email to