Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Иван Мажукин
mpd
Commits
a584141c
Commit
a584141c
authored
Apr 30, 2020
by
Max Kellermann
Committed by
Max Kellermann
Dec 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
io/Open: add `flags` parameter to OpenReadOnly()
parent
4e88f95f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
Open.cxx
src/io/Open.cxx
+2
-2
Open.hxx
src/io/Open.hxx
+1
-1
No files found.
src/io/Open.cxx
View file @
a584141c
...
...
@@ -34,10 +34,10 @@
#include <fcntl.h>
UniqueFileDescriptor
OpenReadOnly
(
const
char
*
path
)
OpenReadOnly
(
const
char
*
path
,
int
flags
)
{
UniqueFileDescriptor
fd
;
if
(
!
fd
.
Open
ReadOnly
(
path
))
if
(
!
fd
.
Open
(
path
,
O_RDONLY
|
flags
))
throw
FormatErrno
(
"Failed to open '%s'"
,
path
);
return
fd
;
...
...
src/io/Open.hxx
View file @
a584141c
...
...
@@ -34,7 +34,7 @@ class FileDescriptor;
class
UniqueFileDescriptor
;
UniqueFileDescriptor
OpenReadOnly
(
const
char
*
path
);
OpenReadOnly
(
const
char
*
path
,
int
flags
=
0
);
UniqueFileDescriptor
OpenWriteOnly
(
const
char
*
path
,
int
flags
=
0
);
...
...
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