diff options
author | Jean Delvare <jdelvare@suse.de> | 2015-11-02 09:45:26 +0100 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2015-11-02 09:45:26 +0100 |
commit | de9a74e1c60210bee229fcf55b1678a99d1b44dd (patch) | |
tree | 6075ed797d82df3624fa077f8610e95373bb8cfa /util.h | |
parent | 2330b708a6d57fd2b8b7e353dd64d037f980a042 (diff) | |
download | dmidecode-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.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |