Add delta.ua - a binary to apply an upgrade of DELTA_FS type.
[platform/core/system/upgrade.git] / src / upgrade-apply-deltafs / engine / SS_Engine_Errors.h
1 /*
2  * upgrade-apply-deltafs
3  *
4  * Copyright (c) 2017 - 2022 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the License);
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19 /*
20         SS_Engine Errors
21
22         0xAxx Series define INPUT/UA Errors
23
24         0xBxx Series define Delta Errors
25
26         0xCxx Series define System Errors
27
28         0xDxx Series define Engine Errors
29
30         0xExx Series define any Other Errors
31
32 */
33
34 #ifndef __SS_Engine_ERRORS__
35 #define __SS_Engine_ERRORS__
36
37 #define  S_SS_SUCCESS                                                   (0)     /*! Success Code */
38 #define  E_SS_FAILURE                                                   (1)     /*! Failure Code */
39
40 /* INPUT Processing errors */
41
42 /* invocation errors */
43 #define E_SS_BAD_PARAMS                                                 (0xA00)          /**< error in a run parameter */
44 #define E_SS_FSINVALIDNODEPARAMS                                        (0xA01) /* Failed to Parse the Params to verify NODE */
45 #define E_SS_FSBADNODES                                                 (0xA02) /* Failed to verify NODE for FS */
46 #define E_SS_FSBADDELTA                                                 (0xA03) /* Delta File does NOT contain required information on FS */
47 #define E_SS_FSBADATTRIBUTES                                            (0xA04) /* Failed to parse attribute data */
48 #define E_SS_FSFAILEDTOOPENPATCHINFO                                    (0xA05) /*Failed to open patch list file having details of PATCH info */
49 #define E_SS_FSFAILEDTOPARSEDELTACNT                                    (0xA06) /* Failed to parse the PATCH count information */
50 #define E_SS_FSFAILEDTOPARSEDELTAINFO                                   (0xA07) /* Failed to parse the Delta patch information */
51
52 /*Delta Errors*/
53 #define E_SS_FSSHA_MISMATCH                                             (0xB00) /*Could NOT produce expected Target SHA for file */
54
55 /* Resources errors */
56 #define  E_SS_MALLOC_ERROR                                              (0xC00) /**< memory allocation failure */
57
58 /* Image update Error codes */
59 #define  E_SS_WRITE_ERROR                                               (0xC01) /**< flash writing failure    */
60 #define  E_SS_READ_ERROR                                                (0xC02) /**< flash reading failure    */
61
62 /*File System Error codes */
63 #define  E_SS_OPENFILE_ONLYR                                            (0xC03)         /**< file does not exist      */
64 #define  E_SS_OPENFILE_WRITE                                            (0xC04)         /**< RO or no access rights   */
65 #define  E_SS_DELETEFILE                                                (0xC05) /**< no access rights         */
66 #define  E_SS_READFILE_SIZE                                             (0xC06) /**< cannot read specified size*/
67 #define  E_SS_CLOSEFILE_ERROR                                           (0xC07) /**< cannot close file handle */
68 #define  E_SS_CANNOT_CREATE_DIRECTORY                                   (0xC08)         /**< Failed creating directory */
69 #define  E_SS_FSMEMORYERROR                                             (0xC09) /* Failed to allocate Memory */
70 #define  E_SS_FILENAMELENERROR                                          (0xC10) /* Failed to serve filename length */
71
72 /*Engine errors */
73 #define E_SS_FSFAILEDTOBACKUPPATCHINFO                                  (0xD00) /* Failed to create backup file to write Delta patch info data */
74 #define E_SS_FSUPDATEFAILED                                             (0xD01) /*FS Failed during UPGRADE */
75 #define E_SS_FSSRCBACKUPFAILED                                          (0xD02) /*Failed to backup FS */
76 #define E_SS_FSSRCCURRUPTED                                             (0xD03) /*Could NOT update FS as SRC seems to be corrupted */
77 #define E_SS_PATCHFILE_DEL_ERROR     (0xD04) /*Failed to Clear/Del Patched SRC file */
78
79 #endif