Added two open() versions to our kernel_interface, that re-try opening read-only, if desired. They are now used in BDirectory and BNode, which formerly failed on read-only devices.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2677 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -68,11 +68,25 @@ status_t stat_dev(dev_t dev, fs_info* info);
|
||||
it doesn't already exist). */
|
||||
status_t open(const char *path, OpenFlags flags, FileDescriptor &result);
|
||||
|
||||
/*! \brief Same as the other version of open() except the file is created with the
|
||||
/*! \brief Same as the first version, but tries to open read-only, if
|
||||
first the attempt failed with B_READ_ONLY_DEVICE or
|
||||
B_PERMISSION_DENIED and \a fallBackToReadOnly is \c true.
|
||||
*/
|
||||
status_t open(const char *path, OpenFlags flags, FileDescriptor &result,
|
||||
bool fallBackToReadOnly);
|
||||
|
||||
/*! \brief Same as the first version of open() except the file is created with the
|
||||
permissions given by creationFlags if it doesn't exist. */
|
||||
status_t open(const char *path, OpenFlags flags, CreationFlags creationFlags,
|
||||
FileDescriptor &result);
|
||||
|
||||
/*! \brief Same as the third version, but tries to open read-only, if
|
||||
first the attempt failed with B_READ_ONLY_DEVICE or
|
||||
B_PERMISSION_DENIED and \a fallBackToReadOnly is \c true.
|
||||
*/
|
||||
status_t open(const char *path, OpenFlags flags, CreationFlags creationFlags,
|
||||
FileDescriptor &result, bool fallBackToReadOnly);
|
||||
|
||||
/*! \brief Closes a previously open()ed file. */
|
||||
status_t close( FileDescriptor file );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user