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
2669af73
Commit
2669af73
authored
Apr 16, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Move the server part of device unmounting to the ioctl processing.
parent
8c460954
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
60 deletions
+20
-60
directory.c
dlls/ntdll/directory.c
+0
-8
file.c
dlls/ntdll/file.c
+3
-1
server_protocol.h
include/wine/server_protocol.h
+1
-16
fd.c
server/fd.c
+16
-19
protocol.def
server/protocol.def
+0
-6
request.h
server/request.h
+0
-2
trace.c
server/trace.c
+0
-8
No files found.
dlls/ntdll/directory.c
View file @
2669af73
...
...
@@ -2034,14 +2034,6 @@ NTSTATUS DIR_unmount_device( HANDLE handle )
NTSTATUS
status
;
int
unix_fd
,
needs_close
;
SERVER_START_REQ
(
unmount_device
)
{
req
->
handle
=
handle
;
status
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
if
(
status
)
return
status
;
if
(
!
(
status
=
server_get_unix_fd
(
handle
,
0
,
&
unix_fd
,
&
needs_close
,
NULL
,
NULL
)))
{
struct
stat
st
;
...
...
dlls/ntdll/file.c
View file @
2669af73
...
...
@@ -1064,7 +1064,9 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
switch
(
code
)
{
case
FSCTL_DISMOUNT_VOLUME
:
status
=
DIR_unmount_device
(
handle
);
status
=
server_ioctl_file
(
handle
,
event
,
apc
,
apc_context
,
io
,
code
,
in_buffer
,
in_size
,
out_buffer
,
out_size
);
if
(
!
status
)
status
=
DIR_unmount_device
(
handle
);
break
;
case
FSCTL_PIPE_LISTEN
:
...
...
include/wine/server_protocol.h
View file @
2669af73
...
...
@@ -1140,18 +1140,6 @@ struct unlock_file_reply
struct
unmount_device_request
{
struct
request_header
__header
;
obj_handle_t
handle
;
};
struct
unmount_device_reply
{
struct
reply_header
__header
;
};
struct
create_socket_request
{
struct
request_header
__header
;
...
...
@@ -4052,7 +4040,6 @@ enum request
REQ_flush_file
,
REQ_lock_file
,
REQ_unlock_file
,
REQ_unmount_device
,
REQ_create_socket
,
REQ_accept_socket
,
REQ_set_socket_event
,
...
...
@@ -4276,7 +4263,6 @@ union generic_request
struct
flush_file_request
flush_file_request
;
struct
lock_file_request
lock_file_request
;
struct
unlock_file_request
unlock_file_request
;
struct
unmount_device_request
unmount_device_request
;
struct
create_socket_request
create_socket_request
;
struct
accept_socket_request
accept_socket_request
;
struct
set_socket_event_request
set_socket_event_request
;
...
...
@@ -4498,7 +4484,6 @@ union generic_reply
struct
flush_file_reply
flush_file_reply
;
struct
lock_file_reply
lock_file_reply
;
struct
unlock_file_reply
unlock_file_reply
;
struct
unmount_device_reply
unmount_device_reply
;
struct
create_socket_reply
create_socket_reply
;
struct
accept_socket_reply
accept_socket_reply
;
struct
set_socket_event_reply
set_socket_event_reply
;
...
...
@@ -4675,6 +4660,6 @@ union generic_reply
struct
allocate_locally_unique_id_reply
allocate_locally_unique_id_reply
;
};
#define SERVER_PROTOCOL_VERSION 29
4
#define SERVER_PROTOCOL_VERSION 29
5
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/fd.c
View file @
2669af73
...
...
@@ -77,6 +77,7 @@
#include "request.h"
#include "winternl.h"
#include "winioctl.h"
#if defined(HAVE_SYS_EPOLL_H) && defined(HAVE_EPOLL_CREATE)
# include <sys/epoll.h>
...
...
@@ -1686,13 +1687,6 @@ void default_poll_event( struct fd *fd, int event )
else
if
(
!
fd
->
inode
)
set_fd_events
(
fd
,
fd
->
fd_ops
->
get_poll_events
(
fd
)
);
}
/* default ioctl() routine */
void
default_fd_ioctl
(
struct
fd
*
fd
,
unsigned
int
code
,
const
async_data_t
*
async
,
const
void
*
data
,
data_size_t
size
)
{
set_error
(
STATUS_NOT_SUPPORTED
);
}
struct
async
*
fd_queue_async
(
struct
fd
*
fd
,
const
async_data_t
*
data
,
int
type
,
int
count
)
{
struct
async_queue
*
queue
;
...
...
@@ -1833,6 +1827,21 @@ static void unmount_device( struct fd *device_fd )
release_object
(
device
);
}
/* default ioctl() routine */
void
default_fd_ioctl
(
struct
fd
*
fd
,
unsigned
int
code
,
const
async_data_t
*
async
,
const
void
*
data
,
data_size_t
size
)
{
switch
(
code
)
{
case
FSCTL_DISMOUNT_VOLUME
:
unmount_device
(
fd
);
break
;
default:
set_error
(
STATUS_NOT_SUPPORTED
);
break
;
}
}
/* same as get_handle_obj but retrieve the struct fd associated to the object */
static
struct
fd
*
get_handle_fd_obj
(
struct
process
*
process
,
obj_handle_t
handle
,
unsigned
int
access
)
...
...
@@ -1913,18 +1922,6 @@ DECL_HANDLER(get_handle_fd)
}
}
/* get ready to unmount a Unix device */
DECL_HANDLER
(
unmount_device
)
{
struct
fd
*
fd
;
if
((
fd
=
get_handle_fd_obj
(
current
->
process
,
req
->
handle
,
0
)))
{
unmount_device
(
fd
);
release_object
(
fd
);
}
}
/* perform an ioctl on a file */
DECL_HANDLER
(
ioctl
)
{
...
...
server/protocol.def
View file @
2669af73
...
...
@@ -936,12 +936,6 @@ enum server_fd_type
@END
/* Get ready to unmount a Unix device */
@REQ(unmount_device)
obj_handle_t handle; /* handle to a file on the device */
@END
/* Create a socket */
@REQ(create_socket)
unsigned int access; /* wanted access rights */
...
...
server/request.h
View file @
2669af73
...
...
@@ -152,7 +152,6 @@ DECL_HANDLER(get_handle_fd);
DECL_HANDLER
(
flush_file
);
DECL_HANDLER
(
lock_file
);
DECL_HANDLER
(
unlock_file
);
DECL_HANDLER
(
unmount_device
);
DECL_HANDLER
(
create_socket
);
DECL_HANDLER
(
accept_socket
);
DECL_HANDLER
(
set_socket_event
);
...
...
@@ -375,7 +374,6 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(
req_handler
)
req_flush_file
,
(
req_handler
)
req_lock_file
,
(
req_handler
)
req_unlock_file
,
(
req_handler
)
req_unmount_device
,
(
req_handler
)
req_create_socket
,
(
req_handler
)
req_accept_socket
,
(
req_handler
)
req_set_socket_event
,
...
...
server/trace.c
View file @
2669af73
...
...
@@ -1321,11 +1321,6 @@ static void dump_unlock_file_request( const struct unlock_file_request *req )
fprintf
(
stderr
,
" count_high=%08x"
,
req
->
count_high
);
}
static
void
dump_unmount_device_request
(
const
struct
unmount_device_request
*
req
)
{
fprintf
(
stderr
,
" handle=%p"
,
req
->
handle
);
}
static
void
dump_create_socket_request
(
const
struct
create_socket_request
*
req
)
{
fprintf
(
stderr
,
" access=%08x,"
,
req
->
access
);
...
...
@@ -3509,7 +3504,6 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_flush_file_request
,
(
dump_func
)
dump_lock_file_request
,
(
dump_func
)
dump_unlock_file_request
,
(
dump_func
)
dump_unmount_device_request
,
(
dump_func
)
dump_create_socket_request
,
(
dump_func
)
dump_accept_socket_request
,
(
dump_func
)
dump_set_socket_event_request
,
...
...
@@ -3729,7 +3723,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_flush_file_reply
,
(
dump_func
)
dump_lock_file_reply
,
(
dump_func
)
0
,
(
dump_func
)
0
,
(
dump_func
)
dump_create_socket_reply
,
(
dump_func
)
dump_accept_socket_reply
,
(
dump_func
)
0
,
...
...
@@ -3949,7 +3942,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"flush_file"
,
"lock_file"
,
"unlock_file"
,
"unmount_device"
,
"create_socket"
,
"accept_socket"
,
"set_socket_event"
,
...
...
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