summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2015-11-02 09:45:26 +0100
committerJean Delvare <jdelvare@suse.de>2015-11-02 09:45:26 +0100
commitde9a74e1c60210bee229fcf55b1678a99d1b44dd (patch)
tree6075ed797d82df3624fa077f8610e95373bb8cfa /util.h
parent2330b708a6d57fd2b8b7e353dd64d037f980a042 (diff)
downloaddmidecode-git-de9a74e1c60210bee229fcf55b1678a99d1b44dd.tar.gz
Let read_file return the actual data size
Let read_file return the actual data size to the caller. This gives the caller the possibility to check that the data size is as expected and large enough for the purpose, and report to the user if not.
Diffstat (limited to 'util.h')
-rw-r--r--util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.h b/util.h
index 9d409cd..b8748f1 100644
--- a/util.h
+++ b/util.h
@@ -25,7 +25,7 @@
#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
int checksum(const u8 *buf, size_t len);
-void *read_file(size_t len, const char *filename);
+void *read_file(size_t *len, const char *filename);
void *mem_chunk(off_t base, size_t len, const char *devmem);
int write_dump(size_t base, size_t len, const void *data, const char *dumpfile, int add);
u64 u64_range(u64 start, u64 end);