Skip to content

Commit

Permalink
Rename hexdump to avoid FreeBSD libutil conflict
Browse files Browse the repository at this point in the history
On FreeBSD libutil is used for openpty(), but it also provides a hexdump()
which conflicts with QEMU's.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
emaste authored and Michael Tokarev committed May 18, 2013
1 parent 997aba8 commit 3a8ae21
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions hw/dma/pl330.c
Expand Up @@ -1157,7 +1157,7 @@ static int pl330_exec_cycle(PL330Chan *channel)
if (PL330_ERR_DEBUG > 1) {
DB_PRINT("PL330 read from memory @%08x (size = %08x):\n",
q->addr, len);
hexdump((char *)buf, stderr, "", len);
qemu_hexdump((char *)buf, stderr, "", len);
}
fifo_res = pl330_fifo_push(&s->fifo, buf, len, q->tag);
if (fifo_res == PL330_FIFO_OK) {
Expand Down Expand Up @@ -1189,7 +1189,7 @@ static int pl330_exec_cycle(PL330Chan *channel)
if (PL330_ERR_DEBUG > 1) {
DB_PRINT("PL330 read from memory @%08x (size = %08x):\n",
q->addr, len);
hexdump((char *)buf, stderr, "", len);
qemu_hexdump((char *)buf, stderr, "", len);
}
if (q->inc) {
q->addr += len;
Expand Down
2 changes: 1 addition & 1 deletion include/qemu-common.h
Expand Up @@ -443,7 +443,7 @@ int mod_utf8_codepoint(const char *s, size_t n, char **end);
* Hexdump a buffer to a file. An optional string prefix is added to every line
*/

void hexdump(const char *buf, FILE *fp, const char *prefix, size_t size);
void qemu_hexdump(const char *buf, FILE *fp, const char *prefix, size_t size);

/* vector definitions */
#ifdef __ALTIVEC__
Expand Down
2 changes: 1 addition & 1 deletion util/hexdump.c
Expand Up @@ -15,7 +15,7 @@

#include "qemu-common.h"

void hexdump(const char *buf, FILE *fp, const char *prefix, size_t size)
void qemu_hexdump(const char *buf, FILE *fp, const char *prefix, size_t size)
{
unsigned int b;

Expand Down
2 changes: 1 addition & 1 deletion util/iov.c
Expand Up @@ -225,7 +225,7 @@ void iov_hexdump(const struct iovec *iov, const unsigned int iov_cnt,
size = size > limit ? limit : size;
buf = g_malloc(size);
iov_to_buf(iov, iov_cnt, 0, buf, size);
hexdump(buf, fp, prefix, size);
qemu_hexdump(buf, fp, prefix, size);
g_free(buf);
}

Expand Down

0 comments on commit 3a8ae21

Please sign in to comment.