#include "log.h"
#include "osl.h"
-#include "error.h"
#include "util.h"
#include "osl_core.h"
__export const char *osl_strerror(int num)
{
- if (IS_SYSTEM_ERROR(num))
- return strerror((num) & ((1 << SYSTEM_ERROR_BIT) - 1));
return msgstr.str + errmsgidx[num];
}
if (!dirname)
goto err;
/* check if directory exists */
- ret = stat(dirname, &statbuf);
+ ret = osl_stat(dirname, &statbuf);
free(dirname);
- if (ret < 0) {
- ret = -E_OSL_STAT;
+ if (ret < 0)
goto err;
- }
ret = -E_OSL_NOTDIR;
if (!S_ISDIR(statbuf.st_mode))
goto err;