FreeBSD/contrib/subversion/subversion/libsvn_fs_fs/cached_data.c
/* Open the revision file for revision REV in filesystem FS and store
   the newly opened file in FILE.  Seek to location OFFSET before
   returning.  Perform temporary allocations in POOL. */
Open the revision file for revision REV in filesystem FS and store
the newly opened file in FILE.  Seek to location OFFSET before
returning.  Perform temporary allocations in POOL.
Open the revision file for revision REV in filesystem FS and store the newly opened file in FILE . Seek to location OFFSET before returning . Perform temporary allocations in POOL .
static svn_error_t *
open_and_seek_revision(svn_fs_fs__revision_file_t **file,
                       svn_fs_t *fs,
                       svn_revnum_t rev,
                       apr_uint64_t item,
                       apr_pool_t *pool)
{
  svn_fs_fs__revision_file_t *rev_file;
  apr_off_t offset = -1;
  SVN_ERR(svn_fs_fs__ensure_revision_exists(rev, fs, pool));
  SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, rev, pool, pool));
  SVN_ERR(svn_fs_fs__item_offset(&offset, fs, rev_file, rev, NULL, item,
                                 pool));
  SVN_ERR(aligned_seek(fs, rev_file->file, NULL, offset, pool));
  *file = rev_file;
  return SVN_NO_ERROR;
}
static svn_error_t * open_and_seek_revision ( svn_fs_fs__revision_file_t * * file , svn_fs_t * fs , svn_revnum_t rev , apr_uint64_t item , apr_pool_t * pool ) { svn_fs_fs__revision_file_t * rev_file ; apr_off_t offset = -1 ; SVN_ERR ( svn_fs_fs__ensure_revision_exists ( rev , fs , pool ) ) ; SVN_ERR ( svn_fs_fs__open_pack_or_rev_file ( & rev_file , fs , rev , pool , pool ) ) ; SVN_ERR ( svn_fs_fs__item_offset ( & offset , fs , rev_file , rev , NULL , item , pool ) ) ; SVN_ERR ( aligned_seek ( fs , rev_file -> file , NULL , offset , pool ) ) ; * file = rev_file ; return SVN_NO_ERROR ; }
Open the revision file for revision REV in filesystem FS and store
the newly opened file in FILE.
Open the revision file for revision REV in filesystem FS and store the newly opened file in FILE .