1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | htri_t
ss_pers_iswritable(ss_pers_t *pers)
{
SS_ENTER(ss_pers_iswritable, htri_t);
htri_t retval=FALSE;
ss_gfile_t *gfile=NULL;
ss_scope_t scope;
if (NULL==(gfile=SS_GFILE_LINK(pers))) SS_ERROR(FAILED);
if (0==gfile->cur_open) goto done; /*file is not open*/
if (NULL==ss_pers_scope(pers, &scope)) SS_ERROR(FAILED);
if (ss_scope_isopen(&scope)<=0) {
SS_STATUS_OK;
goto done; /*scope is not open*/
}
if ((retval=ss_scope_iswritable(&scope))<0) SS_ERROR(FAILED);
done:
SS_CLEANUP:
SS_LEAVE(retval);
}
|