[Wine-patches] [11/23] server: Remove unused requests.
Alexander Morozov
=?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Пн Янв 19 18:24:10 MSK 2009
For eterhack branch
----------- следующая часть -----------
From 86029afec43cf9caea74639daa9a76545860e960 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Mon, 12 Jan 2009 14:36:39 +0300
Subject: [PATCH] server: Remove unused requests.
---
server/device.c | 170 ---------------------------------------------------
server/protocol.def | 18 ------
2 files changed, 0 insertions(+), 188 deletions(-)
diff --git a/server/device.c b/server/device.c
index f2669df..efeb0ee 100644
--- a/server/device.c
+++ b/server/device.c
@@ -32,7 +32,6 @@
#include "file.h"
#include "handle.h"
#include "request.h"
-#include "unicode.h"
#include "process.h"
struct ioctl_call
@@ -162,42 +161,6 @@ static const struct fd_ops device_fd_ops =
};
-static struct list add_dev_requests_list = LIST_INIT(add_dev_requests_list);
-
-struct add_dev_request
-{
- struct object obj; /* object header */
- struct unicode_str drvname; /* driver name */
- void *data; /* driver specific data */
- data_size_t size; /* driver specific data size */
- struct list entry; /* entry in add_dev_requests_list */
-};
-
-static void add_dev_req_dump( struct object *obj, int verbose );
-static int add_dev_req_signaled( struct object *obj, struct thread *thread );
-static void add_dev_req_destroy( struct object *obj );
-
-static const struct object_ops add_dev_requests_ops =
-{
- sizeof(struct add_dev_request), /* size */
- add_dev_req_dump, /* dump */
- no_get_type, /* get_type */
- add_queue, /* add_queue */
- remove_queue, /* remove_queue */
- add_dev_req_signaled, /* signaled */
- no_satisfied, /* satisfied */
- no_signal, /* signal */
- no_get_fd, /* get_fd */
- no_map_access, /* map_access */
- default_get_sd, /* get_sd */
- default_set_sd, /* set_sd */
- no_lookup_name, /* lookup_name */
- no_open_file, /* open_file */
- no_close_handle, /* close_handle */
- add_dev_req_destroy /* destroy */
-};
-
-
static void ioctl_call_dump( struct object *obj, int verbose )
{
struct ioctl_call *ioctl = (struct ioctl_call *)obj;
@@ -463,73 +426,6 @@ static struct device_manager *create_device_manager(void)
}
-static struct add_dev_request *create_add_dev_req( const struct unicode_str *drvname )
-{
- struct add_dev_request *add_dev_req = NULL;
- void *p;
-
- p = mem_alloc( drvname->len );
- if (p)
- {
- add_dev_req = alloc_object( &add_dev_requests_ops );
- if (add_dev_req)
- {
- memcpy( p, drvname->str, drvname->len );
- add_dev_req->drvname.len = drvname->len;
- add_dev_req->drvname.str = p;
- add_dev_req->data = NULL;
- add_dev_req->size = 0;
- list_add_tail( &add_dev_requests_list, &add_dev_req->entry );
- }
- else
- free( p );
- }
- return add_dev_req;
-}
-
-static struct add_dev_request *get_add_dev_req( const struct unicode_str *drvname )
-{
- struct add_dev_request *add_dev_req;
- struct unicode_str *p;
-
- LIST_FOR_EACH_ENTRY( add_dev_req, &add_dev_requests_list, struct add_dev_request, entry )
- {
- p = &add_dev_req->drvname;
- if (p->len != drvname->len) continue;
- if (!strncmpiW( drvname->str, p->str, p->len/sizeof(WCHAR) ))
- return add_dev_req;
- }
- return NULL;
-}
-
-static void add_dev_req_dump( struct object *obj, int verbose )
-{
- struct add_dev_request *add_dev_req = (struct add_dev_request *)obj;
- struct unicode_str *drvname = &add_dev_req->drvname;
-
- fprintf( stderr, "AddDevice " );
- if (drvname)
- dump_strW( drvname->str, drvname->len / sizeof(WCHAR), stderr, "" );
- fputc( '\n', stderr );
-}
-
-static int add_dev_req_signaled( struct object *obj, struct thread *thread )
-{
- struct add_dev_request *add_dev_req = (struct add_dev_request *)obj;
-
- return add_dev_req->size;
-}
-
-static void add_dev_req_destroy( struct object *obj )
-{
- struct add_dev_request *add_dev_req = (struct add_dev_request *)obj;
-
- list_remove( &add_dev_req->entry );
- free( (void *)add_dev_req->drvname.str );
- free( add_dev_req->data );
-}
-
-
/* create a device manager */
DECL_HANDLER(create_device_manager)
{
@@ -660,69 +556,3 @@ DECL_HANDLER(get_ioctl_result)
}
release_object( device );
}
-
-
-DECL_HANDLER(call_add_device)
-{
- void *p;
- struct add_dev_request *add_dev_req;
- data_size_t size;
- struct unicode_str drvname;
-
- drvname.str = get_req_data();
- drvname.len = req->drvname_len;
- size = get_req_data_size() - req->drvname_len;
- p = mem_alloc( size );
- if (p)
- {
- add_dev_req = get_add_dev_req( &drvname );
- if (!add_dev_req)
- {
- add_dev_req = create_add_dev_req( &drvname );
- if (!add_dev_req)
- {
- free( p );
- return;
- }
- }
- memcpy( p, (char *)get_req_data() + req->drvname_len, size );
- add_dev_req->data = p;
- add_dev_req->size = size;
- wake_up( &add_dev_req->obj, 0 );
- }
-}
-
-
-DECL_HANDLER(get_add_device_request)
-{
- struct unicode_str drvname;
- struct add_dev_request *add_dev_req;
-
- if (req->event)
- close_handle( current->process, req->event );
-
- get_req_unicode_str( &drvname );
- add_dev_req = get_add_dev_req( &drvname );
-
- if (!add_dev_req)
- {
- add_dev_req = create_add_dev_req( &drvname );
- if (!add_dev_req)
- {
- reply->event = NULL;
- return;
- }
- }
-
- if (add_dev_req->size)
- {
- set_reply_data( add_dev_req->data, add_dev_req->size );
- release_object( add_dev_req );
- }
- else
- {
- reply->event = alloc_handle( current->process, add_dev_req, SYNCHRONIZE, 0 );
- if (reply->event)
- set_error( STATUS_PENDING );
- }
-}
diff --git a/server/protocol.def b/server/protocol.def
index a346c20..5a6e47f 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3099,24 +3099,6 @@ enum message_type
@END
-/* Call AddDevice function in driver */
- на REQ(call_add_device)
- data_size_t drvname_len; /* driver name length */
- VARARG(drvname,unicode_str); /* driver name */
- VARARG(data,bytes); /* driver specific data */
- на END
-
-
-/* Check if it should call AddDevice function */
- на REQ(get_add_device_request)
- obj_handle_t event; /* old event */
- VARARG(drvname,unicode_str); /* driver name */
- на REPLY
- obj_handle_t event; /* event to signal when should repeat this request */
- VARARG(data,bytes); /* driver specific data */
- на END
-
-
/* Retrieve layered info for a window */
@REQ(get_window_layered_info)
user_handle_t handle; /* handle to the window */
--
1.6.0.2.GIT
Подробная информация о списке рассылки Wine-patches