MIPS: convert CONFIG_SYS_MIPS_TIMER_FREQ to Kconfig
[platform/kernel/u-boot.git] / include / hexdump.h
index 62fce7a..f2ca479 100644 (file)
@@ -85,7 +85,7 @@ static inline char *bin2hex(char *dst, const void *src, size_t count)
  * hex_dump_to_buffer - convert a blob of data to "hex ASCII" in memory
  * @buf: data blob to dump
  * @len: number of bytes in the @buf
- * @rowsize: number of bytes to print per line; must be 16 or 32
+ * @rowsize: number of bytes to print per line; max 64
  * @groupsize: number of bytes to print at a time (1, 2, 4, 8; default = 1)
  * @linebuf: where to put the converted data
  * @linebuflen: total size of @linebuf, including space for terminating NUL
@@ -120,11 +120,13 @@ int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize,
  *  caller supplies trailing spaces for alignment if desired
  * @prefix_type: controls whether prefix of an offset, address, or none
  *  is printed (see enum dump_prefix_t)
- * @rowsize: number of bytes to print per line; must be 16 or 32
+ * @rowsize: number of bytes to print per line; max 64
  * @groupsize: number of bytes to print at a time (1, 2, 4, 8; default = 1)
  * @buf: data blob to dump
  * @len: number of bytes in the @buf
  * @ascii: include ASCII after the hex output
+ * Returns: 0 if finished normally, -EINTR if Ctrl-C was pressed, -ENOSYS if not
+ * supported
  *
  * Given a buffer of u8 data, print_hex_dump() prints a hex + ASCII dump
  * to the stdio, with an optional leading prefix.
@@ -143,8 +145,8 @@ int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize,
  * Example output using %DUMP_PREFIX_ADDRESS and 4-byte mode:
  * ffffffff88089af0: 73727170 77767574 7b7a7978 7f7e7d7c  pqrstuvwxyz{|}~.
  */
-void print_hex_dump(const char *prefix_str, int prefix_type, int rowsize,
-                   int groupsize, const void *buf, size_t len, bool ascii);
+int print_hex_dump(const char *prefix_str, int prefix_type, int rowsize,
+                  int groupsize, const void *buf, size_t len, bool ascii);
 
 /**
  * print_hex_dump_bytes - shorthand form of print_hex_dump() with default params