diff --git a/include/cmp_io.h b/include/cmp_io.h index c9bc953d8f172858c328b7b2ef43699203d42296..15c93f95f9ff2200d84d1237f64c0bbcd301a173 100644 --- a/include/cmp_io.h +++ b/include/cmp_io.h @@ -42,8 +42,6 @@ ssize_t read_file_data(const char *file_name, enum cmp_data_type data_type, void *buf, uint32_t buf_size, int flags); ssize_t read_file_cmp_entity(const char *file_name, struct cmp_entity *ent, uint32_t ent_size, int flags); -ssize_t read_file32(const char *file_name, uint32_t *buf, uint32_t buf_size, - int verbose_en); uint32_t cmp_tool_gen_version_id(const char *version); diff --git a/lib/cmp_io.c b/lib/cmp_io.c index df96e7009c56eedea053ed6418be3ba92c66e3b3..f8a4883fb2d5a765ec896a16595d95d453ff01fe 100644 --- a/lib/cmp_io.c +++ b/lib/cmp_io.c @@ -145,7 +145,7 @@ static FILE *open_file(const char *dirname, const char *filename) abort(); } - return fopen(pathname, "w"); + return fopen(pathname, "wb"); } @@ -1208,7 +1208,7 @@ static __inline uint8_t str_to_uint8(const char *str, char const **str_end) * @returns the size in bytes to store the string content; negative on error */ -static ssize_t __inline str2uint8_arr(const char *str, uint8_t *data, uint32_t buf_size, +static __inline ssize_t str2uint8_arr(const char *str, uint8_t *data, uint32_t buf_size, const char *file_name, int verbose_en) { const char *nptr = str;