"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dlls/kernelbase/file.c" between
wine-5.12.tar.xz and wine-5.13.tar.xz

About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs. Development release.

file.c  (wine-5.12.tar.xz):file.c  (wine-5.13.tar.xz)
skipping to change at line 465 skipping to change at line 465
RtlUnicodeToMultiByteN( dest, destlen, &ret, src, srclen * sizeof(WC HAR) ); RtlUnicodeToMultiByteN( dest, destlen, &ret, src, srclen * sizeof(WC HAR) );
} }
return ret; return ret;
} }
/*********************************************************************** /***********************************************************************
* is_same_file * is_same_file
*/ */
static BOOL is_same_file( HANDLE h1, HANDLE h2 ) static BOOL is_same_file( HANDLE h1, HANDLE h2 )
{ {
FILE_ID_INFORMATION id1, id2; FILE_OBJECTID_BUFFER id1, id2;
IO_STATUS_BLOCK io; IO_STATUS_BLOCK io;
return !NtQueryInformationFile( h1, &io, &id1, sizeof(id1), FileIdInformatio return (!NtFsControlFile( h1, 0, NULL, NULL, &io, FSCTL_GET_OBJECT_ID, NULL,
n ) && 0, &id1, sizeof(id1) ) &&
!NtQueryInformationFile( h2, &io, &id2, sizeof(id2), FileIdInformatio !NtFsControlFile( h2, 0, NULL, NULL, &io, FSCTL_GET_OBJECT_ID, NULL,
n ) && 0, &id2, sizeof(id2) ) &&
!memcmp( &id1, &id2, sizeof(FILE_ID_INFORMATION) ); !memcmp( &id1.ObjectId, &id2.ObjectId, sizeof(id1.ObjectId) ));
} }
/****************************************************************************** /******************************************************************************
* AreFileApisANSI (kernelbase.@) * AreFileApisANSI (kernelbase.@)
*/ */
BOOL WINAPI DECLSPEC_HOTPATCH AreFileApisANSI(void) BOOL WINAPI DECLSPEC_HOTPATCH AreFileApisANSI(void)
{ {
return !oem_file_apis; return !oem_file_apis;
} }
skipping to change at line 3347 skipping to change at line 3347
offset.u.HighPart = overlapped->u.s.OffsetHigh; offset.u.HighPart = overlapped->u.s.OffsetHigh;
if (!((ULONG_PTR)overlapped->hEvent & 1)) cvalue = overlapped; if (!((ULONG_PTR)overlapped->hEvent & 1)) cvalue = overlapped;
io = (PIO_STATUS_BLOCK)overlapped; io = (PIO_STATUS_BLOCK)overlapped;
io->u.Status = STATUS_PENDING; io->u.Status = STATUS_PENDING;
io->Information = 0; io->Information = 0;
return set_ntstatus( NtReadFileScatter( file, overlapped->hEvent, NULL, cval ue, io, return set_ntstatus( NtReadFileScatter( file, overlapped->hEvent, NULL, cval ue, io,
segments, count, &offset, NULL )); segments, count, &offset, NULL ));
} }
/***********************************************************************
* RemoveDirectoryA (kernelbase.@)
*/
BOOL WINAPI DECLSPEC_HOTPATCH RemoveDirectoryA( LPCSTR path )
{
WCHAR *pathW;
if (!(pathW = file_name_AtoW( path, FALSE ))) return FALSE;
return RemoveDirectoryW( pathW );
}
/***********************************************************************
* RemoveDirectoryW (kernelbase.@)
*/
BOOL WINAPI DECLSPEC_HOTPATCH RemoveDirectoryW( LPCWSTR path )
{
OBJECT_ATTRIBUTES attr;
UNICODE_STRING nt_name;
IO_STATUS_BLOCK io;
NTSTATUS status;
HANDLE handle;
TRACE( "%s\n", debugstr_w(path) );
status = RtlDosPathNameToNtPathName_U_WithStatus( path, &nt_name, NULL, NULL
);
if (!set_ntstatus( status )) return FALSE;
InitializeObjectAttributes( &attr, &nt_name, OBJ_CASE_INSENSITIVE, 0, NULL )
;
status = NtOpenFile( &handle, DELETE | SYNCHRONIZE, &attr, &io,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT );
RtlFreeUnicodeString( &nt_name );
if (!status)
{
FILE_DISPOSITION_INFORMATION info = { TRUE };
status = NtSetInformationFile( handle, &io, &info, sizeof(info), FileDis
positionInformation );
NtClose( handle );
}
return set_ntstatus( status );
}
/************************************************************************** /**************************************************************************
* SetEndOfFile (kernelbase.@) * SetEndOfFile (kernelbase.@)
*/ */
BOOL WINAPI DECLSPEC_HOTPATCH SetEndOfFile( HANDLE file ) BOOL WINAPI DECLSPEC_HOTPATCH SetEndOfFile( HANDLE file )
{ {
FILE_POSITION_INFORMATION pos; FILE_POSITION_INFORMATION pos;
FILE_END_OF_FILE_INFORMATION eof; FILE_END_OF_FILE_INFORMATION eof;
IO_STATUS_BLOCK io; IO_STATUS_BLOCK io;
NTSTATUS status; NTSTATUS status;
 End of changes. 3 change blocks. 
6 lines changed or deleted 51 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)