0181-scripts-knlinfo-Decode-DDTK-atom.patch 801 B

12345678910111213141516171819202122232425262728293031
  1. From 6aa589e510033a1876471f6aa0dbbd4626d46da3 Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Fri, 29 May 2015 11:18:58 +0100
  4. Subject: [PATCH] scripts/knlinfo: Decode DDTK atom
  5. Show the DDTK atom as being a boolean.
  6. Signed-off-by: Phil Elwell <phil@raspberrypi.org>
  7. ---
  8. scripts/knlinfo | 3 ++-
  9. 1 file changed, 2 insertions(+), 1 deletion(-)
  10. --- a/scripts/knlinfo
  11. +++ b/scripts/knlinfo
  12. @@ -16,6 +16,7 @@ my $trailer_magic = 'RPTL';
  13. my %atom_formats =
  14. (
  15. + 'DDTK' => \&format_bool,
  16. 'DTOK' => \&format_bool,
  17. 'KVer' => \&format_string,
  18. '270X' => \&format_bool,
  19. @@ -148,7 +149,7 @@ sub format_atom
  20. sub format_bool
  21. {
  22. my ($data) = @_;
  23. - return unpack('V', $data) ? 'true' : 'false';
  24. + return unpack('V', $data) ? 'y' : 'n';
  25. }
  26. sub format_int