Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b2c98569
Commit
b2c98569
authored
Mar 17, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Remove unnecessary pointers in fstab parsing on Solaris.
parent
7e5770d0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
22 deletions
+18
-22
directory.c
dlls/ntdll/directory.c
+18
-22
No files found.
dlls/ntdll/directory.c
View file @
b2c98569
...
@@ -236,24 +236,22 @@ static char *get_default_lpt_device( int num )
...
@@ -236,24 +236,22 @@ static char *get_default_lpt_device( int num )
#include <sys/vfstab.h>
#include <sys/vfstab.h>
static
char
*
parse_vfstab_entries
(
FILE
*
f
,
dev_t
dev
,
ino_t
ino
)
static
char
*
parse_vfstab_entries
(
FILE
*
f
,
dev_t
dev
,
ino_t
ino
)
{
{
struct
vfstab
entry
;
struct
vfstab
vfs_entry
;
struct
vfstab
*
entry
=&
vfs_entry
;
struct
stat
st
;
struct
stat
st
;
char
*
device
;
char
*
device
;
while
(
!
getvfsent
(
f
,
entry
))
while
(
!
getvfsent
(
f
,
&
entry
))
{
{
/* don't even bother stat'ing network mounts, there's no meaningful device anyway */
/* don't even bother stat'ing network mounts, there's no meaningful device anyway */
if
(
!
strcmp
(
entry
->
vfs_fstype
,
"nfs"
)
||
if
(
!
strcmp
(
entry
.
vfs_fstype
,
"nfs"
)
||
!
strcmp
(
entry
->
vfs_fstype
,
"smbfs"
)
||
!
strcmp
(
entry
.
vfs_fstype
,
"smbfs"
)
||
!
strcmp
(
entry
->
vfs_fstype
,
"ncpfs"
))
continue
;
!
strcmp
(
entry
.
vfs_fstype
,
"ncpfs"
))
continue
;
if
(
stat
(
entry
->
vfs_mountp
,
&
st
)
==
-
1
)
continue
;
if
(
stat
(
entry
.
vfs_mountp
,
&
st
)
==
-
1
)
continue
;
if
(
st
.
st_dev
!=
dev
||
st
.
st_ino
!=
ino
)
continue
;
if
(
st
.
st_dev
!=
dev
||
st
.
st_ino
!=
ino
)
continue
;
if
(
!
strcmp
(
entry
->
vfs_fstype
,
"fd"
))
if
(
!
strcmp
(
entry
.
vfs_fstype
,
"fd"
))
{
{
if
((
device
=
strstr
(
entry
->
vfs_mntopts
,
"dev="
)))
if
((
device
=
strstr
(
entry
.
vfs_mntopts
,
"dev="
)))
{
{
char
*
p
=
strchr
(
device
+
4
,
','
);
char
*
p
=
strchr
(
device
+
4
,
','
);
if
(
p
)
*
p
=
0
;
if
(
p
)
*
p
=
0
;
...
@@ -261,7 +259,7 @@ static char *parse_vfstab_entries( FILE *f, dev_t dev, ino_t ino)
...
@@ -261,7 +259,7 @@ static char *parse_vfstab_entries( FILE *f, dev_t dev, ino_t ino)
}
}
}
}
else
else
return
entry
->
vfs_special
;
return
entry
.
vfs_special
;
}
}
return
NULL
;
return
NULL
;
}
}
...
@@ -335,25 +333,23 @@ static char *parse_mount_entries( FILE *f, dev_t dev, ino_t ino )
...
@@ -335,25 +333,23 @@ static char *parse_mount_entries( FILE *f, dev_t dev, ino_t ino )
#include <sys/mnttab.h>
#include <sys/mnttab.h>
static
char
*
parse_mount_entries
(
FILE
*
f
,
dev_t
dev
,
ino_t
ino
)
static
char
*
parse_mount_entries
(
FILE
*
f
,
dev_t
dev
,
ino_t
ino
)
{
{
struct
mnttab
entry
;
volatile
struct
mnttab
mntentry
;
struct
mnttab
*
entry
=&
mntentry
;
struct
stat
st
;
struct
stat
st
;
char
*
device
;
char
*
device
;
while
((
!
getmntent
(
f
,
entry
)
))
while
((
!
getmntent
(
f
,
&
entry
)
))
{
{
/* don't even bother stat'ing network mounts, there's no meaningful device anyway */
/* don't even bother stat'ing network mounts, there's no meaningful device anyway */
if
(
!
strcmp
(
entry
->
mnt_fstype
,
"nfs"
)
||
if
(
!
strcmp
(
entry
.
mnt_fstype
,
"nfs"
)
||
!
strcmp
(
entry
->
mnt_fstype
,
"smbfs"
)
||
!
strcmp
(
entry
.
mnt_fstype
,
"smbfs"
)
||
!
strcmp
(
entry
->
mnt_fstype
,
"ncpfs"
))
continue
;
!
strcmp
(
entry
.
mnt_fstype
,
"ncpfs"
))
continue
;
if
(
stat
(
entry
->
mnt_mountp
,
&
st
)
==
-
1
)
continue
;
if
(
stat
(
entry
.
mnt_mountp
,
&
st
)
==
-
1
)
continue
;
if
(
st
.
st_dev
!=
dev
||
st
.
st_ino
!=
ino
)
continue
;
if
(
st
.
st_dev
!=
dev
||
st
.
st_ino
!=
ino
)
continue
;
if
(
!
strcmp
(
entry
->
mnt_fstype
,
"fd"
))
if
(
!
strcmp
(
entry
.
mnt_fstype
,
"fd"
))
{
{
if
((
device
=
strstr
(
entry
->
mnt_mntopts
,
"dev="
)))
if
((
device
=
strstr
(
entry
.
mnt_mntopts
,
"dev="
)))
{
{
char
*
p
=
strchr
(
device
+
4
,
','
);
char
*
p
=
strchr
(
device
+
4
,
','
);
if
(
p
)
*
p
=
0
;
if
(
p
)
*
p
=
0
;
...
@@ -361,7 +357,7 @@ static char *parse_mount_entries( FILE *f, dev_t dev, ino_t ino )
...
@@ -361,7 +357,7 @@ static char *parse_mount_entries( FILE *f, dev_t dev, ino_t ino )
}
}
}
}
else
else
return
entry
->
mnt_special
;
return
entry
.
mnt_special
;
}
}
return
NULL
;
return
NULL
;
}
}
...
...
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