From 8ae1c1db422fb397bf472c271e16d09a7bd87543 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Thu, 6 Oct 2022 00:12:00 +0000 Subject: [PATCH] storageproxyd: Add STORAGE_FILE_GET_MAX_SIZE API on Android side This is the Android-side companion change to go/oag/2241573, adding the interface for STORAGE_FILE_GET_MAX_SIZE (implementation sold separately). Bug: 247003431 Test: None Change-Id: Ie834c91a085b2e4a668e0d9d22ec0f6b1e4e6c1c --- .../include/trusty/interface/storage.h | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/trusty/storage/interface/include/trusty/interface/storage.h b/trusty/storage/interface/include/trusty/interface/storage.h index 255ade127..32916074b 100644 --- a/trusty/storage/interface/include/trusty/interface/storage.h +++ b/trusty/storage/interface/include/trusty/interface/storage.h @@ -53,6 +53,8 @@ enum storage_cmd { /* transaction support */ STORAGE_END_TRANSACTION = 9 << STORAGE_REQ_SHIFT, + + STORAGE_FILE_GET_MAX_SIZE = 12 << STORAGE_REQ_SHIFT, }; /** @@ -183,6 +185,24 @@ struct storage_file_close_req { uint32_t handle; }; +/** + * 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