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
639e07be
Commit
639e07be
authored
Oct 22, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Abstract the support for comparing file identities.
parent
4e772228
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
directory.c
dlls/ntdll/directory.c
+10
-4
No files found.
dlls/ntdll/directory.c
View file @
639e07be
...
...
@@ -139,11 +139,13 @@ static inline int getdents64( int fd, char *de, unsigned int size )
#define MAX_IGNORED_FILES 4
st
atic
struct
st
ruct
file_identity
{
dev_t
dev
;
ino_t
ino
;
}
ignored_files
[
MAX_IGNORED_FILES
];
};
static
struct
file_identity
ignored_files
[
MAX_IGNORED_FILES
];
static
int
ignored_files_count
;
static
const
unsigned
int
max_dir_info_size
=
FIELD_OFFSET
(
FILE_BOTH_DIR_INFORMATION
,
FileName
[
MAX_DIR_ENTRY_LEN
]
);
...
...
@@ -197,13 +199,17 @@ static inline void ignore_file( const char *name )
}
}
static
inline
BOOL
is_same_file
(
const
struct
file_identity
*
file
,
const
struct
stat
*
st
)
{
return
st
->
st_dev
==
file
->
dev
&&
st
->
st_ino
==
file
->
ino
;
}
static
inline
BOOL
is_ignored_file
(
const
struct
stat
*
st
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
ignored_files_count
;
i
++
)
if
(
ignored_files
[
i
].
dev
==
st
->
st_dev
&&
ignored_files
[
i
].
ino
==
st
->
st_ino
)
return
TRUE
;
if
(
is_same_file
(
&
ignored_files
[
i
],
st
))
return
TRUE
;
return
FALSE
;
}
...
...
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