Commit 4c1f36cb authored by Alexandre Julliard's avatar Alexandre Julliard

server: Return the total length of the target in query_symlink.

parent 4b9258d1
...@@ -4395,7 +4395,9 @@ struct query_symlink_request ...@@ -4395,7 +4395,9 @@ struct query_symlink_request
struct query_symlink_reply struct query_symlink_reply
{ {
struct reply_header __header; struct reply_header __header;
data_size_t total;
/* VARARG(target_name,unicode_str); */ /* VARARG(target_name,unicode_str); */
char __pad_12[4];
}; };
...@@ -5485,6 +5487,6 @@ union generic_reply ...@@ -5485,6 +5487,6 @@ union generic_reply
struct set_cursor_reply set_cursor_reply; struct set_cursor_reply set_cursor_reply;
}; };
#define SERVER_PROTOCOL_VERSION 401 #define SERVER_PROTOCOL_VERSION 402
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */ #endif /* __WINE_WINE_SERVER_PROTOCOL_H */
...@@ -3057,6 +3057,7 @@ enum message_type ...@@ -3057,6 +3057,7 @@ enum message_type
@REQ(query_symlink) @REQ(query_symlink)
obj_handle_t handle; /* handle to the symlink */ obj_handle_t handle; /* handle to the symlink */
@REPLY @REPLY
data_size_t total; /* total needed size for name */
VARARG(target_name,unicode_str); /* target name */ VARARG(target_name,unicode_str); /* target name */
@END @END
......
...@@ -1980,7 +1980,8 @@ C_ASSERT( FIELD_OFFSET(struct open_symlink_reply, handle) == 8 ); ...@@ -1980,7 +1980,8 @@ C_ASSERT( FIELD_OFFSET(struct open_symlink_reply, handle) == 8 );
C_ASSERT( sizeof(struct open_symlink_reply) == 16 ); C_ASSERT( sizeof(struct open_symlink_reply) == 16 );
C_ASSERT( FIELD_OFFSET(struct query_symlink_request, handle) == 12 ); C_ASSERT( FIELD_OFFSET(struct query_symlink_request, handle) == 12 );
C_ASSERT( sizeof(struct query_symlink_request) == 16 ); 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( FIELD_OFFSET(struct get_object_info_request, handle) == 12 );
C_ASSERT( sizeof(struct get_object_info_request) == 16 ); C_ASSERT( sizeof(struct get_object_info_request) == 16 );
C_ASSERT( FIELD_OFFSET(struct get_object_info_reply, access) == 8 ); C_ASSERT( FIELD_OFFSET(struct get_object_info_reply, access) == 8 );
......
...@@ -214,6 +214,7 @@ DECL_HANDLER(query_symlink) ...@@ -214,6 +214,7 @@ DECL_HANDLER(query_symlink)
SYMBOLIC_LINK_QUERY, &symlink_ops ); SYMBOLIC_LINK_QUERY, &symlink_ops );
if (!symlink) return; if (!symlink) return;
reply->total = symlink->len;
if (get_reply_max_size() < symlink->len) if (get_reply_max_size() < symlink->len)
set_error( STATUS_BUFFER_TOO_SMALL ); set_error( STATUS_BUFFER_TOO_SMALL );
else else
......
...@@ -3594,7 +3594,8 @@ static void dump_query_symlink_request( const struct query_symlink_request *req ...@@ -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 ) 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 ) static void dump_get_object_info_request( const struct get_object_info_request *req )
...@@ -4607,6 +4608,7 @@ static const struct ...@@ -4607,6 +4608,7 @@ static const struct
{ "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED }, { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
{ "HANDLES_CLOSED", STATUS_HANDLES_CLOSED }, { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
{ "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE }, { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
{ "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
{ "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION }, { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
{ "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE }, { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
{ "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES }, { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment