File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 103
103
#define NSI_ERRNO_MID_EOVERFLOW 139 /**< Value overflow */
104
104
#define NSI_ERRNO_MID_ECANCELED 140 /**< Operation canceled */
105
105
106
+ /* Convert a errno value to the intermediate represetation to pass it to the other side */
106
107
int nsi_errno_to_mid (int err );
108
+ /* Convert a errno value from the intermediate representation into the local libC value */
107
109
int nsi_errno_from_mid (int err );
110
+ /* Return the middleground representation of the current host libC errno */
111
+ int nsi_get_errno_in_mid (void );
112
+ /* Return the local representation of the current host libC errno */
113
+ int nsi_host_get_errno (void );
108
114
109
115
#endif /* NSI_COMMON_SRC_NSI_ERRNO_H */
Original file line number Diff line number Diff line change @@ -128,3 +128,15 @@ int nsi_errno_from_mid(int err)
128
128
129
129
return err ;
130
130
}
131
+
132
+ #if defined(NSI_RUNNER_BUILD )
133
+ int nsi_get_errno_in_mid (void )
134
+ {
135
+ return nsi_errno_to_mid (errno );
136
+ }
137
+ #endif
138
+
139
+ int nsi_host_get_errno (void )
140
+ {
141
+ return nsi_errno_from_mid (nsi_get_errno_in_mid ());
142
+ }
You can’t perform that action at this time.
0 commit comments