server: Use the file_pos_t type for file sizes and offsets in the protocol structures.
This commit is contained in:
parent
54a471732f
commit
235532ce28
|
@ -2095,10 +2095,8 @@ NTSTATUS WINAPI NtLockFile( HANDLE hFile, HANDLE lock_granted_event,
|
||||||
SERVER_START_REQ( lock_file )
|
SERVER_START_REQ( lock_file )
|
||||||
{
|
{
|
||||||
req->handle = hFile;
|
req->handle = hFile;
|
||||||
req->offset_low = offset->u.LowPart;
|
req->offset = offset->QuadPart;
|
||||||
req->offset_high = offset->u.HighPart;
|
req->count = count->QuadPart;
|
||||||
req->count_low = count->u.LowPart;
|
|
||||||
req->count_high = count->u.HighPart;
|
|
||||||
req->shared = !exclusive;
|
req->shared = !exclusive;
|
||||||
req->wait = !dont_wait;
|
req->wait = !dont_wait;
|
||||||
ret = wine_server_call( req );
|
ret = wine_server_call( req );
|
||||||
|
@ -2159,10 +2157,8 @@ NTSTATUS WINAPI NtUnlockFile( HANDLE hFile, PIO_STATUS_BLOCK io_status,
|
||||||
SERVER_START_REQ( unlock_file )
|
SERVER_START_REQ( unlock_file )
|
||||||
{
|
{
|
||||||
req->handle = hFile;
|
req->handle = hFile;
|
||||||
req->offset_low = offset->u.LowPart;
|
req->offset = offset->QuadPart;
|
||||||
req->offset_high = offset->u.HighPart;
|
req->count = count->QuadPart;
|
||||||
req->count_low = count->u.LowPart;
|
|
||||||
req->count_high = count->u.HighPart;
|
|
||||||
status = wine_server_call( req );
|
status = wine_server_call( req );
|
||||||
}
|
}
|
||||||
SERVER_END_REQ;
|
SERVER_END_REQ;
|
||||||
|
|
|
@ -754,8 +754,7 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
|
||||||
result->type = call->type;
|
result->type = call->type;
|
||||||
result->map_view.addr = call->map_view.addr;
|
result->map_view.addr = call->map_view.addr;
|
||||||
result->map_view.size = call->map_view.size;
|
result->map_view.size = call->map_view.size;
|
||||||
offset.u.LowPart = call->map_view.offset_low;
|
offset.QuadPart = call->map_view.offset;
|
||||||
offset.u.HighPart = call->map_view.offset_high;
|
|
||||||
result->map_view.status = NtMapViewOfSection( call->map_view.handle, NtCurrentProcess(),
|
result->map_view.status = NtMapViewOfSection( call->map_view.handle, NtCurrentProcess(),
|
||||||
&result->map_view.addr, call->map_view.zero_bits,
|
&result->map_view.addr, call->map_view.zero_bits,
|
||||||
0, &offset, &result->map_view.size, ViewShare,
|
0, &offset, &result->map_view.size, ViewShare,
|
||||||
|
|
|
@ -1877,8 +1877,7 @@ NTSTATUS WINAPI NtCreateSection( HANDLE *handle, ACCESS_MASK access, const OBJEC
|
||||||
req->attributes = (attr) ? attr->Attributes : 0;
|
req->attributes = (attr) ? attr->Attributes : 0;
|
||||||
req->rootdir = attr ? attr->RootDirectory : 0;
|
req->rootdir = attr ? attr->RootDirectory : 0;
|
||||||
req->file_handle = file;
|
req->file_handle = file;
|
||||||
req->size_high = size ? size->u.HighPart : 0;
|
req->size = size ? size->QuadPart : 0;
|
||||||
req->size_low = size ? size->u.LowPart : 0;
|
|
||||||
req->protect = vprot;
|
req->protect = vprot;
|
||||||
if (len) wine_server_add_data( req, attr->ObjectName->Buffer, len );
|
if (len) wine_server_add_data( req, attr->ObjectName->Buffer, len );
|
||||||
ret = wine_server_call( req );
|
ret = wine_server_call( req );
|
||||||
|
@ -1922,13 +1921,14 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
|
||||||
SECTION_INHERIT inherit, ULONG alloc_type, ULONG protect )
|
SECTION_INHERIT inherit, ULONG alloc_type, ULONG protect )
|
||||||
{
|
{
|
||||||
NTSTATUS res;
|
NTSTATUS res;
|
||||||
|
ULONGLONG full_size;
|
||||||
SIZE_T size = 0;
|
SIZE_T size = 0;
|
||||||
SIZE_T mask = get_mask( zero_bits );
|
SIZE_T mask = get_mask( zero_bits );
|
||||||
int unix_handle = -1, needs_close;
|
int unix_handle = -1, needs_close;
|
||||||
int prot;
|
int prot;
|
||||||
void *base;
|
void *base;
|
||||||
struct file_view *view;
|
struct file_view *view;
|
||||||
DWORD size_low, size_high, header_size, shared_size;
|
DWORD header_size;
|
||||||
HANDLE dup_mapping, shared_file;
|
HANDLE dup_mapping, shared_file;
|
||||||
LARGE_INTEGER offset;
|
LARGE_INTEGER offset;
|
||||||
sigset_t sigset;
|
sigset_t sigset;
|
||||||
|
@ -1952,8 +1952,7 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
|
||||||
call.map_view.handle = handle;
|
call.map_view.handle = handle;
|
||||||
call.map_view.addr = *addr_ptr;
|
call.map_view.addr = *addr_ptr;
|
||||||
call.map_view.size = *size_ptr;
|
call.map_view.size = *size_ptr;
|
||||||
call.map_view.offset_low = offset.u.LowPart;
|
call.map_view.offset = offset.QuadPart;
|
||||||
call.map_view.offset_high = offset.u.HighPart;
|
|
||||||
call.map_view.zero_bits = zero_bits;
|
call.map_view.zero_bits = zero_bits;
|
||||||
call.map_view.alloc_type = alloc_type;
|
call.map_view.alloc_type = alloc_type;
|
||||||
call.map_view.prot = protect;
|
call.map_view.prot = protect;
|
||||||
|
@ -1974,19 +1973,18 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
|
||||||
res = wine_server_call( req );
|
res = wine_server_call( req );
|
||||||
prot = reply->protect;
|
prot = reply->protect;
|
||||||
base = reply->base;
|
base = reply->base;
|
||||||
size_low = reply->size_low;
|
full_size = reply->size;
|
||||||
size_high = reply->size_high;
|
|
||||||
header_size = reply->header_size;
|
header_size = reply->header_size;
|
||||||
dup_mapping = reply->mapping;
|
dup_mapping = reply->mapping;
|
||||||
shared_file = reply->shared_file;
|
shared_file = reply->shared_file;
|
||||||
shared_size = reply->shared_size;
|
|
||||||
}
|
}
|
||||||
SERVER_END_REQ;
|
SERVER_END_REQ;
|
||||||
if (res) return res;
|
if (res) return res;
|
||||||
|
|
||||||
size = ((ULONGLONG)size_high << 32) | size_low;
|
size = full_size;
|
||||||
if (sizeof(size) == sizeof(size_low) && size_high)
|
if (sizeof(size) < sizeof(full_size) && (size != full_size))
|
||||||
ERR( "Sizes larger than 4Gb (%x%08x) not supported on this platform\n", size_high, size_low );
|
ERR( "Sizes larger than 4Gb (%x%08x) not supported on this platform\n",
|
||||||
|
(DWORD)(full_size >> 32), (DWORD)full_size );
|
||||||
|
|
||||||
if ((res = server_get_unix_fd( handle, 0, &unix_handle, &needs_close, NULL, NULL ))) goto done;
|
if ((res = server_get_unix_fd( handle, 0, &unix_handle, &needs_close, NULL, NULL ))) goto done;
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ typedef unsigned int process_id_t;
|
||||||
typedef unsigned int thread_id_t;
|
typedef unsigned int thread_id_t;
|
||||||
typedef unsigned int data_size_t;
|
typedef unsigned int data_size_t;
|
||||||
typedef unsigned int ioctl_code_t;
|
typedef unsigned int ioctl_code_t;
|
||||||
|
typedef unsigned __int64 file_pos_t;
|
||||||
|
|
||||||
struct request_header
|
struct request_header
|
||||||
{
|
{
|
||||||
|
@ -317,8 +318,7 @@ typedef union
|
||||||
obj_handle_t handle;
|
obj_handle_t handle;
|
||||||
void *addr;
|
void *addr;
|
||||||
unsigned long size;
|
unsigned long size;
|
||||||
unsigned int offset_low;
|
file_pos_t offset;
|
||||||
unsigned int offset_high;
|
|
||||||
unsigned int zero_bits;
|
unsigned int zero_bits;
|
||||||
unsigned int alloc_type;
|
unsigned int alloc_type;
|
||||||
unsigned int prot;
|
unsigned int prot;
|
||||||
|
@ -1094,10 +1094,8 @@ struct lock_file_request
|
||||||
{
|
{
|
||||||
struct request_header __header;
|
struct request_header __header;
|
||||||
obj_handle_t handle;
|
obj_handle_t handle;
|
||||||
unsigned int offset_low;
|
file_pos_t offset;
|
||||||
unsigned int offset_high;
|
file_pos_t count;
|
||||||
unsigned int count_low;
|
|
||||||
unsigned int count_high;
|
|
||||||
int shared;
|
int shared;
|
||||||
int wait;
|
int wait;
|
||||||
};
|
};
|
||||||
|
@ -1114,10 +1112,8 @@ struct unlock_file_request
|
||||||
{
|
{
|
||||||
struct request_header __header;
|
struct request_header __header;
|
||||||
obj_handle_t handle;
|
obj_handle_t handle;
|
||||||
unsigned int offset_low;
|
file_pos_t offset;
|
||||||
unsigned int offset_high;
|
file_pos_t count;
|
||||||
unsigned int count_low;
|
|
||||||
unsigned int count_high;
|
|
||||||
};
|
};
|
||||||
struct unlock_file_reply
|
struct unlock_file_reply
|
||||||
{
|
{
|
||||||
|
@ -1665,8 +1661,7 @@ struct create_mapping_request
|
||||||
unsigned int access;
|
unsigned int access;
|
||||||
unsigned int attributes;
|
unsigned int attributes;
|
||||||
obj_handle_t rootdir;
|
obj_handle_t rootdir;
|
||||||
int size_high;
|
file_pos_t size;
|
||||||
int size_low;
|
|
||||||
int protect;
|
int protect;
|
||||||
obj_handle_t file_handle;
|
obj_handle_t file_handle;
|
||||||
/* VARARG(name,unicode_str); */
|
/* VARARG(name,unicode_str); */
|
||||||
|
@ -1712,14 +1707,12 @@ struct get_mapping_info_request
|
||||||
struct get_mapping_info_reply
|
struct get_mapping_info_reply
|
||||||
{
|
{
|
||||||
struct reply_header __header;
|
struct reply_header __header;
|
||||||
int size_high;
|
file_pos_t size;
|
||||||
int size_low;
|
|
||||||
int protect;
|
int protect;
|
||||||
int header_size;
|
int header_size;
|
||||||
void* base;
|
void* base;
|
||||||
obj_handle_t mapping;
|
obj_handle_t mapping;
|
||||||
obj_handle_t shared_file;
|
obj_handle_t shared_file;
|
||||||
int shared_size;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -4880,6 +4873,6 @@ union generic_reply
|
||||||
struct set_completion_info_reply set_completion_info_reply;
|
struct set_completion_info_reply set_completion_info_reply;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SERVER_PROTOCOL_VERSION 316
|
#define SERVER_PROTOCOL_VERSION 317
|
||||||
|
|
||||||
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
||||||
|
|
|
@ -657,12 +657,10 @@ DECL_HANDLER(alloc_file_handle)
|
||||||
DECL_HANDLER(lock_file)
|
DECL_HANDLER(lock_file)
|
||||||
{
|
{
|
||||||
struct file *file;
|
struct file *file;
|
||||||
file_pos_t offset = ((file_pos_t)req->offset_high << 32) | req->offset_low;
|
|
||||||
file_pos_t count = ((file_pos_t)req->count_high << 32) | req->count_low;
|
|
||||||
|
|
||||||
if ((file = get_file_obj( current->process, req->handle, 0 )))
|
if ((file = get_file_obj( current->process, req->handle, 0 )))
|
||||||
{
|
{
|
||||||
reply->handle = lock_fd( file->fd, offset, count, req->shared, req->wait );
|
reply->handle = lock_fd( file->fd, req->offset, req->count, req->shared, req->wait );
|
||||||
reply->overlapped = is_overlapped( file );
|
reply->overlapped = is_overlapped( file );
|
||||||
release_object( file );
|
release_object( file );
|
||||||
}
|
}
|
||||||
|
@ -672,12 +670,10 @@ DECL_HANDLER(lock_file)
|
||||||
DECL_HANDLER(unlock_file)
|
DECL_HANDLER(unlock_file)
|
||||||
{
|
{
|
||||||
struct file *file;
|
struct file *file;
|
||||||
file_pos_t offset = ((file_pos_t)req->offset_high << 32) | req->offset_low;
|
|
||||||
file_pos_t count = ((file_pos_t)req->count_high << 32) | req->count_low;
|
|
||||||
|
|
||||||
if ((file = get_file_obj( current->process, req->handle, 0 )))
|
if ((file = get_file_obj( current->process, req->handle, 0 )))
|
||||||
{
|
{
|
||||||
unlock_fd( file->fd, offset, count );
|
unlock_fd( file->fd, req->offset, req->count );
|
||||||
release_object( file );
|
release_object( file );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,6 @@ struct fd;
|
||||||
struct async_queue;
|
struct async_queue;
|
||||||
struct completion;
|
struct completion;
|
||||||
|
|
||||||
typedef unsigned __int64 file_pos_t;
|
|
||||||
|
|
||||||
/* operations valid on file descriptor objects */
|
/* operations valid on file descriptor objects */
|
||||||
struct fd_ops
|
struct fd_ops
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,7 +47,6 @@ struct mapping
|
||||||
int header_size; /* size of headers (for PE image mapping) */
|
int header_size; /* size of headers (for PE image mapping) */
|
||||||
void *base; /* default base addr (for PE image mapping) */
|
void *base; /* default base addr (for PE image mapping) */
|
||||||
struct file *shared_file; /* temp file for shared PE mapping */
|
struct file *shared_file; /* temp file for shared PE mapping */
|
||||||
int shared_size; /* shared mapping total size */
|
|
||||||
struct list shared_entry; /* entry in global shared PE mappings list */
|
struct list shared_entry; /* entry in global shared PE mappings list */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -141,7 +140,8 @@ static int build_shared_mapping( struct mapping *mapping, int fd,
|
||||||
IMAGE_SECTION_HEADER *sec, unsigned int nb_sec )
|
IMAGE_SECTION_HEADER *sec, unsigned int nb_sec )
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
size_t file_size, map_size, max_size, total_size;
|
file_pos_t total_size;
|
||||||
|
size_t file_size, map_size, max_size;
|
||||||
off_t shared_pos, read_pos, write_pos;
|
off_t shared_pos, read_pos, write_pos;
|
||||||
char *buffer = NULL;
|
char *buffer = NULL;
|
||||||
int shared_fd;
|
int shared_fd;
|
||||||
|
@ -160,7 +160,7 @@ static int build_shared_mapping( struct mapping *mapping, int fd,
|
||||||
total_size += map_size;
|
total_size += map_size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!(mapping->shared_size = total_size)) return 1; /* nothing to do */
|
if (!total_size) return 1; /* nothing to do */
|
||||||
|
|
||||||
if ((mapping->shared_file = get_shared_file( mapping ))) return 1;
|
if ((mapping->shared_file = get_shared_file( mapping ))) return 1;
|
||||||
|
|
||||||
|
@ -296,7 +296,6 @@ static struct object *create_mapping( struct directory *root, const struct unico
|
||||||
mapping->header_size = 0;
|
mapping->header_size = 0;
|
||||||
mapping->base = NULL;
|
mapping->base = NULL;
|
||||||
mapping->shared_file = NULL;
|
mapping->shared_file = NULL;
|
||||||
mapping->shared_size = 0;
|
|
||||||
|
|
||||||
if (protect & VPROT_READ) access |= FILE_READ_DATA;
|
if (protect & VPROT_READ) access |= FILE_READ_DATA;
|
||||||
if (protect & VPROT_WRITE) access |= FILE_WRITE_DATA;
|
if (protect & VPROT_WRITE) access |= FILE_WRITE_DATA;
|
||||||
|
@ -348,10 +347,10 @@ static void mapping_dump( struct object *obj, int verbose )
|
||||||
struct mapping *mapping = (struct mapping *)obj;
|
struct mapping *mapping = (struct mapping *)obj;
|
||||||
assert( obj->ops == &mapping_ops );
|
assert( obj->ops == &mapping_ops );
|
||||||
fprintf( stderr, "Mapping size=%08x%08x prot=%08x file=%p header_size=%08x base=%p "
|
fprintf( stderr, "Mapping size=%08x%08x prot=%08x file=%p header_size=%08x base=%p "
|
||||||
"shared_file=%p shared_size=%08x ",
|
"shared_file=%p ",
|
||||||
(unsigned int)(mapping->size >> 32), (unsigned int)mapping->size,
|
(unsigned int)(mapping->size >> 32), (unsigned int)mapping->size,
|
||||||
mapping->protect, mapping->file, mapping->header_size,
|
mapping->protect, mapping->file, mapping->header_size,
|
||||||
mapping->base, mapping->shared_file, mapping->shared_size );
|
mapping->base, mapping->shared_file );
|
||||||
dump_object_name( &mapping->obj );
|
dump_object_name( &mapping->obj );
|
||||||
fputc( '\n', stderr );
|
fputc( '\n', stderr );
|
||||||
}
|
}
|
||||||
|
@ -395,14 +394,13 @@ DECL_HANDLER(create_mapping)
|
||||||
struct object *obj;
|
struct object *obj;
|
||||||
struct unicode_str name;
|
struct unicode_str name;
|
||||||
struct directory *root = NULL;
|
struct directory *root = NULL;
|
||||||
file_pos_t size = ((file_pos_t)req->size_high << 32) | req->size_low;
|
|
||||||
|
|
||||||
reply->handle = 0;
|
reply->handle = 0;
|
||||||
get_req_unicode_str( &name );
|
get_req_unicode_str( &name );
|
||||||
if (req->rootdir && !(root = get_directory_obj( current->process, req->rootdir, 0 )))
|
if (req->rootdir && !(root = get_directory_obj( current->process, req->rootdir, 0 )))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((obj = create_mapping( root, &name, req->attributes, size, req->protect, req->file_handle )))
|
if ((obj = create_mapping( root, &name, req->attributes, req->size, req->protect, req->file_handle )))
|
||||||
{
|
{
|
||||||
reply->handle = alloc_handle( current->process, obj, req->access, req->attributes );
|
reply->handle = alloc_handle( current->process, obj, req->access, req->attributes );
|
||||||
release_object( obj );
|
release_object( obj );
|
||||||
|
@ -440,13 +438,11 @@ DECL_HANDLER(get_mapping_info)
|
||||||
if ((mapping = (struct mapping *)get_handle_obj( current->process, req->handle,
|
if ((mapping = (struct mapping *)get_handle_obj( current->process, req->handle,
|
||||||
0, &mapping_ops )))
|
0, &mapping_ops )))
|
||||||
{
|
{
|
||||||
reply->size_high = (unsigned int)(mapping->size >> 32);
|
reply->size = mapping->size;
|
||||||
reply->size_low = (unsigned int)mapping->size;
|
|
||||||
reply->protect = mapping->protect;
|
reply->protect = mapping->protect;
|
||||||
reply->header_size = mapping->header_size;
|
reply->header_size = mapping->header_size;
|
||||||
reply->base = mapping->base;
|
reply->base = mapping->base;
|
||||||
reply->shared_file = 0;
|
reply->shared_file = 0;
|
||||||
reply->shared_size = mapping->shared_size;
|
|
||||||
if ((fd = get_obj_fd( &mapping->obj )))
|
if ((fd = get_obj_fd( &mapping->obj )))
|
||||||
{
|
{
|
||||||
if (!is_fd_removable(fd))
|
if (!is_fd_removable(fd))
|
||||||
|
|
|
@ -38,6 +38,7 @@ typedef unsigned int process_id_t;
|
||||||
typedef unsigned int thread_id_t;
|
typedef unsigned int thread_id_t;
|
||||||
typedef unsigned int data_size_t;
|
typedef unsigned int data_size_t;
|
||||||
typedef unsigned int ioctl_code_t;
|
typedef unsigned int ioctl_code_t;
|
||||||
|
typedef unsigned __int64 file_pos_t;
|
||||||
|
|
||||||
struct request_header
|
struct request_header
|
||||||
{
|
{
|
||||||
|
@ -333,8 +334,7 @@ typedef union
|
||||||
obj_handle_t handle; /* mapping handle */
|
obj_handle_t handle; /* mapping handle */
|
||||||
void *addr; /* requested address */
|
void *addr; /* requested address */
|
||||||
unsigned long size; /* allocation size */
|
unsigned long size; /* allocation size */
|
||||||
unsigned int offset_low;/* file offset */
|
file_pos_t offset; /* file offset */
|
||||||
unsigned int offset_high;
|
|
||||||
unsigned int zero_bits; /* allocation alignment */
|
unsigned int zero_bits; /* allocation alignment */
|
||||||
unsigned int alloc_type;/* allocation type */
|
unsigned int alloc_type;/* allocation type */
|
||||||
unsigned int prot; /* memory protection flags */
|
unsigned int prot; /* memory protection flags */
|
||||||
|
@ -906,10 +906,8 @@ enum server_fd_type
|
||||||
/* Lock a region of a file */
|
/* Lock a region of a file */
|
||||||
@REQ(lock_file)
|
@REQ(lock_file)
|
||||||
obj_handle_t handle; /* handle to the file */
|
obj_handle_t handle; /* handle to the file */
|
||||||
unsigned int offset_low; /* offset of start of lock */
|
file_pos_t offset; /* offset of start of lock */
|
||||||
unsigned int offset_high; /* offset of start of lock */
|
file_pos_t count; /* count of bytes to lock */
|
||||||
unsigned int count_low; /* count of bytes to lock */
|
|
||||||
unsigned int count_high; /* count of bytes to lock */
|
|
||||||
int shared; /* shared or exclusive lock? */
|
int shared; /* shared or exclusive lock? */
|
||||||
int wait; /* do we want to wait? */
|
int wait; /* do we want to wait? */
|
||||||
@REPLY
|
@REPLY
|
||||||
|
@ -921,10 +919,8 @@ enum server_fd_type
|
||||||
/* Unlock a region of a file */
|
/* Unlock a region of a file */
|
||||||
@REQ(unlock_file)
|
@REQ(unlock_file)
|
||||||
obj_handle_t handle; /* handle to the file */
|
obj_handle_t handle; /* handle to the file */
|
||||||
unsigned int offset_low; /* offset of start of unlock */
|
file_pos_t offset; /* offset of start of unlock */
|
||||||
unsigned int offset_high; /* offset of start of unlock */
|
file_pos_t count; /* count of bytes to unlock */
|
||||||
unsigned int count_low; /* count of bytes to unlock */
|
|
||||||
unsigned int count_high; /* count of bytes to unlock */
|
|
||||||
@END
|
@END
|
||||||
|
|
||||||
|
|
||||||
|
@ -1310,8 +1306,7 @@ enum char_info_mode
|
||||||
unsigned int access; /* wanted access rights */
|
unsigned int access; /* wanted access rights */
|
||||||
unsigned int attributes; /* object attributes */
|
unsigned int attributes; /* object attributes */
|
||||||
obj_handle_t rootdir; /* root directory */
|
obj_handle_t rootdir; /* root directory */
|
||||||
int size_high; /* mapping size */
|
file_pos_t size; /* mapping size */
|
||||||
int size_low; /* mapping size */
|
|
||||||
int protect; /* protection flags (see below) */
|
int protect; /* protection flags (see below) */
|
||||||
obj_handle_t file_handle; /* file handle */
|
obj_handle_t file_handle; /* file handle */
|
||||||
VARARG(name,unicode_str); /* object name */
|
VARARG(name,unicode_str); /* object name */
|
||||||
|
@ -1344,14 +1339,12 @@ enum char_info_mode
|
||||||
@REQ(get_mapping_info)
|
@REQ(get_mapping_info)
|
||||||
obj_handle_t handle; /* handle to the mapping */
|
obj_handle_t handle; /* handle to the mapping */
|
||||||
@REPLY
|
@REPLY
|
||||||
int size_high; /* mapping size */
|
file_pos_t size; /* mapping size */
|
||||||
int size_low; /* mapping size */
|
|
||||||
int protect; /* protection flags */
|
int protect; /* protection flags */
|
||||||
int header_size; /* header size (for VPROT_IMAGE mapping) */
|
int header_size; /* header size (for VPROT_IMAGE mapping) */
|
||||||
void* base; /* default base addr (for VPROT_IMAGE mapping) */
|
void* base; /* default base addr (for VPROT_IMAGE mapping) */
|
||||||
obj_handle_t mapping; /* duplicate mapping handle unless removable */
|
obj_handle_t mapping; /* duplicate mapping handle unless removable */
|
||||||
obj_handle_t shared_file; /* shared mapping file handle */
|
obj_handle_t shared_file; /* shared mapping file handle */
|
||||||
int shared_size; /* shared mapping size */
|
|
||||||
@END
|
@END
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,11 @@ static void dump_timeout( const timeout_t *time )
|
||||||
fprintf( stderr, get_timeout_str(*time) );
|
fprintf( stderr, get_timeout_str(*time) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void dump_file_pos( const file_pos_t *pos )
|
||||||
|
{
|
||||||
|
fprintf( stderr, "%x%08x", (unsigned int)(*pos >> 32), (unsigned int)*pos );
|
||||||
|
}
|
||||||
|
|
||||||
static void dump_rectangle( const rectangle_t *rect )
|
static void dump_rectangle( const rectangle_t *rect )
|
||||||
{
|
{
|
||||||
fprintf( stderr, "{%d,%d;%d,%d}",
|
fprintf( stderr, "{%d,%d;%d,%d}",
|
||||||
|
@ -153,8 +158,8 @@ static void dump_apc_call( const apc_call_t *call )
|
||||||
case APC_MAP_VIEW:
|
case APC_MAP_VIEW:
|
||||||
fprintf( stderr, "APC_MAP_VIEW,handle=%p,addr=%p,size=%lu,offset=%x%08x,zero_bits=%u,alloc_type=%x,prot=%x",
|
fprintf( stderr, "APC_MAP_VIEW,handle=%p,addr=%p,size=%lu,offset=%x%08x,zero_bits=%u,alloc_type=%x,prot=%x",
|
||||||
call->map_view.handle, call->map_view.addr, call->map_view.size,
|
call->map_view.handle, call->map_view.addr, call->map_view.size,
|
||||||
call->map_view.offset_high, call->map_view.offset_low, call->map_view.zero_bits,
|
(unsigned int)(call->map_view.offset >> 32), (unsigned int)call->map_view.offset,
|
||||||
call->map_view.alloc_type, call->map_view.prot );
|
call->map_view.zero_bits, call->map_view.alloc_type, call->map_view.prot );
|
||||||
break;
|
break;
|
||||||
case APC_UNMAP_VIEW:
|
case APC_UNMAP_VIEW:
|
||||||
fprintf( stderr, "APC_UNMAP_VIEW,addr=%p", call->unmap_view.addr );
|
fprintf( stderr, "APC_UNMAP_VIEW,addr=%p", call->unmap_view.addr );
|
||||||
|
@ -1308,10 +1313,12 @@ static void dump_flush_file_reply( const struct flush_file_reply *req )
|
||||||
static void dump_lock_file_request( const struct lock_file_request *req )
|
static void dump_lock_file_request( const struct lock_file_request *req )
|
||||||
{
|
{
|
||||||
fprintf( stderr, " handle=%p,", req->handle );
|
fprintf( stderr, " handle=%p,", req->handle );
|
||||||
fprintf( stderr, " offset_low=%08x,", req->offset_low );
|
fprintf( stderr, " offset=" );
|
||||||
fprintf( stderr, " offset_high=%08x,", req->offset_high );
|
dump_file_pos( &req->offset );
|
||||||
fprintf( stderr, " count_low=%08x,", req->count_low );
|
fprintf( stderr, "," );
|
||||||
fprintf( stderr, " count_high=%08x,", req->count_high );
|
fprintf( stderr, " count=" );
|
||||||
|
dump_file_pos( &req->count );
|
||||||
|
fprintf( stderr, "," );
|
||||||
fprintf( stderr, " shared=%d,", req->shared );
|
fprintf( stderr, " shared=%d,", req->shared );
|
||||||
fprintf( stderr, " wait=%d", req->wait );
|
fprintf( stderr, " wait=%d", req->wait );
|
||||||
}
|
}
|
||||||
|
@ -1325,10 +1332,11 @@ static void dump_lock_file_reply( const struct lock_file_reply *req )
|
||||||
static void dump_unlock_file_request( const struct unlock_file_request *req )
|
static void dump_unlock_file_request( const struct unlock_file_request *req )
|
||||||
{
|
{
|
||||||
fprintf( stderr, " handle=%p,", req->handle );
|
fprintf( stderr, " handle=%p,", req->handle );
|
||||||
fprintf( stderr, " offset_low=%08x,", req->offset_low );
|
fprintf( stderr, " offset=" );
|
||||||
fprintf( stderr, " offset_high=%08x,", req->offset_high );
|
dump_file_pos( &req->offset );
|
||||||
fprintf( stderr, " count_low=%08x,", req->count_low );
|
fprintf( stderr, "," );
|
||||||
fprintf( stderr, " count_high=%08x", req->count_high );
|
fprintf( stderr, " count=" );
|
||||||
|
dump_file_pos( &req->count );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dump_create_socket_request( const struct create_socket_request *req )
|
static void dump_create_socket_request( const struct create_socket_request *req )
|
||||||
|
@ -1691,8 +1699,9 @@ static void dump_create_mapping_request( const struct create_mapping_request *re
|
||||||
fprintf( stderr, " access=%08x,", req->access );
|
fprintf( stderr, " access=%08x,", req->access );
|
||||||
fprintf( stderr, " attributes=%08x,", req->attributes );
|
fprintf( stderr, " attributes=%08x,", req->attributes );
|
||||||
fprintf( stderr, " rootdir=%p,", req->rootdir );
|
fprintf( stderr, " rootdir=%p,", req->rootdir );
|
||||||
fprintf( stderr, " size_high=%d,", req->size_high );
|
fprintf( stderr, " size=" );
|
||||||
fprintf( stderr, " size_low=%d,", req->size_low );
|
dump_file_pos( &req->size );
|
||||||
|
fprintf( stderr, "," );
|
||||||
fprintf( stderr, " protect=%d,", req->protect );
|
fprintf( stderr, " protect=%d,", req->protect );
|
||||||
fprintf( stderr, " file_handle=%p,", req->file_handle );
|
fprintf( stderr, " file_handle=%p,", req->file_handle );
|
||||||
fprintf( stderr, " name=" );
|
fprintf( stderr, " name=" );
|
||||||
|
@ -1725,14 +1734,14 @@ static void dump_get_mapping_info_request( const struct get_mapping_info_request
|
||||||
|
|
||||||
static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
|
static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
|
||||||
{
|
{
|
||||||
fprintf( stderr, " size_high=%d,", req->size_high );
|
fprintf( stderr, " size=" );
|
||||||
fprintf( stderr, " size_low=%d,", req->size_low );
|
dump_file_pos( &req->size );
|
||||||
|
fprintf( stderr, "," );
|
||||||
fprintf( stderr, " protect=%d,", req->protect );
|
fprintf( stderr, " protect=%d,", req->protect );
|
||||||
fprintf( stderr, " header_size=%d,", req->header_size );
|
fprintf( stderr, " header_size=%d,", req->header_size );
|
||||||
fprintf( stderr, " base=%p,", req->base );
|
fprintf( stderr, " base=%p,", req->base );
|
||||||
fprintf( stderr, " mapping=%p,", req->mapping );
|
fprintf( stderr, " mapping=%p,", req->mapping );
|
||||||
fprintf( stderr, " shared_file=%p,", req->shared_file );
|
fprintf( stderr, " shared_file=%p", req->shared_file );
|
||||||
fprintf( stderr, " shared_size=%d", req->shared_size );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dump_create_snapshot_request( const struct create_snapshot_request *req )
|
static void dump_create_snapshot_request( const struct create_snapshot_request *req )
|
||||||
|
|
|
@ -47,6 +47,7 @@ my %formats =
|
||||||
"async_data_t" => "&dump_async_data",
|
"async_data_t" => "&dump_async_data",
|
||||||
"luid_t" => "&dump_luid",
|
"luid_t" => "&dump_luid",
|
||||||
"ioctl_code_t" => "&dump_ioctl_code",
|
"ioctl_code_t" => "&dump_ioctl_code",
|
||||||
|
"file_pos_t" => "&dump_file_pos",
|
||||||
);
|
);
|
||||||
|
|
||||||
my @requests = ();
|
my @requests = ();
|
||||||
|
|
Loading…
Reference in New Issue