fileio: improve API types
Use size_t instead of uint32_t when specifying file sizes. Update all consumers up through the layers to use size_t when required. These changes should be safe, but the higher-levels will need to be updated further to receive the intended benefits (i.e. large file support). Add error checking for fileio_read and file_write. Previously, all errors were being silently ignored, so this change might cause some problems for some people in some cases. However, it gives us the chance to handle any errors that do occur at higher-levels, rather than burying our heads in the sand.
This commit is contained in:
@@ -2557,7 +2557,7 @@ static int xscale_read_instruction(struct target *target,
|
||||
struct xscale_common *xscale = target_to_xscale(target);
|
||||
int i;
|
||||
int section = -1;
|
||||
uint32_t size_read;
|
||||
size_t size_read;
|
||||
uint32_t opcode;
|
||||
int retval;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user