214-magic-update-linuxswap.dpatch 1.4 KB

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