Merge "storageproxyd: Add STORAGE_FILE_GET_MAX_SIZE API on Android side" am: aa9eb7c87a am: c1d3291221
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2242480
Change-Id: I7c55b9dd39510a8fd7a39f19901559b18aaa7957
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/trusty/storage/interface/include/trusty/interface/storage.h b/trusty/storage/interface/include/trusty/interface/storage.h
index 255ade1..3291607 100644
--- a/trusty/storage/interface/include/trusty/interface/storage.h
+++ b/trusty/storage/interface/include/trusty/interface/storage.h
@@ -53,6 +53,8 @@
/* transaction support */
STORAGE_END_TRANSACTION = 9 << STORAGE_REQ_SHIFT,
+
+ STORAGE_FILE_GET_MAX_SIZE = 12 << STORAGE_REQ_SHIFT,
};
/**
@@ -184,6 +186,24 @@
};
/**
+ * struct storage_file_get_max_size_req - request format for
+ * STORAGE_FILE_GET_MAX_SIZE
+ * @handle: the handle for the file whose max size is requested
+ */
+struct storage_file_get_max_size_req {
+ uint32_t handle;
+};
+
+/**
+ * struct storage_file_get_max_size_resp - response format for
+ * STORAGE_FILE_GET_MAX_SIZE
+ * @max_size: the maximum size of the file
+ */
+struct storage_file_get_max_size_resp {
+ uint64_t max_size;
+};
+
+/**
* struct storage_file_read_req - request format for STORAGE_FILE_READ
* @handle: the handle for the file from which to read
* @size: the quantity of bytes to read from the file