#include <jf/jf_config.h>
#include <jf/jf_errors.h>
#include <jf/jf_journal_file_tab.h>
#include <jf/jf_crash_simul.h>
#include <jf_journal.h>
Go to the source code of this file.
Defines | |
#define | JF_TRACE_MODULE JF_TRACE_MOD_LIB_JOURNAL_FILE_TAB |
Functions | |
int | jf_journal_file_tab_add (jf_journal_file_tab_t *jft, const jf_journal_file_t *jf, jf_word_t *id) |
void | jf_journal_file_tab_create (jf_journal_file_tab_t *jft) |
int | jf_journal_file_tab_del (jf_journal_file_tab_t *jft, jf_word_t id) |
void | jf_journal_file_tab_destroy (jf_journal_file_tab_t *jft) |
int | jf_journal_file_tab_dump (const jf_journal_file_tab_t *jft, FILE *stream, jf_word_t flags, jf_word_t id) |
int | jf_journal_file_tab_init (jf_journal_file_tab_t *jft, jf_word_t max_files) |
int | jf_journal_file_tab_restore (jf_journal_file_tab_t *jft, FILE *stream) |
int | jf_journal_file_tab_search (const jf_journal_file_tab_t *jft, const char *path, jf_word_t *pos) |
int | jf_journal_file_tab_trace (const jf_journal_file_tab_t *jft, const char *method, FILE *out_stream) |
|
Definition at line 45 of file jf_journal_file_tab.c. |
|
Add a new file path to journaled file table
References CATCH, jf_journal_file_tab_t::files, JF_RC_CONTAINER_FULL, JF_RC_INTERNAL_ERROR, JF_RC_OK, JF_TRACE, jf_word_t, jf_journal_file_tab_t::max_files, jf_journal_file_tab_t::number_of_files, and THROW. Referenced by jf_journal_attach_file(), and jf_journal_create(). |
|
Reset a journaled file table
References jf_journal_file_tab_t::files, jf_journal_file_tab_t::max_files, and jf_journal_file_tab_t::number_of_files. Referenced by jf_journal_create(), and jf_journal_load(). |
|
Remove a journaled file from table
References CATCH, jf_journal_file_tab_t::files, JF_RC_INTERNAL_ERROR, JF_RC_NULL_OBJECT, JF_RC_OK, JF_RC_OUT_OF_RANGE, JF_TRACE, jf_word_t, jf_journal_file_tab_t::number_of_files, and THROW. Referenced by jf_journal_util_leave(). |
|
Release a journaled file table
References jf_journal_file_tab_t::files, jf_journal_file_destroy(), jf_word_t, jf_journal_file_tab_t::max_files, and jf_journal_file_tab_t::number_of_files. Referenced by jf_journal_close(), jf_journal_create(), and jf_journal_load(). |
|
|
Initialize a journaled file table for usage
References CATCH, jf_journal_file_tab_t::files, JF_RC_INTERNAL_ERROR, JF_RC_MALLOC_ERROR, JF_RC_OK, JF_TRACE, jf_word_t, jf_journal_file_tab_t::max_files, and THROW. Referenced by jf_journal_create(), and jf_journal_file_tab_restore(). |
|
Restore the content of a journaled file table from a valid stream
References jf_journal_file_t::cache_file, CATCH, jf_journal_file_t::file_path, jf_journal_file_tab_t::files, jf_cache_file_create(), JF_JOURNAL_FILE_MAX_PATH_SIZE, jf_journal_file_set_stream(), jf_journal_file_tab_init(), jf_journal_file_tab_is_void(), JF_JOURNAL_JOURNAL_FILE_ID, JF_RC_FREAD_ERROR, JF_RC_INTERNAL_ERROR, JF_RC_MALLOC_ERROR, JF_RC_OBJ_NOT_VOID, JF_RC_OK, JF_TRACE, jf_word_t, jf_journal_file_t::last_pos, jf_journal_file_t::last_size, jf_journal_file_tab_t::max_files, jf_journal_file_tab_t::number_of_files, jf_journal_file_t::status, and THROW. Referenced by jf_journal_load(). |
|
Look for a path in a file table: if found, the position will be stored in "pos", else a JF_RC_OBJ_NOT_FOUND reason code is returned
References CATCH, jf_journal_file_t::file_path, jf_journal_file_tab_t::files, JF_JOURNAL_FIRST_FILE_ID, JF_RC_INTERNAL_ERROR, JF_RC_OBJ_NOT_FOUND, JF_RC_OK, JF_TRACE, jf_word_t, jf_journal_file_tab_t::number_of_files, and THROW. Referenced by jf_journal_attach_file(), jf_journal_open_attach_file(), jf_journal_util_leave(), and jf_journal_util_rename(). |
|
Trace journal file table content to stream
References jf_journal_file_tab_t::files, jf_journal_file_get_path(), JF_OFFSET_T_FORMAT, jf_word_t, jf_journal_file_tab_t::max_files, and jf_journal_file_tab_t::number_of_files. Referenced by jf_journal_trace(). |