Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
8765a0da
Commit
8765a0da
authored
17 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
ntdll: Fixed file system name comparison on *BSD.
parent
0c9c00cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/ntdll/file.c
+7
-12
7 additions, 12 deletions
dlls/ntdll/file.c
server/fd.c
+2
-4
2 additions, 4 deletions
server/fd.c
with
9 additions
and
16 deletions
dlls/ntdll/file.c
+
7
−
12
View file @
8765a0da
...
...
@@ -1736,24 +1736,21 @@ NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__APPLE__)
/* helper for FILE_GetDeviceInfo to hide some platform differences in fstatfs */
static
inline
void
get_device_info_fstatfs
(
FILE_FS_DEVICE_INFORMATION
*
info
,
const
char
*
fstypename
,
size_t
fstypesize
,
unsigned
int
flags
)
unsigned
int
flags
)
{
if
(
!
strncmp
(
"cd9660"
,
fstypename
,
fstypesize
)
||
!
strncmp
(
"udf"
,
fstypename
,
fstypesize
))
if
(
!
strcmp
(
"cd9660"
,
fstypename
)
||
!
strcmp
(
"udf"
,
fstypename
))
{
info
->
DeviceType
=
FILE_DEVICE_CD_ROM_FILE_SYSTEM
;
/* Don't assume read-only, let the mount options set it below */
info
->
Characteristics
|=
FILE_REMOVABLE_MEDIA
;
}
else
if
(
!
strncmp
(
"nfs"
,
fstypename
,
fstypesize
)
||
!
strncmp
(
"nwfs"
,
fstypename
,
fstypesize
)
||
!
strncmp
(
"smbfs"
,
fstypename
,
fstypesize
)
||
!
strncmp
(
"afpfs"
,
fstypename
,
fstypesize
))
else
if
(
!
strcmp
(
"nfs"
,
fstypename
)
||
!
strcmp
(
"nwfs"
,
fstypename
)
||
!
strcmp
(
"smbfs"
,
fstypename
)
||
!
strcmp
(
"afpfs"
,
fstypename
))
{
info
->
DeviceType
=
FILE_DEVICE_NETWORK_FILE_SYSTEM
;
info
->
Characteristics
|=
FILE_REMOTE_DEVICE
;
}
else
if
(
!
str
n
cmp
(
"procfs"
,
fstypename
,
fstypesize
))
else
if
(
!
strcmp
(
"procfs"
,
fstypename
))
info
->
DeviceType
=
FILE_DEVICE_VIRTUAL_DISK
;
else
info
->
DeviceType
=
FILE_DEVICE_DISK_FILE_SYSTEM
;
...
...
@@ -1849,16 +1846,14 @@ static NTSTATUS get_device_info( int fd, FILE_FS_DEVICE_INFORMATION *info )
if
(
fstatfs
(
fd
,
&
stfs
)
<
0
)
info
->
DeviceType
=
FILE_DEVICE_DISK_FILE_SYSTEM
;
else
get_device_info_fstatfs
(
info
,
stfs
.
f_fstypename
,
sizeof
(
stfs
.
f_fstypename
),
stfs
.
f_flags
);
get_device_info_fstatfs
(
info
,
stfs
.
f_fstypename
,
stfs
.
f_flags
);
#elif defined(__NetBSD__)
struct
statvfs
stfs
;
if
(
fstatvfs
(
fd
,
&
stfs
)
<
0
)
info
->
DeviceType
=
FILE_DEVICE_DISK_FILE_SYSTEM
;
else
get_device_info_fstatfs
(
info
,
stfs
.
f_fstypename
,
sizeof
(
stfs
.
f_fstypename
),
stfs
.
f_flag
);
get_device_info_fstatfs
(
info
,
stfs
.
f_fstypename
,
stfs
.
f_flag
);
#elif defined(sun)
/* Use dkio to work out device types */
{
...
...
This diff is collapsed.
Click to expand it.
server/fd.c
+
2
−
4
View file @
8765a0da
...
...
@@ -802,14 +802,12 @@ static int is_device_removable( dev_t dev, int unix_fd )
struct
statfs
stfs
;
if
(
fstatfs
(
unix_fd
,
&
stfs
)
==
-
1
)
return
0
;
return
(
!
strncmp
(
"cd9660"
,
stfs
.
f_fstypename
,
sizeof
(
stfs
.
f_fstypename
))
||
!
strncmp
(
"udf"
,
stfs
.
f_fstypename
,
sizeof
(
stfs
.
f_fstypename
)));
return
(
!
strcmp
(
"cd9660"
,
stfs
.
f_fstypename
)
||
!
strcmp
(
"udf"
,
stfs
.
f_fstypename
));
#elif defined(__NetBSD__)
struct
statvfs
stfs
;
if
(
fstatvfs
(
unix_fd
,
&
stfs
)
==
-
1
)
return
0
;
return
(
!
strncmp
(
"cd9660"
,
stfs
.
f_fstypename
,
sizeof
(
stfs
.
f_fstypename
))
||
!
strncmp
(
"udf"
,
stfs
.
f_fstypename
,
sizeof
(
stfs
.
f_fstypename
)));
return
(
!
strcmp
(
"cd9660"
,
stfs
.
f_fstypename
)
||
!
strcmp
(
"udf"
,
stfs
.
f_fstypename
));
#elif defined(sun)
# include <sys/dkio.h>
# include <sys/vtoc.h>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment