FreeBSD/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c
/* Read FS's UUID file and store the data in the FS struct. */
Read FS's UUID file and store the data in the FS struct.
Read FS ' s UUID file and store the data in the FS struct .
static svn_error_t *
read_uuid(svn_fs_t *fs,
          apr_pool_t *scratch_pool)
{
  fs_fs_data_t *ffd = fs->fsap_data;
  apr_file_t *uuid_file;
  char buf[APR_UUID_FORMATTED_LENGTH + 2];
  apr_size_t limit;
  SVN_ERR(svn_io_file_open(&uuid_file, path_uuid(fs, scratch_pool),
                           APR_READ | APR_BUFFERED, APR_OS_DEFAULT,
                           scratch_pool));
  limit = sizeof(buf);
  SVN_ERR(svn_io_read_length_line(uuid_file, buf, &limit, scratch_pool));
  fs->uuid = apr_pstrdup(fs->pool, buf);
  if (ffd->format >= SVN_FS_FS__MIN_INSTANCE_ID_FORMAT)
    {
      limit = sizeof(buf);
      SVN_ERR(svn_io_read_length_line(uuid_file, buf, &limit,
                                      scratch_pool));
      ffd->instance_id = apr_pstrdup(fs->pool, buf);
    }
  else
    {
      ffd->instance_id = fs->uuid;
    }
  SVN_ERR(svn_io_file_close(uuid_file, scratch_pool));
  return SVN_NO_ERROR;
}
static svn_error_t * read_uuid ( svn_fs_t * fs , apr_pool_t * scratch_pool ) { fs_fs_data_t * ffd = fs -> fsap_data ; apr_file_t * uuid_file ; char buf [ APR_UUID_FORMATTED_LENGTH + 2 ] ; apr_size_t limit ; SVN_ERR ( svn_io_file_open ( & uuid_file , path_uuid ( fs , scratch_pool ) , APR_READ | APR_BUFFERED , APR_OS_DEFAULT , scratch_pool ) ) ; limit = sizeof ( buf ) ; SVN_ERR ( svn_io_read_length_line ( uuid_file , buf , & limit , scratch_pool ) ) ; fs -> uuid = apr_pstrdup ( fs -> pool , buf ) ; if ( ffd -> format >= SVN_FS_FS__MIN_INSTANCE_ID_FORMAT ) { limit = sizeof ( buf ) ; SVN_ERR ( svn_io_read_length_line ( uuid_file , buf , & limit , scratch_pool ) ) ; ffd -> instance_id = apr_pstrdup ( fs -> pool , buf ) ; } else { ffd -> instance_id = fs -> uuid ; } SVN_ERR ( svn_io_file_close ( uuid_file , scratch_pool ) ) ; return SVN_NO_ERROR ; }
Read FS's UUID file and store the data in the FS struct.
Read FS ' s UUID file and store the data in the FS struct .
/* Read the repository uuid. */ /* Read the instance ID. */