Get rid of the removable media handling in the server.
diff --git a/dlls/kernel/volume.c b/dlls/kernel/volume.c
index 48cc2f1..2a4eab3 100644
--- a/dlls/kernel/volume.c
+++ b/dlls/kernel/volume.c
@@ -312,8 +312,7 @@
{
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;
diff --git a/dlls/kernel/vxd.c b/dlls/kernel/vxd.c
index 02638a0..fa90196 100644
--- a/dlls/kernel/vxd.c
+++ b/dlls/kernel/vxd.c
@@ -106,7 +106,7 @@
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;
}
diff --git a/dlls/winedos/int21.c b/dlls/winedos/int21.c
index eb5d9b3..58967e9 100644
--- a/dlls/winedos/int21.c
+++ b/dlls/winedos/int21.c
@@ -824,7 +824,6 @@
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;
diff --git a/files/file.c b/files/file.c
index c41bc9f..6645a45 100644
--- a/files/file.c
+++ b/files/file.c
@@ -183,7 +183,7 @@
*/
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 @@
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 @@
if (device)
{
ret = FILE_CreateFile( device, access, sharing, sa, creation,
- attributes, template, DRIVE_FIXED );
+ attributes, template );
}
else
{
@@ -442,8 +441,7 @@
}
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 @@
/* 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 @@
/* 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);
diff --git a/include/file.h b/include/file.h
index af3bb33..28e621f 100644
--- a/include/file.h
+++ b/include/file.h
@@ -41,7 +41,7 @@
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);
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index 653f7e0..7f87a5e 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -753,7 +753,6 @@
int create;
unsigned int options;
unsigned int attrs;
- int removable;
/* VARARG(filename,string); */
};
struct create_file_reply
@@ -1487,7 +1486,6 @@
void* base;
obj_handle_t shared_file;
int shared_size;
- int removable;
};
@@ -3693,6 +3691,6 @@
struct set_global_windows_reply set_global_windows_reply;
};
-#define SERVER_PROTOCOL_VERSION 136
+#define SERVER_PROTOCOL_VERSION 137
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
diff --git a/misc/registry.c b/misc/registry.c
index 3b6409b..2a837e8 100644
--- a/misc/registry.c
+++ b/misc/registry.c
@@ -1201,7 +1201,7 @@
{
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 )
{
diff --git a/server/file.c b/server/file.c
index 8f599ec..af421fc 100644
--- a/server/file.c
+++ b/server/file.c
@@ -58,7 +58,6 @@
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 @@
{
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 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 @@
file->access = access;
file->options = options;
- file->removable = removable;
if (is_overlapped( file ))
{
init_async_queue (&file->read_q);
@@ -207,12 +204,6 @@
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 @@
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 );
diff --git a/server/file.h b/server/file.h
index 4d4538a..a8e5f3e 100644
--- a/server/file.h
+++ b/server/file.h
@@ -93,7 +93,6 @@
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);
diff --git a/server/mapping.c b/server/mapping.c
index f84f51c..2cac776 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -396,7 +396,6 @@
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 );
diff --git a/server/protocol.def b/server/protocol.def
index 5d0f732..cf8edf4 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -577,7 +577,6 @@
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 @@
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
diff --git a/server/trace.c b/server/trace.c
index b18ae51..3b4af2c 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -837,7 +837,6 @@
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 @@
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 )