244-magic-add-jfs.patch 1.2 KB

1234567891011121314151617181920212223242526
  1. Author: Adam Buchbinder <adam.buchbinder@gmail.com>
  2. Description: Adding new magic for JFS filesystem images (Closes: #589067).
  3. diff -Naurp file.orig//magic/Magdir/filesystems file/magic/Magdir/filesystems
  4. --- file.orig//magic/Magdir/filesystems 2010-07-14 19:53:22.762672355 +0200
  5. +++ file/magic/Magdir/filesystems 2010-07-14 19:54:33.318672139 +0200
  6. @@ -1523,3 +1523,19 @@
  7. # From: Daniel Novotny <dnovotny@redhat.com>
  8. 0 string DISO Delta ISO data,
  9. >4 belong x version %d
  10. +
  11. +# JFS2 (Journaling File System) image. (Old JFS1 has superblock at 0x1000.)
  12. +# See linux/fs/jfs/jfs_superblock.h for layout; see jfs_filsys.h for flags.
  13. +# From: Adam Buchbinder <adam.buchbinder@gmail.com>
  14. +0x8000 string JFS1
  15. +# Because it's text-only magic, check a binary value (version) to be sure.
  16. +# Should always be 2, but mkfs.jfs writes it as 1. Needs to be 2 or 1 to be
  17. +# mountable.
  18. +>&0 lelong <3 JFS2 filesystem image
  19. +# Label is followed by a UUID; we have to limit string length to avoid
  20. +# appending the UUID in the case of a 16-byte label.
  21. +>>&144 regex [\x20-\x7E]{1,16} (label "%s")
  22. +>>&0 lequad x \b, %lld blocks
  23. +>>&8 lelong x \b, blocksize %d
  24. +>>&32 lelong&0x00000006 >0 (dirty)
  25. +>>&36 lelong >0 (compressed)