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
94655c84
Commit
94655c84
authored
Mar 22, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Implemented the open_file method for named pipe and mailslot devices.
parent
7e71c1dd
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
9 deletions
+27
-9
file.c
dlls/ntdll/file.c
+1
-0
server_protocol.h
include/wine/server_protocol.h
+2
-1
fd.c
server/fd.c
+4
-6
mailslot.c
server/mailslot.c
+9
-1
named_pipe.c
server/named_pipe.c
+9
-1
protocol.def
server/protocol.def
+1
-0
trace.c
server/trace.c
+1
-0
No files found.
dlls/ntdll/file.c
View file @
94655c84
...
...
@@ -218,6 +218,7 @@ NTSTATUS WINAPI NtCreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATTRIB
req
->
attributes
=
attr
->
Attributes
;
req
->
rootdir
=
attr
->
RootDirectory
;
req
->
sharing
=
sharing
;
req
->
options
=
options
;
wine_server_add_data
(
req
,
attr
->
ObjectName
->
Buffer
,
attr
->
ObjectName
->
Length
);
io
->
u
.
Status
=
wine_server_call
(
req
);
*
handle
=
reply
->
handle
;
...
...
include/wine/server_protocol.h
View file @
94655c84
...
...
@@ -1035,6 +1035,7 @@ struct open_file_object_request
unsigned
int
attributes
;
obj_handle_t
rootdir
;
unsigned
int
sharing
;
unsigned
int
options
;
/* VARARG(filename,unicode_str); */
};
struct
open_file_object_reply
...
...
@@ -4699,6 +4700,6 @@ union generic_reply
struct
allocate_locally_unique_id_reply
allocate_locally_unique_id_reply
;
};
#define SERVER_PROTOCOL_VERSION 28
5
#define SERVER_PROTOCOL_VERSION 28
6
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/fd.c
View file @
94655c84
...
...
@@ -1871,7 +1871,7 @@ DECL_HANDLER(open_file_object)
{
struct
unicode_str
name
;
struct
directory
*
root
=
NULL
;
struct
object
*
obj
;
struct
object
*
obj
,
*
result
;
get_req_unicode_str
(
&
name
);
if
(
req
->
rootdir
&&
!
(
root
=
get_directory_obj
(
current
->
process
,
req
->
rootdir
,
0
)))
...
...
@@ -1879,12 +1879,10 @@ DECL_HANDLER(open_file_object)
if
((
obj
=
open_object_dir
(
root
,
&
name
,
req
->
attributes
,
NULL
)))
{
/* make sure this is a valid file object */
struct
fd
*
fd
=
get_obj_fd
(
obj
);
if
(
fd
)
if
((
result
=
obj
->
ops
->
open_file
(
obj
,
req
->
access
,
req
->
sharing
,
req
->
options
)))
{
reply
->
handle
=
alloc_handle
(
current
->
process
,
obj
,
req
->
access
,
req
->
attributes
);
release_object
(
fd
);
reply
->
handle
=
alloc_handle
(
current
->
process
,
result
,
req
->
access
,
req
->
attributes
);
release_object
(
result
);
}
release_object
(
obj
);
}
...
...
server/mailslot.c
View file @
94655c84
...
...
@@ -154,6 +154,8 @@ static void mailslot_device_dump( struct object *obj, int verbose );
static
struct
fd
*
mailslot_device_get_fd
(
struct
object
*
obj
);
static
struct
object
*
mailslot_device_lookup_name
(
struct
object
*
obj
,
struct
unicode_str
*
name
,
unsigned
int
attr
);
static
struct
object
*
mailslot_device_open_file
(
struct
object
*
obj
,
unsigned
int
access
,
unsigned
int
sharing
,
unsigned
int
options
);
static
void
mailslot_device_destroy
(
struct
object
*
obj
);
static
enum
server_fd_type
mailslot_device_get_file_info
(
struct
fd
*
fd
,
int
*
flags
);
...
...
@@ -169,7 +171,7 @@ static const struct object_ops mailslot_device_ops =
mailslot_device_get_fd
,
/* get_fd */
no_map_access
,
/* map_access */
mailslot_device_lookup_name
,
/* lookup_name */
no_open_file
,
/* open_file */
mailslot_device_open_file
,
/* open_file */
fd_close_handle
,
/* close_handle */
mailslot_device_destroy
/* destroy */
};
...
...
@@ -293,6 +295,12 @@ static struct object *mailslot_device_lookup_name( struct object *obj, struct un
return
found
;
}
static
struct
object
*
mailslot_device_open_file
(
struct
object
*
obj
,
unsigned
int
access
,
unsigned
int
sharing
,
unsigned
int
options
)
{
return
grab_object
(
obj
);
}
static
void
mailslot_device_destroy
(
struct
object
*
obj
)
{
struct
mailslot_device
*
device
=
(
struct
mailslot_device
*
)
obj
;
...
...
server/named_pipe.c
View file @
94655c84
...
...
@@ -202,6 +202,8 @@ static void named_pipe_device_dump( struct object *obj, int verbose );
static
struct
fd
*
named_pipe_device_get_fd
(
struct
object
*
obj
);
static
struct
object
*
named_pipe_device_lookup_name
(
struct
object
*
obj
,
struct
unicode_str
*
name
,
unsigned
int
attr
);
static
struct
object
*
named_pipe_device_open_file
(
struct
object
*
obj
,
unsigned
int
access
,
unsigned
int
sharing
,
unsigned
int
options
);
static
void
named_pipe_device_destroy
(
struct
object
*
obj
);
static
enum
server_fd_type
named_pipe_device_get_file_info
(
struct
fd
*
fd
,
int
*
flags
);
...
...
@@ -217,7 +219,7 @@ static const struct object_ops named_pipe_device_ops =
named_pipe_device_get_fd
,
/* get_fd */
pipe_map_access
,
/* map_access */
named_pipe_device_lookup_name
,
/* lookup_name */
n
o_open_file
,
/* open_file */
n
amed_pipe_device_open_file
,
/* open_file */
fd_close_handle
,
/* close_handle */
named_pipe_device_destroy
/* destroy */
};
...
...
@@ -434,6 +436,12 @@ static struct object *named_pipe_device_lookup_name( struct object *obj, struct
return
found
;
}
static
struct
object
*
named_pipe_device_open_file
(
struct
object
*
obj
,
unsigned
int
access
,
unsigned
int
sharing
,
unsigned
int
options
)
{
return
grab_object
(
obj
);
}
static
void
named_pipe_device_destroy
(
struct
object
*
obj
)
{
struct
named_pipe_device
*
device
=
(
struct
named_pipe_device
*
)
obj
;
...
...
server/protocol.def
View file @
94655c84
...
...
@@ -861,6 +861,7 @@ enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
unsigned int attributes; /* open attributes */
obj_handle_t rootdir; /* root directory */
unsigned int sharing; /* sharing flags */
unsigned int options; /* file options */
VARARG(filename,unicode_str); /* file name */
@REPLY
obj_handle_t handle; /* handle to the file */
...
...
server/trace.c
View file @
94655c84
...
...
@@ -1249,6 +1249,7 @@ static void dump_open_file_object_request( const struct open_file_object_request
fprintf
(
stderr
,
" attributes=%08x,"
,
req
->
attributes
);
fprintf
(
stderr
,
" rootdir=%p,"
,
req
->
rootdir
);
fprintf
(
stderr
,
" sharing=%08x,"
,
req
->
sharing
);
fprintf
(
stderr
,
" options=%08x,"
,
req
->
options
);
fprintf
(
stderr
,
" filename="
);
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