mirror of
https://github.com/wiiu-env/wut.git
synced 2024-12-05 03:24:17 +01:00
Translate more FSErrors to errnos (#150)
This commit is contained in:
parent
2355b2c7b6
commit
83ca413027
@ -43,12 +43,34 @@ __wut_fs_translate_error(FSStatus error)
|
||||
return EINVAL;
|
||||
case FS_STATUS_EXISTS:
|
||||
return EEXIST;
|
||||
case FS_STATUS_MEDIA_ERROR:
|
||||
return EIO;
|
||||
case FS_STATUS_NOT_FOUND:
|
||||
return ENOENT;
|
||||
case FS_STATUS_PERMISSION_ERROR:
|
||||
return EPERM;
|
||||
case FS_STATUS_STORAGE_FULL:
|
||||
return ENOSPC;
|
||||
case FS_ERROR_ALREADY_EXISTS:
|
||||
return EEXIST;
|
||||
case FS_ERROR_BUSY:
|
||||
return EBUSY;
|
||||
case FS_ERROR_CANCELLED:
|
||||
return ECANCELED;
|
||||
case FS_STATUS_FILE_TOO_BIG:
|
||||
return EFBIG;
|
||||
case FS_ERROR_INVALID_PATH:
|
||||
return ENAMETOOLONG;
|
||||
case FS_ERROR_NOT_DIR:
|
||||
return ENOTDIR;
|
||||
case FS_ERROR_NOT_FILE:
|
||||
return EISDIR;
|
||||
case FS_ERROR_OUT_OF_RANGE:
|
||||
return ESPIPE;
|
||||
case FS_ERROR_UNSUPPORTED_COMMAND:
|
||||
return ENOTSUP;
|
||||
case FS_ERROR_WRITE_PROTECTED:
|
||||
return EROFS;
|
||||
default:
|
||||
return (int)error;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user