summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/mrc_cache/mrc_cache.c8
-rw-r--r--src/include/mrc_cache.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/drivers/mrc_cache/mrc_cache.c b/src/drivers/mrc_cache/mrc_cache.c
index d2991ac917..a083655a2f 100644
--- a/src/drivers/mrc_cache/mrc_cache.c
+++ b/src/drivers/mrc_cache/mrc_cache.c
@@ -260,12 +260,12 @@ static int mrc_cache_find_current(int type, uint32_t version,
return rdev_chain(rdev, rdev, md_size, data_size);
}
-int mrc_cache_load_current(int type, uint32_t version, void *buffer,
- size_t buffer_size)
+ssize_t mrc_cache_load_current(int type, uint32_t version, void *buffer,
+ size_t buffer_size)
{
struct region_device rdev;
struct mrc_metadata md;
- size_t data_size;
+ ssize_t data_size;
if (mrc_cache_find_current(type, version, &rdev, &md) < 0)
return -1;
@@ -280,7 +280,7 @@ int mrc_cache_load_current(int type, uint32_t version, void *buffer,
if (mrc_data_valid(&md, buffer, data_size) < 0)
return -1;
- return 0;
+ return data_size;
}
void *mrc_cache_current_mmap_leak(int type, uint32_t version,
diff --git a/src/include/mrc_cache.h b/src/include/mrc_cache.h
index da2bf793d3..f1e6b52010 100644
--- a/src/include/mrc_cache.h
+++ b/src/include/mrc_cache.h
@@ -27,11 +27,11 @@ enum {
* mrc_cache_load_current
*
* Fill in the buffer with the latest slot data. This will be a
- * common entry point for ARM platforms. Returns < 0 on error, 0 on
- * success.
+ * common entry point for ARM platforms. Returns < 0 on error, size
+ * of the returned data on success.
*/
-int mrc_cache_load_current(int type, uint32_t version, void *buffer,
- size_t buffer_size);
+ssize_t mrc_cache_load_current(int type, uint32_t version, void *buffer,
+ size_t buffer_size);
/**
* mrc_cache_mmap_leak
*