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
2139df00
Commit
2139df00
authored
Apr 07, 2014
by
Huw Davies
Committed by
Alexandre Julliard
Apr 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add a replacement getmntent for Android.
Bionic has a stub function named getmntent which outputs an unimplemented message.
parent
f4f066ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
101 additions
and
0 deletions
+101
-0
directory.c
dlls/ntdll/directory.c
+101
-0
No files found.
dlls/ntdll/directory.c
View file @
2139df00
...
...
@@ -365,6 +365,107 @@ static char *get_default_lpt_device( int num )
return
ret
;
}
#ifdef __ANDROID__
static
char
*
unescape_field
(
char
*
str
)
{
char
*
in
,
*
out
;
for
(
in
=
out
=
str
;
*
in
;
in
++
,
out
++
)
{
*
out
=
*
in
;
if
(
in
[
0
]
==
'\\'
)
{
if
(
in
[
1
]
==
'\\'
)
{
out
[
0
]
=
'\\'
;
in
++
;
}
else
if
(
in
[
1
]
==
'0'
&&
in
[
2
]
==
'4'
&&
in
[
3
]
==
'0'
)
{
out
[
0
]
=
' '
;
in
+=
3
;
}
else
if
(
in
[
1
]
==
'0'
&&
in
[
2
]
==
'1'
&&
in
[
3
]
==
'1'
)
{
out
[
0
]
=
'\t'
;
in
+=
3
;
}
else
if
(
in
[
1
]
==
'0'
&&
in
[
2
]
==
'1'
&&
in
[
3
]
==
'2'
)
{
out
[
0
]
=
'\n'
;
in
+=
3
;
}
else
if
(
in
[
1
]
==
'1'
&&
in
[
2
]
==
'3'
&&
in
[
3
]
==
'4'
)
{
out
[
0
]
=
'\\'
;
in
+=
3
;
}
}
}
*
out
=
'\0'
;
return
str
;
}
static
inline
char
*
get_field
(
char
**
str
)
{
char
*
ret
;
ret
=
strsep
(
str
,
"
\t
"
);
if
(
*
str
)
*
str
+=
strspn
(
*
str
,
"
\t
"
);
return
ret
;
}
/************************************************************************
* getmntent_replacement
*
* getmntent replacement for Android.
*
* NB returned static buffer is not thread safe; protect with dir_section.
*/
static
struct
mntent
*
getmntent_replacement
(
FILE
*
f
)
{
static
struct
mntent
entry
;
static
char
buf
[
4096
];
char
*
p
,
*
start
;
do
{
if
(
!
fgets
(
buf
,
sizeof
(
buf
),
f
))
return
NULL
;
p
=
strchr
(
buf
,
'\n'
);
if
(
p
)
*
p
=
'\0'
;
else
/* Partially unread line, move file ptr to end */
{
char
tmp
[
1024
];
while
(
fgets
(
tmp
,
sizeof
(
tmp
),
f
))
if
(
strchr
(
tmp
,
'\n'
))
break
;
}
start
=
buf
+
strspn
(
buf
,
"
\t
"
);
}
while
(
start
[
0
]
==
'\0'
||
start
[
0
]
==
'#'
);
p
=
get_field
(
&
start
);
entry
.
mnt_fsname
=
p
?
unescape_field
(
p
)
:
(
char
*
)
""
;
p
=
get_field
(
&
start
);
entry
.
mnt_dir
=
p
?
unescape_field
(
p
)
:
(
char
*
)
""
;
p
=
get_field
(
&
start
);
entry
.
mnt_type
=
p
?
unescape_field
(
p
)
:
(
char
*
)
""
;
p
=
get_field
(
&
start
);
entry
.
mnt_opts
=
p
?
unescape_field
(
p
)
:
(
char
*
)
""
;
p
=
get_field
(
&
start
);
entry
.
mnt_freq
=
p
?
atoi
(
p
)
:
0
;
p
=
get_field
(
&
start
);
entry
.
mnt_passno
=
p
?
atoi
(
p
)
:
0
;
return
&
entry
;
}
#define getmntent getmntent_replacement
#endif
/***********************************************************************
* DIR_get_drives_info
...
...
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