112-magic-update-linuxswap.patch 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. Author: Russell Coker <russell@coker.com.au>
  2. Description: Adding volume label and UUID support for linux swap (Closes: #489865).
  3. diff -Naurp file.orig/magic/Magdir/linux file/magic/Magdir/linux
  4. --- file.orig/magic/Magdir/linux 2008-06-04 18:02:25.000000000 +0000
  5. +++ file/magic/Magdir/linux 2008-07-15 14:16:43.000000000 +0000
  6. @@ -56,11 +56,19 @@
  7. # Linux swap file with swsusp1 image, from Jeff Bailey <jbailey@ubuntu.com>
  8. 4076 string SWAPSPACE2S1SUSPEND Linux/i386 swap file (new style) with SWSUSP1 image
  9. # according to man page of mkswap (8) March 1999
  10. -4086 string SWAPSPACE2 Linux/i386 swap file (new style)
  11. ->0x400 long x %d (4K pages)
  12. ->0x404 long x size %d pages
  13. ->>4086 string SWAPSPACE2
  14. ->>>1052 string >\0 Label %s
  15. +# volume label and UUID Russell Coker
  16. +# http://etbe.coker.com.au/2008/07/08/label-vs-uuid-vs-device/
  17. +4086 string SWAPSPACE2 Linux/i386 swap file (new style),
  18. +>0x400 long x version %d (4K pages),
  19. +>0x404 long x size %d pages,
  20. +>1052 string \0 no label,
  21. +>1052 string >\0 LABEL=%s,
  22. +>0x40c belong x UUID=%08x
  23. +>0x410 beshort x \b-%04x
  24. +>0x412 beshort x \b-%04x
  25. +>0x414 beshort x \b-%04x
  26. +>0x416 belong x \b-%08x
  27. +>0x41a beshort x \b%04x
  28. # ECOFF magic for OSF/1 and Linux (only tested under Linux though)
  29. #
  30. # from Erik Troan (ewt@redhat.com) examining od dumps, so this