Provide a way to convert FS shell error codes to host platform error
codes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20890 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -408,6 +408,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int *_haiku_build_errno();
|
extern int *_haiku_build_errno();
|
||||||
|
extern int _haiku_to_host_error(int error);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ extern int *_fssh_errnop(void);
|
|||||||
extern int fssh_get_errno(void);
|
extern int fssh_get_errno(void);
|
||||||
extern void fssh_set_errno(int error);
|
extern void fssh_set_errno(int error);
|
||||||
|
|
||||||
|
extern int fssh_to_host_error(int error);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* "C" */
|
} /* "C" */
|
||||||
|
|||||||
@@ -180,3 +180,9 @@ _haiku_build_errno()
|
|||||||
return &localErrno;
|
return &localErrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// _haiku_to_host_error
|
||||||
|
int
|
||||||
|
_haiku_to_host_error(int error)
|
||||||
|
{
|
||||||
|
return to_host_error(error);
|
||||||
|
}
|
||||||
|
|||||||
@@ -29,3 +29,13 @@ fssh_set_errno(int error)
|
|||||||
{
|
{
|
||||||
errno = error;
|
errno = error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
fssh_to_host_error(int error)
|
||||||
|
{
|
||||||
|
#if __BEOS__
|
||||||
|
return error;
|
||||||
|
#else
|
||||||
|
return _haiku_to_host_error(error);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user