Alexandre Julliard : server: Return the total length of the target in query_symlink.
Alexandre Julliard
julliard at winehq.org
Wed Jun 30 11:13:43 CDT 2010
Module: wine
Branch: master
Commit: 4c1f36cb68d744fe5ed3d52a4ea531b72b1dcac3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4c1f36cb68d744fe5ed3d52a4ea531b72b1dcac3
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Jun 30 16:11:03 2010 +0200
server: Return the total length of the target in query_symlink.
---
include/wine/server_protocol.h | 4 +++-
server/protocol.def | 1 +
server/request.h | 3 ++-
server/symlink.c | 1 +
server/trace.c | 4 +++-
5 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index 20bb4a2..1a78bc2 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -4395,7 +4395,9 @@ struct query_symlink_request
struct query_symlink_reply
{
struct reply_header __header;
+ data_size_t total;
/* VARARG(target_name,unicode_str); */
+ char __pad_12[4];
};
@@ -5485,6 +5487,6 @@ union generic_reply
struct set_cursor_reply set_cursor_reply;
};
-#define SERVER_PROTOCOL_VERSION 401
+#define SERVER_PROTOCOL_VERSION 402
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
diff --git a/server/protocol.def b/server/protocol.def
index e4e8ec3..e41cd18 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3057,6 +3057,7 @@ enum message_type
@REQ(query_symlink)
obj_handle_t handle; /* handle to the symlink */
@REPLY
+ data_size_t total; /* total needed size for name */
VARARG(target_name,unicode_str); /* target name */
@END
diff --git a/server/request.h b/server/request.h
index ef6adea..722fc25 100644
--- a/server/request.h
+++ b/server/request.h
@@ -1980,7 +1980,8 @@ C_ASSERT( FIELD_OFFSET(struct open_symlink_reply, handle) == 8 );
C_ASSERT( sizeof(struct open_symlink_reply) == 16 );
C_ASSERT( FIELD_OFFSET(struct query_symlink_request, handle) == 12 );
C_ASSERT( sizeof(struct query_symlink_request) == 16 );
-C_ASSERT( sizeof(struct query_symlink_reply) == 8 );
+C_ASSERT( FIELD_OFFSET(struct query_symlink_reply, total) == 8 );
+C_ASSERT( sizeof(struct query_symlink_reply) == 16 );
C_ASSERT( FIELD_OFFSET(struct get_object_info_request, handle) == 12 );
C_ASSERT( sizeof(struct get_object_info_request) == 16 );
C_ASSERT( FIELD_OFFSET(struct get_object_info_reply, access) == 8 );
diff --git a/server/symlink.c b/server/symlink.c
index 2ec7ed5..2330fde 100644
--- a/server/symlink.c
+++ b/server/symlink.c
@@ -214,6 +214,7 @@ DECL_HANDLER(query_symlink)
SYMBOLIC_LINK_QUERY, &symlink_ops );
if (!symlink) return;
+ reply->total = symlink->len;
if (get_reply_max_size() < symlink->len)
set_error( STATUS_BUFFER_TOO_SMALL );
else
diff --git a/server/trace.c b/server/trace.c
index ec87dab..fd2318e 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -3594,7 +3594,8 @@ static void dump_query_symlink_request( const struct query_symlink_request *req
static void dump_query_symlink_reply( const struct query_symlink_reply *req )
{
- dump_varargs_unicode_str( " target_name=", cur_size );
+ fprintf( stderr, " total=%u", req->total );
+ dump_varargs_unicode_str( ", target_name=", cur_size );
}
static void dump_get_object_info_request( const struct get_object_info_request *req )
@@ -4607,6 +4608,7 @@ static const struct
{ "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
{ "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
{ "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
+ { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
{ "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
{ "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
{ "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
More information about the wine-cvs
mailing list