memzap

replay memory writes
git clone git://git.2f30.org/memzap.git
Log | Files | Refs | README | LICENSE

commit 22672f381155b7d73819a0adadcfbab1b10070e6
parent 8a3a0a424a357b36f0aed1fe607785e673993197
Author: sin <sin@2f30.org>
Date:   Mon Mar  4 13:19:08 +0000

mdiffdump: Stylistic changes

Diffstat:
mdiffdump.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/mdiffdump.c b/mdiffdump.c @@ -20,11 +20,13 @@ main(int argc, char *argv[]) hdr = parse_mdiff_hdr(fd); if (!hdr) errx(1, "%s: failed to parse mdiff", argv[1]); + printf("endianness: %s\n", hdr->endianness ? "big endian" : "little endian"); printf("version: %hhu\n", hdr->version); printf("blksize: %lu\n", (unsigned long)hdr->blksize); printf("nregions: %lu\n", (unsigned long)hdr->nregions); + for (i = 0; i < hdr->nregions; i++) { mdiff = mdiff_read_diff(fd, hdr, i); printf("offset: %lu\n", (unsigned long)mdiff->offset); @@ -36,6 +38,7 @@ main(int argc, char *argv[]) putchar('\n'); free_mdiff_region(mdiff); } + close_mdiff(fd); return 0; }