Commit 500131b2 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

kernel32: FILE_SetDosError() is not used anymore so remove it.

The last user, RemoveDirectoryA/W(), has been moved to kernelbase. Signed-off-by: 's avatarFrancois Gouget <fgouget@free.fr> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 86459002
......@@ -93,73 +93,6 @@ static HANDLE create_file_OF( LPCSTR path, INT mode )
/***********************************************************************
* FILE_SetDosError
*
* Set the DOS error code from errno.
*/
void FILE_SetDosError(void)
{
int save_errno = errno; /* errno gets overwritten by printf */
TRACE("errno = %d %s\n", errno, strerror(errno));
switch (save_errno)
{
case EAGAIN:
SetLastError( ERROR_SHARING_VIOLATION );
break;
case EBADF:
SetLastError( ERROR_INVALID_HANDLE );
break;
case ENOSPC:
SetLastError( ERROR_HANDLE_DISK_FULL );
break;
case EACCES:
case EPERM:
case EROFS:
SetLastError( ERROR_ACCESS_DENIED );
break;
case EBUSY:
SetLastError( ERROR_LOCK_VIOLATION );
break;
case ENOENT:
SetLastError( ERROR_FILE_NOT_FOUND );
break;
case EISDIR:
SetLastError( ERROR_CANNOT_MAKE );
break;
case ENFILE:
case EMFILE:
SetLastError( ERROR_TOO_MANY_OPEN_FILES );
break;
case EEXIST:
SetLastError( ERROR_FILE_EXISTS );
break;
case EINVAL:
case ESPIPE:
SetLastError( ERROR_SEEK );
break;
case ENOTEMPTY:
SetLastError( ERROR_DIR_NOT_EMPTY );
break;
case ENOEXEC:
SetLastError( ERROR_BAD_FORMAT );
break;
case ENOTDIR:
SetLastError( ERROR_PATH_NOT_FOUND );
break;
case EXDEV:
SetLastError( ERROR_NOT_SAME_DEVICE );
break;
default:
WARN("unknown file error: %s\n", strerror(save_errno) );
SetLastError( ERROR_GEN_FAILURE );
break;
}
errno = save_errno;
}
/***********************************************************************
* FILE_name_AtoW
*
* Convert a file name to Unicode, taking into account the OEM/Ansi API mode.
......
......@@ -60,7 +60,6 @@ extern SYSTEM_BASIC_INFORMATION system_info DECLSPEC_HIDDEN;
extern const WCHAR DIR_Windows[] DECLSPEC_HIDDEN;
extern const WCHAR DIR_System[] DECLSPEC_HIDDEN;
extern void FILE_SetDosError(void) DECLSPEC_HIDDEN;
extern WCHAR *FILE_name_AtoW( LPCSTR name, BOOL alloc ) DECLSPEC_HIDDEN;
extern DWORD FILE_name_WtoA( LPCWSTR src, INT srclen, LPSTR dest, INT destlen ) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment