Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
18c08d30
Commit
18c08d30
authored
Apr 08, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed the get_file_info request.
parent
b9001f34
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
15 additions
and
199 deletions
+15
-199
server_protocol.h
include/wine/server_protocol.h
+1
-29
fd.c
server/fd.c
+2
-15
file.c
server/file.c
+2
-41
file.h
server/file.h
+2
-2
named_pipe.c
server/named_pipe.c
+2
-17
protocol.def
server/protocol.def
+0
-20
request.h
server/request.h
+0
-2
serial.c
server/serial.c
+2
-16
smb.c
server/smb.c
+2
-17
sock.c
server/sock.c
+2
-15
trace.c
server/trace.c
+0
-25
No files found.
include/wine/server_protocol.h
View file @
18c08d30
...
...
@@ -830,31 +830,6 @@ struct flush_file_reply
struct
get_file_info_request
{
struct
request_header
__header
;
obj_handle_t
handle
;
};
struct
get_file_info_reply
{
struct
reply_header
__header
;
int
type
;
int
attr
;
time_t
access_time
;
time_t
write_time
;
time_t
change_time
;
int
size_high
;
int
size_low
;
int
alloc_high
;
int
alloc_low
;
int
links
;
int
index_high
;
int
index_low
;
unsigned
int
serial
;
};
struct
lock_file_request
{
struct
request_header
__header
;
...
...
@@ -3165,7 +3140,6 @@ enum request
REQ_get_handle_fd
,
REQ_truncate_file
,
REQ_flush_file
,
REQ_get_file_info
,
REQ_lock_file
,
REQ_unlock_file
,
REQ_create_socket
,
...
...
@@ -3350,7 +3324,6 @@ union generic_request
struct
get_handle_fd_request
get_handle_fd_request
;
struct
truncate_file_request
truncate_file_request
;
struct
flush_file_request
flush_file_request
;
struct
get_file_info_request
get_file_info_request
;
struct
lock_file_request
lock_file_request
;
struct
unlock_file_request
unlock_file_request
;
struct
create_socket_request
create_socket_request
;
...
...
@@ -3533,7 +3506,6 @@ union generic_reply
struct
get_handle_fd_reply
get_handle_fd_reply
;
struct
truncate_file_reply
truncate_file_reply
;
struct
flush_file_reply
flush_file_reply
;
struct
get_file_info_reply
get_file_info_reply
;
struct
lock_file_reply
lock_file_reply
;
struct
unlock_file_reply
unlock_file_reply
;
struct
create_socket_reply
create_socket_reply
;
...
...
@@ -3672,6 +3644,6 @@ union generic_reply
struct
set_global_windows_reply
set_global_windows_reply
;
};
#define SERVER_PROTOCOL_VERSION 13
8
#define SERVER_PROTOCOL_VERSION 13
9
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/fd.c
View file @
18c08d30
...
...
@@ -1076,7 +1076,7 @@ int no_flush( struct fd *fd, struct event **event )
}
/* default get_file_info() routine */
int
no_get_file_info
(
struct
fd
*
fd
,
struct
get_file_info_reply
*
info
,
int
*
flags
)
int
no_get_file_info
(
struct
fd
*
fd
,
int
*
flags
)
{
set_error
(
STATUS_OBJECT_TYPE_MISMATCH
);
*
flags
=
0
;
...
...
@@ -1138,20 +1138,7 @@ DECL_HANDLER(get_handle_fd)
assert
(
fd
->
unix_fd
!=
-
1
);
send_client_fd
(
current
->
process
,
fd
->
unix_fd
,
req
->
handle
);
}
reply
->
type
=
fd
->
fd_ops
->
get_file_info
(
fd
,
NULL
,
&
reply
->
flags
);
release_object
(
fd
);
}
}
/* get a file information */
DECL_HANDLER
(
get_file_info
)
{
struct
fd
*
fd
=
get_handle_fd_obj
(
current
->
process
,
req
->
handle
,
0
);
if
(
fd
)
{
int
flags
;
fd
->
fd_ops
->
get_file_info
(
fd
,
reply
,
&
flags
);
reply
->
type
=
fd
->
fd_ops
->
get_file_info
(
fd
,
&
reply
->
flags
);
release_object
(
fd
);
}
}
...
...
server/file.c
View file @
18c08d30
...
...
@@ -69,7 +69,7 @@ static void file_destroy( struct object *obj );
static
int
file_get_poll_events
(
struct
fd
*
fd
);
static
void
file_poll_event
(
struct
fd
*
fd
,
int
event
);
static
int
file_flush
(
struct
fd
*
fd
,
struct
event
**
event
);
static
int
file_get_info
(
struct
fd
*
fd
,
struct
get_file_info_reply
*
reply
,
int
*
flags
);
static
int
file_get_info
(
struct
fd
*
fd
,
int
*
flags
);
static
void
file_queue_async
(
struct
fd
*
fd
,
void
*
ptr
,
unsigned
int
status
,
int
type
,
int
count
);
static
const
struct
object_ops
file_ops
=
...
...
@@ -266,49 +266,10 @@ static int file_flush( struct fd *fd, struct event **event )
return
ret
;
}
static
int
file_get_info
(
struct
fd
*
fd
,
struct
get_file_info_reply
*
reply
,
int
*
flags
)
static
int
file_get_info
(
struct
fd
*
fd
,
int
*
flags
)
{
struct
stat
st
;
struct
file
*
file
=
get_fd_user
(
fd
);
int
unix_fd
=
get_unix_fd
(
fd
);
if
(
reply
)
{
if
(
fstat
(
unix_fd
,
&
st
)
==
-
1
)
{
file_set_error
();
return
FD_TYPE_INVALID
;
}
if
(
S_ISCHR
(
st
.
st_mode
)
||
S_ISFIFO
(
st
.
st_mode
)
||
S_ISSOCK
(
st
.
st_mode
)
||
isatty
(
unix_fd
))
reply
->
type
=
FILE_TYPE_CHAR
;
else
reply
->
type
=
FILE_TYPE_DISK
;
if
(
S_ISDIR
(
st
.
st_mode
))
reply
->
attr
=
FILE_ATTRIBUTE_DIRECTORY
;
else
reply
->
attr
=
FILE_ATTRIBUTE_ARCHIVE
;
if
(
!
(
st
.
st_mode
&
S_IWUSR
))
reply
->
attr
|=
FILE_ATTRIBUTE_READONLY
;
reply
->
access_time
=
st
.
st_atime
;
reply
->
write_time
=
st
.
st_mtime
;
reply
->
change_time
=
st
.
st_ctime
;
if
(
S_ISDIR
(
st
.
st_mode
))
{
reply
->
size_high
=
0
;
reply
->
size_low
=
0
;
reply
->
alloc_high
=
0
;
reply
->
alloc_low
=
0
;
}
else
{
file_pos_t
alloc
;
reply
->
size_high
=
st
.
st_size
>>
32
;
reply
->
size_low
=
st
.
st_size
&
0xffffffff
;
alloc
=
(
file_pos_t
)
st
.
st_blksize
*
st
.
st_blocks
;
reply
->
alloc_high
=
alloc
>>
32
;
reply
->
alloc_low
=
alloc
&
0xffffffff
;
}
reply
->
links
=
st
.
st_nlink
;
reply
->
index_high
=
st
.
st_dev
;
reply
->
index_low
=
st
.
st_ino
;
reply
->
serial
=
0
;
/* FIXME */
}
*
flags
=
0
;
if
(
is_overlapped
(
file
))
*
flags
|=
FD_FLAG_OVERLAPPED
;
return
FD_TYPE_DEFAULT
;
...
...
server/file.h
View file @
18c08d30
...
...
@@ -37,7 +37,7 @@ struct fd_ops
/* flush the object buffers */
int
(
*
flush
)(
struct
fd
*
,
struct
event
**
);
/* get file information */
int
(
*
get_file_info
)(
struct
fd
*
,
struct
get_file_info_reply
*
,
int
*
flags
);
int
(
*
get_file_info
)(
struct
fd
*
,
int
*
flags
);
/* queue an async operation - see register_async handler in async.c*/
void
(
*
queue_async
)(
struct
fd
*
,
void
*
ptr
,
unsigned
int
status
,
int
type
,
int
count
);
};
...
...
@@ -64,7 +64,7 @@ extern void default_fd_remove_queue( struct object *obj, struct wait_queue_entry
extern
int
default_fd_signaled
(
struct
object
*
obj
,
struct
thread
*
thread
);
extern
void
default_poll_event
(
struct
fd
*
fd
,
int
event
);
extern
int
no_flush
(
struct
fd
*
fd
,
struct
event
**
event
);
extern
int
no_get_file_info
(
struct
fd
*
fd
,
struct
get_file_info_reply
*
info
,
int
*
flags
);
extern
int
no_get_file_info
(
struct
fd
*
fd
,
int
*
flags
);
extern
void
no_queue_async
(
struct
fd
*
fd
,
void
*
ptr
,
unsigned
int
status
,
int
type
,
int
count
);
extern
void
main_loop
(
void
);
...
...
server/named_pipe.c
View file @
18c08d30
...
...
@@ -125,8 +125,7 @@ static const struct object_ops named_pipe_ops =
/* common to clients and servers */
static
int
pipe_end_get_poll_events
(
struct
fd
*
fd
);
static
int
pipe_end_get_info
(
struct
fd
*
fd
,
struct
get_file_info_reply
*
reply
,
int
*
flags
);
static
int
pipe_end_get_info
(
struct
fd
*
fd
,
int
*
flags
);
/* server end functions */
static
void
pipe_server_dump
(
struct
object
*
obj
,
int
verbose
);
...
...
@@ -471,22 +470,8 @@ static int pipe_client_flush( struct fd *fd, struct event **event )
return
0
;
}
static
int
pipe_end_get_info
(
struct
fd
*
fd
,
struct
get_file_info_reply
*
reply
,
int
*
flags
)
static
int
pipe_end_get_info
(
struct
fd
*
fd
,
int
*
flags
)
{
if
(
reply
)
{
reply
->
type
=
FILE_TYPE_PIPE
;
reply
->
attr
=
0
;
reply
->
access_time
=
0
;
reply
->
write_time
=
0
;
reply
->
size_high
=
0
;
reply
->
size_low
=
0
;
reply
->
links
=
0
;
reply
->
index_high
=
0
;
reply
->
index_low
=
0
;
reply
->
serial
=
0
;
}
*
flags
=
0
;
return
FD_TYPE_DEFAULT
;
}
...
...
server/protocol.def
View file @
18c08d30
...
...
@@ -629,26 +629,6 @@ enum fd_type
@END
/* Get information about a file */
@REQ(get_file_info)
obj_handle_t handle; /* handle to the file */
@REPLY
int type; /* file type */
int attr; /* file attributes */
time_t access_time; /* last access time */
time_t write_time; /* last write time */
time_t change_time; /* last change time */
int size_high; /* file size */
int size_low; /* file size */
int alloc_high; /* size used on disk */
int alloc_low; /* size used on disk */
int links; /* number of links */
int index_high; /* unique index */
int index_low; /* unique index */
unsigned int serial; /* volume serial number */
@END
/* Lock a region of a file */
@REQ(lock_file)
obj_handle_t handle; /* handle to the file */
...
...
server/request.h
View file @
18c08d30
...
...
@@ -144,7 +144,6 @@ DECL_HANDLER(alloc_file_handle);
DECL_HANDLER
(
get_handle_fd
);
DECL_HANDLER
(
truncate_file
);
DECL_HANDLER
(
flush_file
);
DECL_HANDLER
(
get_file_info
);
DECL_HANDLER
(
lock_file
);
DECL_HANDLER
(
unlock_file
);
DECL_HANDLER
(
create_socket
);
...
...
@@ -328,7 +327,6 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(
req_handler
)
req_get_handle_fd
,
(
req_handler
)
req_truncate_file
,
(
req_handler
)
req_flush_file
,
(
req_handler
)
req_get_file_info
,
(
req_handler
)
req_lock_file
,
(
req_handler
)
req_unlock_file
,
(
req_handler
)
req_create_socket
,
...
...
server/serial.c
View file @
18c08d30
...
...
@@ -61,7 +61,7 @@ static void serial_destroy(struct object *obj);
static
int
serial_get_poll_events
(
struct
fd
*
fd
);
static
void
serial_poll_event
(
struct
fd
*
fd
,
int
event
);
static
int
serial_get_info
(
struct
fd
*
fd
,
struct
get_file_info_reply
*
reply
,
int
*
flags
);
static
int
serial_get_info
(
struct
fd
*
fd
,
int
*
flags
);
static
int
serial_flush
(
struct
fd
*
fd
,
struct
event
**
event
);
static
void
serial_queue_async
(
struct
fd
*
fd
,
void
*
ptr
,
unsigned
int
status
,
int
type
,
int
count
);
...
...
@@ -201,25 +201,11 @@ static int serial_get_poll_events( struct fd *fd )
return
events
;
}
static
int
serial_get_info
(
struct
fd
*
fd
,
struct
get_file_info_reply
*
reply
,
int
*
flags
)
static
int
serial_get_info
(
struct
fd
*
fd
,
int
*
flags
)
{
struct
serial
*
serial
=
get_fd_user
(
fd
);
assert
(
serial
->
obj
.
ops
==
&
serial_ops
);
if
(
reply
)
{
reply
->
type
=
FILE_TYPE_CHAR
;
reply
->
attr
=
0
;
reply
->
access_time
=
0
;
reply
->
write_time
=
0
;
reply
->
size_high
=
0
;
reply
->
size_low
=
0
;
reply
->
links
=
0
;
reply
->
index_high
=
0
;
reply
->
index_low
=
0
;
reply
->
serial
=
0
;
}
*
flags
=
0
;
if
(
!
(
serial
->
options
&
(
FILE_SYNCHRONOUS_IO_ALERT
|
FILE_SYNCHRONOUS_IO_NONALERT
)))
*
flags
|=
FD_FLAG_OVERLAPPED
;
...
...
server/smb.c
View file @
18c08d30
...
...
@@ -57,7 +57,7 @@ static void smb_dump( struct object *obj, int verbose );
static
struct
fd
*
smb_get_fd
(
struct
object
*
obj
);
static
void
smb_destroy
(
struct
object
*
obj
);
static
int
smb_get_info
(
struct
fd
*
fd
,
struct
get_file_info_reply
*
reply
,
int
*
flags
);
static
int
smb_get_info
(
struct
fd
*
fd
,
int
*
flags
);
static
int
smb_get_poll_events
(
struct
fd
*
fd
);
struct
smb
...
...
@@ -130,27 +130,12 @@ static int smb_get_poll_events( struct fd *fd )
return
events
;
}
static
int
smb_get_info
(
struct
fd
*
fd
,
struct
get_file_info_reply
*
reply
,
int
*
flags
)
static
int
smb_get_info
(
struct
fd
*
fd
,
int
*
flags
)
{
/* struct smb *smb = get_fd_user( fd ); */
/* assert( smb->obj.ops == &smb_ops ); */
if
(
reply
)
{
reply
->
type
=
FILE_TYPE_CHAR
;
reply
->
attr
=
0
;
reply
->
access_time
=
0
;
reply
->
write_time
=
0
;
reply
->
size_high
=
0
;
reply
->
size_low
=
0
;
reply
->
links
=
0
;
reply
->
index_high
=
0
;
reply
->
index_low
=
0
;
reply
->
serial
=
0
;
}
*
flags
=
0
;
return
FD_TYPE_SMB
;
}
...
...
server/sock.c
View file @
18c08d30
...
...
@@ -93,7 +93,7 @@ static void sock_destroy( struct object *obj );
static
int
sock_get_poll_events
(
struct
fd
*
fd
);
static
void
sock_poll_event
(
struct
fd
*
fd
,
int
event
);
static
int
sock_get_info
(
struct
fd
*
fd
,
struct
get_file_info_reply
*
reply
,
int
*
flags
);
static
int
sock_get_info
(
struct
fd
*
fd
,
int
*
flags
);
static
void
sock_queue_async
(
struct
fd
*
fd
,
void
*
ptr
,
unsigned
int
status
,
int
type
,
int
count
);
static
int
sock_get_error
(
int
err
);
...
...
@@ -475,24 +475,11 @@ static int sock_get_poll_events( struct fd *fd )
return
ev
;
}
static
int
sock_get_info
(
struct
fd
*
fd
,
struct
get_file_info_reply
*
reply
,
int
*
flags
)
static
int
sock_get_info
(
struct
fd
*
fd
,
int
*
flags
)
{
struct
sock
*
sock
=
get_fd_user
(
fd
);
assert
(
sock
->
obj
.
ops
==
&
sock_ops
);
if
(
reply
)
{
reply
->
type
=
FILE_TYPE_PIPE
;
reply
->
attr
=
0
;
reply
->
access_time
=
0
;
reply
->
write_time
=
0
;
reply
->
size_high
=
0
;
reply
->
size_low
=
0
;
reply
->
links
=
0
;
reply
->
index_high
=
0
;
reply
->
index_low
=
0
;
reply
->
serial
=
0
;
}
*
flags
=
0
;
if
(
sock
->
flags
&
WSA_FLAG_OVERLAPPED
)
*
flags
|=
FD_FLAG_OVERLAPPED
;
if
(
sock
->
type
!=
SOCK_STREAM
||
sock
->
state
&
FD_WINE_CONNECTED
)
...
...
server/trace.c
View file @
18c08d30
...
...
@@ -886,28 +886,6 @@ static void dump_flush_file_reply( const struct flush_file_reply *req )
fprintf
(
stderr
,
" event=%p"
,
req
->
event
);
}
static
void
dump_get_file_info_request
(
const
struct
get_file_info_request
*
req
)
{
fprintf
(
stderr
,
" handle=%p"
,
req
->
handle
);
}
static
void
dump_get_file_info_reply
(
const
struct
get_file_info_reply
*
req
)
{
fprintf
(
stderr
,
" type=%d,"
,
req
->
type
);
fprintf
(
stderr
,
" attr=%d,"
,
req
->
attr
);
fprintf
(
stderr
,
" access_time=%ld,"
,
(
long
)
req
->
access_time
);
fprintf
(
stderr
,
" write_time=%ld,"
,
(
long
)
req
->
write_time
);
fprintf
(
stderr
,
" change_time=%ld,"
,
(
long
)
req
->
change_time
);
fprintf
(
stderr
,
" size_high=%d,"
,
req
->
size_high
);
fprintf
(
stderr
,
" size_low=%d,"
,
req
->
size_low
);
fprintf
(
stderr
,
" alloc_high=%d,"
,
req
->
alloc_high
);
fprintf
(
stderr
,
" alloc_low=%d,"
,
req
->
alloc_low
);
fprintf
(
stderr
,
" links=%d,"
,
req
->
links
);
fprintf
(
stderr
,
" index_high=%d,"
,
req
->
index_high
);
fprintf
(
stderr
,
" index_low=%d,"
,
req
->
index_low
);
fprintf
(
stderr
,
" serial=%08x"
,
req
->
serial
);
}
static
void
dump_lock_file_request
(
const
struct
lock_file_request
*
req
)
{
fprintf
(
stderr
,
" handle=%p,"
,
req
->
handle
);
...
...
@@ -2585,7 +2563,6 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_get_handle_fd_request
,
(
dump_func
)
dump_truncate_file_request
,
(
dump_func
)
dump_flush_file_request
,
(
dump_func
)
dump_get_file_info_request
,
(
dump_func
)
dump_lock_file_request
,
(
dump_func
)
dump_unlock_file_request
,
(
dump_func
)
dump_create_socket_request
,
...
...
@@ -2766,7 +2743,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_get_handle_fd_reply
,
(
dump_func
)
0
,
(
dump_func
)
dump_flush_file_reply
,
(
dump_func
)
dump_get_file_info_reply
,
(
dump_func
)
dump_lock_file_reply
,
(
dump_func
)
0
,
(
dump_func
)
dump_create_socket_reply
,
...
...
@@ -2947,7 +2923,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"get_handle_fd"
,
"truncate_file"
,
"flush_file"
,
"get_file_info"
,
"lock_file"
,
"unlock_file"
,
"create_socket"
,
...
...
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