Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
49b2f6d9
Commit
49b2f6d9
authored
Apr 06, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of the removable media handling in the server.
parent
670711ef
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
13 additions
and
36 deletions
+13
-36
volume.c
dlls/kernel/volume.c
+1
-2
vxd.c
dlls/kernel/vxd.c
+1
-1
int21.c
dlls/winedos/int21.c
+0
-1
file.c
files/file.c
+5
-9
file.h
include/file.h
+1
-1
server_protocol.h
include/wine/server_protocol.h
+1
-3
registry.c
misc/registry.c
+1
-1
file.c
server/file.c
+2
-11
file.h
server/file.h
+0
-1
mapping.c
server/mapping.c
+0
-1
protocol.def
server/protocol.def
+0
-2
trace.c
server/trace.c
+1
-3
No files found.
dlls/kernel/volume.c
View file @
49b2f6d9
...
...
@@ -312,8 +312,7 @@ HANDLE VOLUME_OpenDevice( LPCWSTR name, DWORD access, DWORD sharing,
{
TRACE
(
"trying %s
\n
"
,
buffer
);
ret
=
FILE_CreateFile
(
buffer
,
access
,
sharing
,
sa
,
OPEN_EXISTING
,
attributes
,
0
,
DRIVE_FIXED
);
ret
=
FILE_CreateFile
(
buffer
,
access
,
sharing
,
sa
,
OPEN_EXISTING
,
attributes
,
0
);
if
(
ret
||
GetLastError
()
!=
ERROR_FILE_NOT_FOUND
)
break
;
if
(
!
dev
)
break
;
...
...
dlls/kernel/vxd.c
View file @
49b2f6d9
...
...
@@ -106,7 +106,7 @@ static HANDLE open_vxd_handle( LPCWSTR name )
unix_name
[
len1
]
=
'/'
;
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
name
,
-
1
,
unix_name
+
len1
+
1
,
len2
,
NULL
,
NULL
);
ret
=
FILE_CreateFile
(
unix_name
,
0
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
OPEN_ALWAYS
,
0
,
0
,
DRIVE_FIXED
);
OPEN_ALWAYS
,
0
,
0
);
HeapFree
(
GetProcessHeap
(),
0
,
unix_name
);
return
ret
;
}
...
...
dlls/winedos/int21.c
View file @
49b2f6d9
...
...
@@ -824,7 +824,6 @@ static HANDLE INT21_CreateMagicDeviceHandle( LPCWSTR name )
req
->
create
=
FILE_OPEN_IF
;
req
->
options
=
FILE_SYNCHRONOUS_IO_ALERT
;
req
->
attrs
=
0
;
req
->
removable
=
0
;
wine_server_add_data
(
req
,
unix_name
,
strlen
(
unix_name
)
);
SetLastError
(
0
);
if
(
!
wine_server_call_err
(
req
))
ret
=
reply
->
handle
;
...
...
files/file.c
View file @
49b2f6d9
...
...
@@ -183,7 +183,7 @@ void FILE_SetDosError(void)
*/
HANDLE
FILE_CreateFile
(
LPCSTR
filename
,
DWORD
access
,
DWORD
sharing
,
LPSECURITY_ATTRIBUTES
sa
,
DWORD
creation
,
DWORD
attributes
,
HANDLE
template
,
UINT
drive_type
)
DWORD
attributes
,
HANDLE
template
)
{
unsigned
int
err
;
UINT
disp
,
options
;
...
...
@@ -220,7 +220,6 @@ HANDLE FILE_CreateFile( LPCSTR filename, DWORD access, DWORD sharing,
req
->
create
=
disp
;
req
->
options
=
options
;
req
->
attrs
=
attributes
;
req
->
removable
=
(
drive_type
==
DRIVE_REMOVABLE
||
drive_type
==
DRIVE_CDROM
);
wine_server_add_data
(
req
,
filename
,
strlen
(
filename
)
);
SetLastError
(
0
);
err
=
wine_server_call
(
req
);
...
...
@@ -365,7 +364,7 @@ HANDLE WINAPI CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing,
if
(
device
)
{
ret
=
FILE_CreateFile
(
device
,
access
,
sharing
,
sa
,
creation
,
attributes
,
template
,
DRIVE_FIXED
);
attributes
,
template
);
}
else
{
...
...
@@ -442,8 +441,7 @@ HANDLE WINAPI CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing,
}
ret
=
FILE_CreateFile
(
full_name
.
long_name
,
access
,
sharing
,
sa
,
creation
,
attributes
,
template
,
GetDriveTypeW
(
full_name
.
short_name
)
);
sa
,
creation
,
attributes
,
template
);
done:
if
(
!
ret
)
ret
=
INVALID_HANDLE_VALUE
;
TRACE
(
"returning %p
\n
"
,
ret
);
...
...
@@ -1439,8 +1437,7 @@ BOOL WINAPI MoveFileExW( LPCWSTR fn1, LPCWSTR fn2, DWORD flag )
/* check if we are allowed to rename the source */
hFile
=
FILE_CreateFile
(
full_name1
.
long_name
,
0
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
0
,
GetDriveTypeW
(
full_name1
.
short_name
)
);
NULL
,
OPEN_EXISTING
,
0
,
0
);
if
(
!
hFile
)
{
if
(
GetLastError
()
!=
ERROR_ACCESS_DENIED
)
return
FALSE
;
...
...
@@ -1452,8 +1449,7 @@ BOOL WINAPI MoveFileExW( LPCWSTR fn1, LPCWSTR fn2, DWORD flag )
/* check, if we are allowed to delete the destination,
** (but the file not being there is fine) */
hFile
=
FILE_CreateFile
(
full_name2
.
long_name
,
GENERIC_READ
|
GENERIC_WRITE
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
0
,
GetDriveTypeW
(
full_name2
.
short_name
)
);
NULL
,
OPEN_EXISTING
,
0
,
0
);
if
(
!
hFile
&&
GetLastError
()
!=
ERROR_FILE_NOT_FOUND
)
return
FALSE
;
CloseHandle
(
hFile
);
...
...
include/file.h
View file @
49b2f6d9
...
...
@@ -41,7 +41,7 @@ extern void FILE_SetDosError(void);
extern
BOOL
FILE_Stat
(
LPCSTR
unixName
,
BY_HANDLE_FILE_INFORMATION
*
info
,
BOOL
*
is_symlink
);
extern
HANDLE
FILE_CreateFile
(
LPCSTR
filename
,
DWORD
access
,
DWORD
sharing
,
LPSECURITY_ATTRIBUTES
sa
,
DWORD
creation
,
DWORD
attributes
,
HANDLE
template
,
UINT
drive_type
);
DWORD
attributes
,
HANDLE
template
);
/* files/directory.c */
extern
int
DIR_Init
(
void
);
...
...
include/wine/server_protocol.h
View file @
49b2f6d9
...
...
@@ -753,7 +753,6 @@ struct create_file_request
int
create
;
unsigned
int
options
;
unsigned
int
attrs
;
int
removable
;
/* VARARG(filename,string); */
};
struct
create_file_reply
...
...
@@ -1487,7 +1486,6 @@ struct get_mapping_info_reply
void
*
base
;
obj_handle_t
shared_file
;
int
shared_size
;
int
removable
;
};
...
...
@@ -3693,6 +3691,6 @@ union generic_reply
struct
set_global_windows_reply
set_global_windows_reply
;
};
#define SERVER_PROTOCOL_VERSION 13
6
#define SERVER_PROTOCOL_VERSION 13
7
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
misc/registry.c
View file @
49b2f6d9
...
...
@@ -1201,7 +1201,7 @@ static void load_wine_registry(HKEY hkey,LPCSTR fn)
{
HANDLE
file
;
if
((
file
=
FILE_CreateFile
(
fn
,
GENERIC_READ
,
0
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
0
,
DRIVE_FIXED
)))
FILE_ATTRIBUTE_NORMAL
,
0
)))
{
SERVER_START_REQ
(
load_registry
)
{
...
...
server/file.c
View file @
49b2f6d9
...
...
@@ -58,7 +58,6 @@ struct file
struct
fd
*
fd
;
/* file descriptor for this file */
unsigned
int
access
;
/* file access (GENERIC_READ/WRITE) */
unsigned
int
options
;
/* file options (FILE_DELETE_ON_CLOSE, FILE_SYNCHRONOUS...) */
int
removable
;
/* is file on removable media? */
struct
async_queue
read_q
;
struct
async_queue
write_q
;
};
...
...
@@ -109,7 +108,6 @@ static struct file *create_file_for_fd( int fd, unsigned int access, unsigned in
{
file
->
access
=
access
;
file
->
options
=
FILE_SYNCHRONOUS_IO_NONALERT
;
file
->
removable
=
0
;
if
(
!
(
file
->
fd
=
create_anonymous_fd
(
&
file_fd_ops
,
fd
,
&
file
->
obj
)))
{
release_object
(
file
);
...
...
@@ -122,7 +120,7 @@ static struct file *create_file_for_fd( int fd, unsigned int access, unsigned in
static
struct
object
*
create_file
(
const
char
*
nameptr
,
size_t
len
,
unsigned
int
access
,
unsigned
int
sharing
,
int
create
,
unsigned
int
options
,
unsigned
int
attrs
,
int
removable
)
unsigned
int
attrs
)
{
struct
file
*
file
;
int
flags
;
...
...
@@ -160,7 +158,6 @@ static struct object *create_file( const char *nameptr, size_t len, unsigned int
file
->
access
=
access
;
file
->
options
=
options
;
file
->
removable
=
removable
;
if
(
is_overlapped
(
file
))
{
init_async_queue
(
&
file
->
read_q
);
...
...
@@ -207,12 +204,6 @@ int is_same_file( struct file *file1, struct file *file2 )
return
is_same_file_fd
(
file1
->
fd
,
file2
->
fd
);
}
/* check if the file is on removable media */
int
is_file_removable
(
struct
file
*
file
)
{
return
file
->
removable
;
}
/* create a temp file for anonymous mappings */
struct
file
*
create_temp_file
(
int
access
)
{
...
...
@@ -525,7 +516,7 @@ DECL_HANDLER(create_file)
reply
->
handle
=
0
;
if
((
file
=
create_file
(
get_req_data
(),
get_req_data_size
(),
req
->
access
,
req
->
sharing
,
req
->
create
,
req
->
options
,
req
->
attrs
,
req
->
removable
)))
req
->
sharing
,
req
->
create
,
req
->
options
,
req
->
attrs
)))
{
reply
->
handle
=
alloc_handle
(
current
->
process
,
file
,
req
->
access
,
req
->
inherit
);
release_object
(
file
);
...
...
server/file.h
View file @
49b2f6d9
...
...
@@ -93,7 +93,6 @@ extern struct file *get_file_obj( struct process *process, obj_handle_t handle,
unsigned
int
access
);
extern
int
get_file_unix_fd
(
struct
file
*
file
);
extern
int
is_same_file
(
struct
file
*
file1
,
struct
file
*
file2
);
extern
int
is_file_removable
(
struct
file
*
file
);
extern
int
grow_file
(
struct
file
*
file
,
int
size_high
,
int
size_low
);
extern
struct
file
*
create_temp_file
(
int
access
);
extern
void
file_set_error
(
void
);
...
...
server/mapping.c
View file @
49b2f6d9
...
...
@@ -396,7 +396,6 @@ DECL_HANDLER(get_mapping_info)
reply
->
base
=
mapping
->
base
;
reply
->
shared_file
=
0
;
reply
->
shared_size
=
mapping
->
shared_size
;
reply
->
removable
=
is_file_removable
(
mapping
->
file
);
if
(
mapping
->
shared_file
)
reply
->
shared_file
=
alloc_handle
(
current
->
process
,
mapping
->
shared_file
,
GENERIC_READ
|
GENERIC_WRITE
,
0
);
...
...
server/protocol.def
View file @
49b2f6d9
...
...
@@ -577,7 +577,6 @@ enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
int create; /* file create action */
unsigned int options; /* file options */
unsigned int attrs; /* file attributes for creation */
int removable; /* is file on removable media? */
VARARG(filename,string); /* file name */
@REPLY
obj_handle_t handle; /* handle to the file */
...
...
@@ -1095,7 +1094,6 @@ enum char_info_mode
void* base; /* default base addr (for VPROT_IMAGE mapping) */
obj_handle_t shared_file; /* shared mapping file handle */
int shared_size; /* shared mapping size */
int removable; /* is file on removable media? */
@END
...
...
server/trace.c
View file @
49b2f6d9
...
...
@@ -837,7 +837,6 @@ static void dump_create_file_request( const struct create_file_request *req )
fprintf
(
stderr
,
" create=%d,"
,
req
->
create
);
fprintf
(
stderr
,
" options=%08x,"
,
req
->
options
);
fprintf
(
stderr
,
" attrs=%08x,"
,
req
->
attrs
);
fprintf
(
stderr
,
" removable=%d,"
,
req
->
removable
);
fprintf
(
stderr
,
" filename="
);
dump_varargs_string
(
cur_size
);
}
...
...
@@ -1336,8 +1335,7 @@ static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *re
fprintf
(
stderr
,
" header_size=%d,"
,
req
->
header_size
);
fprintf
(
stderr
,
" base=%p,"
,
req
->
base
);
fprintf
(
stderr
,
" shared_file=%p,"
,
req
->
shared_file
);
fprintf
(
stderr
,
" shared_size=%d,"
,
req
->
shared_size
);
fprintf
(
stderr
,
" removable=%d"
,
req
->
removable
);
fprintf
(
stderr
,
" shared_size=%d"
,
req
->
shared_size
);
}
static
void
dump_create_snapshot_request
(
const
struct
create_snapshot_request
*
req
)
...
...
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