Adapted because of the changes made to _kern_open_query().

Implemented BQuery::Rewind() - there is no reason not to do this, as the
kernel has no extra work because of this.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10400 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-12-12 20:41:10 +00:00
parent f6743bd145
commit 4d875b0525

View File

@ -1,6 +1,6 @@
//----------------------------------------------------------------------
// This software is part of the OpenBeOS distribution and is covered
// by the OpenBeOS license.
// This software is part of the Haiku distribution and is covered
// by the MIT license.
//---------------------------------------------------------------------
/*!
\file Query.cpp
@ -516,16 +516,17 @@ BQuery::Fetch()
{
if (_HasFetched())
return B_NOT_ALLOWED;
_EvaluateStack();
if (!fPredicate || fDevice < 0)
return B_NO_INIT;
if (fLive) {
fQueryFd = _kern_open_query(fDevice, fPredicate, B_LIVE_QUERY,
fPort, fToken);
} else
fQueryFd = _kern_open_query(fDevice, fPredicate, 0, -1, -1);
fQueryFd = _kern_open_query(fDevice, fPredicate, strlen(fPredicate),
fLive ? B_LIVE_QUERY : 0, fPort, fToken);
if (fQueryFd < 0)
return fQueryFd;
return B_OK;
}
@ -627,13 +628,15 @@ BQuery::GetNextDirents(struct dirent *buf, size_t length, int32 count)
}
// Rewind
/*! \brief Unimplemented method of the BEntryList interface.
\return \c B_ERROR.
/*! \brief Rewinds the entry list back to the first entry.
\return
- \c B_OK on success,
- \c B_FILE_ERROR if Fetch() has not yet been called
*/
status_t
BQuery::Rewind()
{
return B_ERROR;
return _kern_rewind_dir(fQueryFd);
}
// CountEntries