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
c1325424
Commit
c1325424
authored
Jul 28, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed fd to unix_fd in the closed_fd structure to make the code a
bit clearer.
parent
88e3669b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
fd.c
server/fd.c
+10
-10
No files found.
server/fd.c
View file @
c1325424
...
...
@@ -126,7 +126,7 @@ static inline int epoll_wait( int epfd, struct epoll_event *events, int maxevent
struct
closed_fd
{
struct
list
entry
;
/* entry in inode closed list */
int
fd
;
/* the unix file descriptor */
int
unix_fd
;
/* the unix file descriptor */
char
unlink
[
1
];
/* name to unlink on close (if any) */
};
...
...
@@ -560,10 +560,10 @@ static void inode_close_pending( struct inode *inode )
struct
closed_fd
*
fd
=
LIST_ENTRY
(
ptr
,
struct
closed_fd
,
entry
);
struct
list
*
next
=
list_next
(
&
inode
->
closed
,
ptr
);
if
(
fd
->
fd
!=
-
1
)
if
(
fd
->
unix_
fd
!=
-
1
)
{
close
(
fd
->
fd
);
fd
->
fd
=
-
1
;
close
(
fd
->
unix_
fd
);
fd
->
unix_
fd
=
-
1
;
}
if
(
!
fd
->
unlink
)
/* get rid of it unless there's an unlink pending on that file */
{
...
...
@@ -599,7 +599,7 @@ static void inode_destroy( struct object *obj )
{
struct
closed_fd
*
fd
=
LIST_ENTRY
(
ptr
,
struct
closed_fd
,
entry
);
list_remove
(
ptr
);
if
(
fd
->
fd
!=
-
1
)
close
(
fd
->
fd
);
if
(
fd
->
unix_fd
!=
-
1
)
close
(
fd
->
unix_
fd
);
if
(
fd
->
unlink
[
0
])
{
/* make sure it is still the same file */
...
...
@@ -646,7 +646,7 @@ static struct inode *get_inode( dev_t dev, ino_t ino )
return
inode
;
}
/* add fd to the in
do
e list of file descriptors to close */
/* add fd to the in
od
e list of file descriptors to close */
static
void
inode_add_closed_fd
(
struct
inode
*
inode
,
struct
closed_fd
*
fd
)
{
if
(
!
list_empty
(
&
inode
->
locks
))
...
...
@@ -655,13 +655,13 @@ static void inode_add_closed_fd( struct inode *inode, struct closed_fd *fd )
}
else
if
(
fd
->
unlink
[
0
])
/* close the fd but keep the structure around for unlink */
{
close
(
fd
->
fd
);
fd
->
fd
=
-
1
;
if
(
fd
->
unix_fd
!=
-
1
)
close
(
fd
->
unix_
fd
);
fd
->
unix_
fd
=
-
1
;
list_add_head
(
&
inode
->
closed
,
&
fd
->
entry
);
}
else
/* no locks on this inode and no unlink, get rid of the fd */
{
close
(
fd
->
fd
);
if
(
fd
->
unix_fd
!=
-
1
)
close
(
fd
->
unix_
fd
);
free
(
fd
);
}
}
...
...
@@ -1217,7 +1217,7 @@ struct fd *open_fd( struct fd *fd, const char *name, int flags, mode_t *mode,
free
(
closed_fd
);
return
NULL
;
}
closed_fd
->
fd
=
fd
->
unix_fd
;
closed_fd
->
unix_
fd
=
fd
->
unix_fd
;
closed_fd
->
unlink
[
0
]
=
0
;
fstat
(
fd
->
unix_fd
,
&
st
);
*
mode
=
st
.
st_mode
;
...
...
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