diff --git a/src/io/Open.cxx b/src/io/Open.cxx index 1d5bb11f9..79455fe9f 100644 --- a/src/io/Open.cxx +++ b/src/io/Open.cxx @@ -34,10 +34,10 @@ #include UniqueFileDescriptor -OpenReadOnly(const char *path) +OpenReadOnly(const char *path, int flags) { UniqueFileDescriptor fd; - if (!fd.OpenReadOnly(path)) + if (!fd.Open(path, O_RDONLY|flags)) throw FormatErrno("Failed to open '%s'", path); return fd; diff --git a/src/io/Open.hxx b/src/io/Open.hxx index 08694a3ed..e2db76203 100644 --- a/src/io/Open.hxx +++ b/src/io/Open.hxx @@ -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);