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:
Ingo Weinhold 2007-04-28 23:40:04 +00:00
parent 6e31ae98f9
commit 3b8715d804
4 changed files with 18 additions and 0 deletions

View File

@ -408,6 +408,7 @@ extern "C" {
#endif
extern int *_haiku_build_errno();
extern int _haiku_to_host_error(int error);
#ifdef __cplusplus
}

View File

@ -17,6 +17,7 @@ extern int *_fssh_errnop(void);
extern int fssh_get_errno(void);
extern void fssh_set_errno(int error);
extern int fssh_to_host_error(int error);
#ifdef __cplusplus
} /* "C" */

View File

@ -180,3 +180,9 @@ _haiku_build_errno()
return &localErrno;
}
// _haiku_to_host_error
int
_haiku_to_host_error(int error)
{
return to_host_error(error);
}

View File

@ -29,3 +29,13 @@ fssh_set_errno(int error)
{
errno = error;
}
int
fssh_to_host_error(int error)
{
#if __BEOS__
return error;
#else
return _haiku_to_host_error(error);
#endif
}