Skip to content

Commit d2eb2e4

Browse files
author
Netanel Gonen
committed
add backward support to error values
1 parent b08ddaa commit d2eb2e4

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

components/TARGET_PSA/services/storage/its/psa_prot_internal_storage.h

100644100755
Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,33 @@ struct psa_its_info_t {
5555
#define PSA_ITS_ERROR_STORAGE_FAILURE PSA_ERROR_STORAGE_FAILURE
5656
#define PSA_ITS_ERROR_INSUFFICIENT_SPACE PSA_ERROR_INSUFFICIENT_STORAGE
5757
#define PSA_ITS_ERROR_OFFSET_INVALID PSA_ERROR_INVALID_ARGUMENT
58-
#define PSA_ITS_ERROR_INCORRECT_SIZE PSA_ERROR_INVALID_ARGUMENT
58+
#define PSA_ITS_ERROR_INCORRECT_SIZE PSA_ERROR_BUFFER_TOO_SMALL
5959
#define PSA_ITS_ERROR_INVALID_ARGUMENTS PSA_ERROR_INVALID_ARGUMENT
6060
#define PSA_ITS_ERROR_FLAGS_NOT_SUPPORTED PSA_ERROR_NOT_SUPPORTED
61-
#define PSA_ITS_ERROR_WRITE_ONCE PSA_ERROR_ALREADY_EXISTS
62-
61+
#define PSA_ITS_ERROR_WRITE_ONCE PSA_ERROR_NOT_PERMITTED
62+
#define PSA_ITS_FLAG_WRITE_ONCE PSA_STORAGE_FLAG_WRITE_ONCE
63+
64+
MBED_DEPRECATED("PS specific types should not be used")
65+
typedef psa_status_t psa_ps_status_t;
66+
MBED_DEPRECATED("PS specific types should not be used")
67+
typedef psa_storage_uid_t psa_ps_uid_t;
68+
MBED_DEPRECATED("PS specific types should not be used")
69+
typedef psa_storage_create_flags_t psa_ps_create_flags_t;
70+
MBED_DEPRECATED("PS specific types should not be used")
71+
struct psa_ps_info_t {
72+
uint32_t size;
73+
psa_ps_create_flags_t flags;
74+
};
75+
#define PSA_PS_SUCCESS PSA_SUCCESS
76+
#define PSA_PS_ERROR_UID_NOT_FOUND PSA_ERROR_DOES_NOT_EXIST
77+
#define PSA_PS_ERROR_STORAGE_FAILURE PSA_ERROR_STORAGE_FAILURE
78+
#define PSA_PS_ERROR_INSUFFICIENT_SPACE PSA_ERROR_INSUFFICIENT_STORAGE
79+
#define PSA_PS_ERROR_OFFSET_INVALID PSA_ERROR_INVALID_ARGUMENT
80+
#define PSA_PS_ERROR_INCORRECT_SIZE PSA_ERROR_BUFFER_TOO_SMALL
81+
#define PSA_PS_ERROR_INVALID_ARGUMENT PSA_ERROR_INVALID_ARGUMENT
82+
#define PSA_PS_ERROR_FLAGS_NOT_SUPPORTED PSA_ERROR_NOT_SUPPORTED
83+
#define PSA_PS_ERROR_WRITE_ONCE PSA_ERROR_NOT_PERMITTED
84+
#define PSA_PS_FLAG_WRITE_ONCE PSA_STORAGE_FLAG_WRITE_ONCE
6385

6486
/**
6587
* \brief create a new or modify an existing uid/value pair

0 commit comments

Comments
 (0)