Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
348a3d91
Commit
348a3d91
authored
Dec 02, 2005
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Dec 02, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move mapping (section) objects into directory name space.
parent
7c5cb7a2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
7 deletions
+31
-7
virtual.c
dlls/kernel/virtual.c
+4
-1
virtual.c
dlls/ntdll/virtual.c
+2
-0
server_protocol.h
include/wine/server_protocol.h
+3
-1
mapping.c
server/mapping.c
+18
-5
protocol.def
server/protocol.def
+2
-0
trace.c
server/trace.c
+2
-0
No files found.
dlls/kernel/virtual.c
View file @
348a3d91
...
...
@@ -43,6 +43,8 @@
#include "excpt.h"
#include "wine/debug.h"
#include "kernel_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
virtual
);
WINE_DECLARE_DEBUG_CHANNEL
(
seh
);
...
...
@@ -318,6 +320,7 @@ HANDLE WINAPI CreateFileMappingW( HANDLE hFile, LPSECURITY_ATTRIBUTES sa,
{
RtlInitUnicodeString
(
&
nameW
,
name
);
attr
.
ObjectName
=
&
nameW
;
attr
.
RootDirectory
=
get_BaseNamedObjects_handle
();
}
sec_type
=
protect
&
sec_flags
;
...
...
@@ -406,7 +409,7 @@ HANDLE WINAPI OpenFileMappingW( DWORD access, BOOL inherit, LPCWSTR name)
return
0
;
}
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
RootDirectory
=
get_BaseNamedObjects_handle
()
;
attr
.
ObjectName
=
&
nameW
;
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
(
inherit
?
OBJ_INHERIT
:
0
);
attr
.
SecurityDescriptor
=
NULL
;
...
...
dlls/ntdll/virtual.c
View file @
348a3d91
...
...
@@ -1662,6 +1662,7 @@ NTSTATUS WINAPI NtCreateSection( HANDLE *handle, ACCESS_MASK access, const OBJEC
{
req
->
access
=
access
;
req
->
attributes
=
(
attr
)
?
attr
->
Attributes
:
0
;
req
->
rootdir
=
attr
?
attr
->
RootDirectory
:
0
;
req
->
file_handle
=
file
;
req
->
size_high
=
size
?
size
->
u
.
HighPart
:
0
;
req
->
size_low
=
size
?
size
->
u
.
LowPart
:
0
;
...
...
@@ -1690,6 +1691,7 @@ NTSTATUS WINAPI NtOpenSection( HANDLE *handle, ACCESS_MASK access, const OBJECT_
{
req
->
access
=
access
;
req
->
attributes
=
(
attr
)
?
attr
->
Attributes
:
0
;
req
->
rootdir
=
attr
?
attr
->
RootDirectory
:
0
;
wine_server_add_data
(
req
,
attr
->
ObjectName
->
Buffer
,
len
);
if
(
!
(
ret
=
wine_server_call
(
req
)))
*
handle
=
reply
->
handle
;
}
...
...
include/wine/server_protocol.h
View file @
348a3d91
...
...
@@ -1407,6 +1407,7 @@ struct create_mapping_request
struct
request_header
__header
;
unsigned
int
access
;
unsigned
int
attributes
;
obj_handle_t
rootdir
;
int
size_high
;
int
size_low
;
int
protect
;
...
...
@@ -1435,6 +1436,7 @@ struct open_mapping_request
struct
request_header
__header
;
unsigned
int
access
;
unsigned
int
attributes
;
obj_handle_t
rootdir
;
/* VARARG(name,unicode_str); */
};
struct
open_mapping_reply
...
...
@@ -4310,6 +4312,6 @@ union generic_reply
struct
query_symlink_reply
query_symlink_reply
;
};
#define SERVER_PROTOCOL_VERSION 20
4
#define SERVER_PROTOCOL_VERSION 20
5
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/mapping.c
View file @
348a3d91
...
...
@@ -273,15 +273,16 @@ inline static int get_file_size( struct file *file, file_pos_t *size )
return
1
;
}
static
struct
object
*
create_mapping
(
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
file_pos_t
size
,
int
protect
,
obj_handle_t
handle
)
static
struct
object
*
create_mapping
(
struct
directory
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
file_pos_t
size
,
int
protect
,
obj_handle_t
handle
)
{
struct
mapping
*
mapping
;
int
access
=
0
;
if
(
!
page_mask
)
init_page_size
();
if
(
!
(
mapping
=
create_named_object
(
sync_namespace
,
&
mapping_ops
,
name
,
attr
)))
if
(
!
(
mapping
=
create_named_object
_dir
(
root
,
name
,
attr
,
&
mapping_ops
)))
return
NULL
;
if
(
get_error
()
==
STATUS_OBJECT_NAME_EXISTS
)
return
&
mapping
->
obj
;
/* Nothing else to do */
...
...
@@ -378,25 +379,37 @@ DECL_HANDLER(create_mapping)
{
struct
object
*
obj
;
struct
unicode_str
name
;
struct
directory
*
root
=
NULL
;
file_pos_t
size
=
((
file_pos_t
)
req
->
size_high
<<
32
)
|
req
->
size_low
;
reply
->
handle
=
0
;
get_req_unicode_str
(
&
name
);
if
((
obj
=
create_mapping
(
&
name
,
req
->
attributes
,
size
,
req
->
protect
,
req
->
file_handle
)))
if
(
req
->
rootdir
&&
!
(
root
=
get_directory_obj
(
current
->
process
,
req
->
rootdir
,
0
)))
return
;
if
((
obj
=
create_mapping
(
root
,
&
name
,
req
->
attributes
,
size
,
req
->
protect
,
req
->
file_handle
)))
{
reply
->
handle
=
alloc_handle
(
current
->
process
,
obj
,
req
->
access
,
req
->
attributes
&
OBJ_INHERIT
);
release_object
(
obj
);
}
if
(
root
)
release_object
(
root
);
}
/* open a handle to a mapping */
DECL_HANDLER
(
open_mapping
)
{
struct
unicode_str
name
;
struct
directory
*
root
=
NULL
;
get_req_unicode_str
(
&
name
);
reply
->
handle
=
open_object
(
sync_namespace
,
&
name
,
&
mapping_ops
,
req
->
access
,
req
->
attributes
);
if
(
req
->
rootdir
&&
!
(
root
=
get_directory_obj
(
current
->
process
,
req
->
rootdir
,
0
)))
return
;
reply
->
handle
=
open_object_dir
(
root
,
&
name
,
req
->
attributes
,
&
mapping_ops
,
req
->
access
);
if
(
root
)
release_object
(
root
);
}
/* get a mapping information */
...
...
server/protocol.def
View file @
348a3d91
...
...
@@ -1045,6 +1045,7 @@ enum char_info_mode
@REQ(create_mapping)
unsigned int access; /* wanted access rights */
unsigned int attributes; /* object attributes */
obj_handle_t rootdir; /* root directory */
int size_high; /* mapping size */
int size_low; /* mapping size */
int protect; /* protection flags (see below) */
...
...
@@ -1068,6 +1069,7 @@ enum char_info_mode
@REQ(open_mapping)
unsigned int access; /* wanted access rights */
unsigned int attributes; /* object attributes */
obj_handle_t rootdir; /* root directory */
VARARG(name,unicode_str); /* object name */
@REPLY
obj_handle_t handle; /* handle to the mapping */
...
...
server/trace.c
View file @
348a3d91
...
...
@@ -1448,6 +1448,7 @@ static void dump_create_mapping_request( const struct create_mapping_request *re
{
fprintf
(
stderr
,
" access=%08x,"
,
req
->
access
);
fprintf
(
stderr
,
" attributes=%08x,"
,
req
->
attributes
);
fprintf
(
stderr
,
" rootdir=%p,"
,
req
->
rootdir
);
fprintf
(
stderr
,
" size_high=%d,"
,
req
->
size_high
);
fprintf
(
stderr
,
" size_low=%d,"
,
req
->
size_low
);
fprintf
(
stderr
,
" protect=%d,"
,
req
->
protect
);
...
...
@@ -1465,6 +1466,7 @@ static void dump_open_mapping_request( const struct open_mapping_request *req )
{
fprintf
(
stderr
,
" access=%08x,"
,
req
->
access
);
fprintf
(
stderr
,
" attributes=%08x,"
,
req
->
attributes
);
fprintf
(
stderr
,
" rootdir=%p,"
,
req
->
rootdir
);
fprintf
(
stderr
,
" name="
);
dump_varargs_unicode_str
(
cur_size
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment