1. 09 Sep, 2017 1 commit
  2. 07 Nov, 2015 1 commit
  3. 17 Jul, 2015 1 commit
  4. 13 Feb, 2015 3 commits
  5. 16 Sep, 2014 1 commit
  6. 20 Sep, 2013 1 commit
  7. 17 Jan, 2013 1 commit
  8. 07 Mar, 2012 1 commit
  9. 21 Sep, 2011 1 commit
    • Mimi Zohar's avatar
      lib: add error checking to hex2bin · b7804983
      Mimi Zohar authored
      hex2bin converts a hexadecimal string to its binary representation.
      The original version of hex2bin did not do any error checking.  This
      patch adds error checking and returns the result.
      
      Changelog v1:
      - removed unpack_hex_byte()
      - changed return code from boolean to int
      
      Changelog:
      - use the new unpack_hex_byte()
      - add __must_check compiler option (Andy Shevchenko's suggestion)
      - change function API to return error checking result
        (based on Tetsuo Handa's initial patch)
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      Acked-by: Andy Shevchenko's avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      b7804983
  10. 13 Jan, 2011 1 commit
  11. 28 Nov, 2010 1 commit
  12. 25 May, 2010 2 commits
  13. 17 Jun, 2009 1 commit
  14. 15 May, 2008 1 commit
  15. 29 Nov, 2007 1 commit
  16. 11 Aug, 2007 1 commit
  17. 09 Aug, 2007 1 commit
  18. 09 Jun, 2007 1 commit
    • Randy Dunlap's avatar
      hexdump: more output formatting · c7909234
      Randy Dunlap authored
      Add a prefix string parameter.  Callers are responsible for any string
      length/alignment that they want to see in the output.  I.e., callers should
      pad strings to achieve alignment if they want that.
      
      Add rowsize parameter.  This is the number of raw data bytes to be printed
      per line.  Must be 16 or 32.
      
      Add a groupsize parameter.  This allows callers to dump values as 1-byte,
      2-byte, 4-byte, or 8-byte numbers.  Default is 1-byte numbers.  If the
      total length is not an even multiple of groupsize, 1-byte numbers are
      printed.
      
      Add an "ascii" output parameter.  This causes ASCII data output following
      the hex data output.
      
      Clean up some doc examples.
      
      Align the ASCII output on all lines that are produced by one call.
      
      Add a new interface, print_hex_dump_bytes(), that is a shortcut to
      print_hex_dump(), using default parameter values to print 16 bytes in
      byte-size chunks of hex + ASCII output, using printk level KERN_DEBUG.
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Christoph Lameter <clameter@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c7909234
  19. 11 May, 2007 1 commit
    • Randy Dunlap's avatar
      lib/hexdump · 99eaf3c4
      Randy Dunlap authored
      Based on ace_dump_mem() from Grant Likely for the Xilinx SystemACE
      CompactFlash interface.
      
      Add print_hex_dump() & hex_dumper() to lib/hexdump.c and linux/kernel.h.
      
      This patch adds the functions print_hex_dump() & hex_dumper().
      print_hex_dump() can be used to perform a hex + ASCII dump of data to
      syslog, in an easily viewable format, thus providing a common text hex dump
      format.
      
      hex_dumper() provides a dump-to-memory function.  It converts one "line" of
      output (16 bytes of input) at a time.
      
      Example usages:
      	print_hex_dump(KERN_DEBUG, DUMP_PREFIX_ADDRESS, frame->data, frame->len);
      	hex_dumper(frame->data, frame->len, linebuf, sizeof(linebuf));
      
      Example output using %DUMP_PREFIX_OFFSET:
      0009ab42: 40414243 44454647 48494a4b 4c4d4e4f-@Abcdefg HIJKLMNO
      Example output using %DUMP_PREFIX_ADDRESS:
      ffffffff88089af0: 70717273 74757677 78797a7b 7c7d7e7f-pqrstuvw xyz{|}~.
      
      [akpm@linux-foundation.org: cleanups, add export]
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      99eaf3c4