diff options
author | SG <who.just.the.doctor@gmail.com> | 2021-11-04 13:46:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-04 13:46:45 +0300 |
commit | bb9c464a138a12283b6a34a9bdd5dadd7b034c8c (patch) | |
tree | 945a3a58b93794d23607114c1b3e243a55c842ab /applications/storage | |
parent | 7f94ef31796712885368ccff9e73619b3de69093 (diff) |
Storage: internal error getter (#806)
* Storage: internal error getter
Co-authored-by: あく <alleteam@gmail.com>
Diffstat (limited to 'applications/storage')
-rw-r--r-- | applications/storage/storage-external-api.c | 5 | ||||
-rw-r--r-- | applications/storage/storage.h | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/applications/storage/storage-external-api.c b/applications/storage/storage-external-api.c index d74cbb77..7f275894 100644 --- a/applications/storage/storage-external-api.c +++ b/applications/storage/storage-external-api.c @@ -324,6 +324,11 @@ FS_Error storage_file_get_error(File* file) { return file->error_id; } +int32_t storage_file_get_internal_error(File* file) { + furi_check(file != NULL); + return file->internal_error_id; +} + const char* storage_file_get_error_desc(File* file) { furi_check(file != NULL); return filesystem_api_error_get_desc(file->error_id); diff --git a/applications/storage/storage.h b/applications/storage/storage.h index aabe8ddc..9351e155 100644 --- a/applications/storage/storage.h +++ b/applications/storage/storage.h @@ -197,6 +197,12 @@ const char* storage_error_get_desc(FS_Error error_id); */ FS_Error storage_file_get_error(File* file); +/** Retrieves the internal (storage-specific) error id from the file object + * @param file pointer to file object. Pointer must not point to NULL. YOU CANNOT RETREIVE THE INTERNAL ERROR ID IF THE FILE HAS BEEN CLOSED + * @return FS_Error error id + */ +int32_t storage_file_get_internal_error(File* file); + /** Retrieves the error text from the file object * @param file pointer to file object. Pointer must not point to NULL. YOU CANNOT RETREIVE THE ERROR TEXT IF THE FILE HAS BEEN CLOSED * @return const char* error text |