Skip to content
Snippets Groups Projects
  1. Jun 18, 2018
  2. Jun 03, 2018
  3. May 31, 2018
  4. May 29, 2018
  5. May 26, 2018
  6. May 11, 2018
  7. May 02, 2018
  8. Apr 17, 2018
  9. Apr 10, 2018
  10. Apr 09, 2018
  11. Apr 04, 2018
  12. Mar 28, 2018
  13. Mar 23, 2018
  14. Mar 19, 2018
  15. Mar 16, 2018
  16. Mar 09, 2018
  17. Mar 05, 2018
  18. Feb 23, 2018
  19. Feb 09, 2018
  20. Feb 05, 2018
  21. Jan 28, 2018
  22. Jan 22, 2018
    • Heinrich Schuchardt's avatar
      tools: provide a tool to convert a binary file to an include · ac020196
      Heinrich Schuchardt authored
      
      For testing EFI disk management we need an in-memory image of
      a disk.
      
      The tool file2include converts a file to a C include. The file
      is separated into strings of 8 bytes. Only the non-zero strings
      are written to the include. The output format has been designed
      to maintain readability.
      
       #define EFI_ST_DISK_IMG { 0x00010000, { \
        {0x000001b8, "\x94\x37\x69\xfc\x00\x00\x00\x00"}, /* .7i..... */ \
        {0x000001c0, "\x02\x00\x83\x02\x02\x00\x01\x00"}, /* ........ */ \
        {0x000001c8, "\x00\x00\x7f\x00\x00\x00\x00\x00"}, /* ........ */ \
        {0x000001f8, "\x00\x00\x00\x00\x00\x00\x55\xaa"}, /* ......U. */ \
       ...
        {0x00006000, "\x48\x65\x6c\x6c\x6f\x20\x77\x6f"}, /* Hello wo */ \
        {0x00006008, "\x72\x6c\x64\x21\x0a\x00\x00\x00"}, /* rld!.... */ \
        {0, NULL} } }
      
      As the disk image needed for testing contains mostly zeroes a high
      compression ratio can be attained.
      
      Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
      ac020196
Loading