215-magic-update-linuxext.dpatch 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #!/bin/sh /usr/share/dpatch/dpatch-run
  2. ## 215-magic-update-linuxext.dpatch by Russell Coker <russell@coker.com.au>
  3. ##
  4. ## DP: Adding volume label and UUID support for linux ext (Closes: #489865).
  5. @DPATCH@
  6. diff -Naurp file.orig/magic/Magdir/filesystems file/magic/Magdir/filesystems
  7. --- file.orig/magic/Magdir/filesystems 2008-07-02 13:47:23.000000000 +0000
  8. +++ file/magic/Magdir/filesystems 2008-07-15 14:21:39.000000000 +0000
  9. @@ -1027,6 +1027,8 @@
  10. # ext2/ext3 filesystems - Andreas Dilger <adilger@dilger.ca>
  11. # ext4 filesystem - Eric Sandeen <sandeen@sandeen.net>
  12. +# volume label and UUID Russell Coker
  13. +# http://etbe.coker.com.au/2008/07/08/label-vs-uuid-vs-device/
  14. 0x438 leshort 0xEF53 Linux
  15. >0x44c lelong x rev %d
  16. >0x43e leshort x \b.%d
  17. @@ -1042,25 +1044,32 @@
  18. # else large RO_COMPAT?
  19. >>>0x464 lelong >0x0000007 ext4 filesystem data
  20. # else large INCOMPAT?
  21. ->>0x460 lelong >0x000003f ext4 filesystem data
  22. +>>0x460 lelong >0x000003f ext4 filesystem data
  23. +>0x468 belong x \b, UUID=%x
  24. +>0x46c beshort x \b-%x
  25. +>0x46e beshort x \b-%x
  26. +>0x470 beshort x \b-%x
  27. +>0x472 belong x \b-%x
  28. +>0x476 beshort x \b%x
  29. +>0x478 string >0 \b, volume name "%s"
  30. # General flags for any ext* fs
  31. ->0x460 lelong &0x0000004 (needs journal recovery)
  32. ->0x43a leshort &0x0000002 (errors)
  33. +>0x460 lelong &0x0000004 (needs journal recovery)
  34. +>0x43a leshort &0x0000002 (errors)
  35. # INCOMPAT flags
  36. ->0x460 lelong &0x0000001 (compressed)
  37. -#>0x460 lelong &0x0000002 (filetype)
  38. -#>0x460 lelong &0x0000010 (meta bg)
  39. ->0x460 lelong &0x0000040 (extents)
  40. ->0x460 lelong &0x0000080 (64bit)
  41. -#>0x460 lelong &0x0000100 (mmp)
  42. -#>0x460 lelong &0x0000200 (flex bg)
  43. +>0x460 lelong &0x0000001 (compressed)
  44. +#>0x460 lelong &0x0000002 (filetype)
  45. +#>0x460 lelong &0x0000010 (meta bg)
  46. +>0x460 lelong &0x0000040 (extents)
  47. +>0x460 lelong &0x0000080 (64bit)
  48. +#>0x460 lelong &0x0000100 (mmp)
  49. +#>0x460 lelong &0x0000200 (flex bg)
  50. # RO_INCOMPAT flags
  51. -#>0x464 lelong &0x0000001 (sparse super)
  52. ->0x464 lelong &0x0000002 (large files)
  53. ->0x464 lelong &0x0000008 (huge files)
  54. -#>0x464 lelong &0x0000010 (gdt checksum)
  55. -#>0x464 lelong &0x0000020 (many subdirs)
  56. -#>0x463 lelong &0x0000040 (extra isize)
  57. +#>0x464 lelong &0x0000001 (sparse super)
  58. +>0x464 lelong &0x0000002 (large files)
  59. +>0x464 lelong &0x0000008 (huge files)
  60. +#>0x464 lelong &0x0000010 (gdt checksum)
  61. +#>0x464 lelong &0x0000020 (many subdirs)
  62. +#>0x463 lelong &0x0000040 (extra isize)
  63. # SGI disk labels - Nathan Scott <nathans@debian.org>
  64. 0 belong 0x0BE5A941 SGI disk label (volume header)