mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-06-07 19:58:50 +00:00
backend: rename struct
`bookmarkfs_backend_init_resp` -> `bookmarkfs_backend_create_resp`, since it is used for `backend_create` instead of `backend_init`.
This commit is contained in:
parent
b699a613ef
commit
22263e48f2
5 changed files with 19 additions and 19 deletions
|
@ -90,13 +90,13 @@ enum bookmarkfs_object_type {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct bookmarkfs_backend_conf;
|
struct bookmarkfs_backend_conf;
|
||||||
struct bookmarkfs_backend_init_resp;
|
struct bookmarkfs_backend_create_resp;
|
||||||
struct bookmarkfs_bookmark_entry;
|
struct bookmarkfs_bookmark_entry;
|
||||||
struct bookmarkfs_bookmark_stat;
|
struct bookmarkfs_bookmark_stat;
|
||||||
|
|
||||||
typedef int (bookmarkfs_backend_create_func) (
|
typedef int (bookmarkfs_backend_create_func) (
|
||||||
struct bookmarkfs_backend_conf const *conf,
|
struct bookmarkfs_backend_conf const *conf,
|
||||||
struct bookmarkfs_backend_init_resp *resp
|
struct bookmarkfs_backend_create_resp *resp
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef void (bookmarkfs_backend_free_func) (
|
typedef void (bookmarkfs_backend_free_func) (
|
||||||
|
@ -116,8 +116,8 @@ typedef int (bookmarkfs_backend_mkfs_func) (
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef int (bookmarkfs_backend_sandbox_func) (
|
typedef int (bookmarkfs_backend_sandbox_func) (
|
||||||
void *backend_ctx,
|
void *backend_ctx,
|
||||||
struct bookmarkfs_backend_init_resp *resp
|
struct bookmarkfs_backend_create_resp *resp
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef int (bookmarkfs_backend_sync_func) (
|
typedef int (bookmarkfs_backend_sync_func) (
|
||||||
|
@ -248,7 +248,7 @@ struct bookmarkfs_backend {
|
||||||
bookmarkfs_bookmark_rename_func *bookmark_rename;
|
bookmarkfs_bookmark_rename_func *bookmark_rename;
|
||||||
bookmarkfs_bookmark_set_func *bookmark_set;
|
bookmarkfs_bookmark_set_func *bookmark_set;
|
||||||
|
|
||||||
bookmarkfs_object_free_func *object_free;
|
bookmarkfs_object_free_func *object_free;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct bookmarkfs_backend_conf {
|
struct bookmarkfs_backend_conf {
|
||||||
|
@ -259,7 +259,7 @@ struct bookmarkfs_backend_conf {
|
||||||
struct bookmarkfs_conf_opt *opts;
|
struct bookmarkfs_conf_opt *opts;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct bookmarkfs_backend_init_resp {
|
struct bookmarkfs_backend_create_resp {
|
||||||
char const *name;
|
char const *name;
|
||||||
void *backend_ctx;
|
void *backend_ctx;
|
||||||
uint64_t bookmarks_root_id;
|
uint64_t bookmarks_root_id;
|
||||||
|
|
|
@ -1691,8 +1691,8 @@ store_load (
|
||||||
|
|
||||||
static int
|
static int
|
||||||
backend_create (
|
backend_create (
|
||||||
struct bookmarkfs_backend_conf const *conf,
|
struct bookmarkfs_backend_conf const *conf,
|
||||||
struct bookmarkfs_backend_init_resp *resp
|
struct bookmarkfs_backend_create_resp *resp
|
||||||
) {
|
) {
|
||||||
#ifndef BOOKMARKFS_BACKEND_CHROMIUM_WRITE
|
#ifndef BOOKMARKFS_BACKEND_CHROMIUM_WRITE
|
||||||
if (!(conf->flags & BOOKMARKFS_READONLY)) {
|
if (!(conf->flags & BOOKMARKFS_READONLY)) {
|
||||||
|
@ -1819,8 +1819,8 @@ backend_init (
|
||||||
|
|
||||||
static int
|
static int
|
||||||
backend_sandbox (
|
backend_sandbox (
|
||||||
void *backend_ctx,
|
void *backend_ctx,
|
||||||
struct bookmarkfs_backend_init_resp *UNUSED_VAR(resp)
|
struct bookmarkfs_backend_create_resp *UNUSED_VAR(resp)
|
||||||
) {
|
) {
|
||||||
struct backend_ctx *ctx = backend_ctx;
|
struct backend_ctx *ctx = backend_ctx;
|
||||||
|
|
||||||
|
|
|
@ -2660,8 +2660,8 @@ store_check_cb (
|
||||||
|
|
||||||
static int
|
static int
|
||||||
backend_create (
|
backend_create (
|
||||||
struct bookmarkfs_backend_conf const *conf,
|
struct bookmarkfs_backend_conf const *conf,
|
||||||
struct bookmarkfs_backend_init_resp *resp
|
struct bookmarkfs_backend_create_resp *resp
|
||||||
) {
|
) {
|
||||||
bool readonly = conf->flags & BOOKMARKFS_BACKEND_READONLY;
|
bool readonly = conf->flags & BOOKMARKFS_BACKEND_READONLY;
|
||||||
if (!readonly) {
|
if (!readonly) {
|
||||||
|
@ -2840,8 +2840,8 @@ backend_init (
|
||||||
|
|
||||||
static int
|
static int
|
||||||
backend_sandbox (
|
backend_sandbox (
|
||||||
void *backend_ctx,
|
void *backend_ctx,
|
||||||
struct bookmarkfs_backend_init_resp *resp
|
struct bookmarkfs_backend_create_resp *resp
|
||||||
) {
|
) {
|
||||||
struct backend_ctx *ctx = backend_ctx;
|
struct backend_ctx *ctx = backend_ctx;
|
||||||
|
|
||||||
|
|
|
@ -293,7 +293,7 @@ fsck_create (
|
||||||
.store_path = path,
|
.store_path = path,
|
||||||
.opts = opts,
|
.opts = opts,
|
||||||
};
|
};
|
||||||
struct bookmarkfs_backend_init_resp resp = {
|
struct bookmarkfs_backend_create_resp resp = {
|
||||||
.bookmarks_root_id = UINT64_MAX,
|
.bookmarks_root_id = UINT64_MAX,
|
||||||
.tags_root_id = UINT64_MAX,
|
.tags_root_id = UINT64_MAX,
|
||||||
};
|
};
|
||||||
|
@ -437,7 +437,7 @@ fsck_sandbox (
|
||||||
) {
|
) {
|
||||||
struct fsck_ctx *ctx = fsck_ctx;
|
struct fsck_ctx *ctx = fsck_ctx;
|
||||||
|
|
||||||
struct bookmarkfs_backend_init_resp info = {
|
struct bookmarkfs_backend_create_resp info = {
|
||||||
.bookmarks_root_id = UINT64_MAX,
|
.bookmarks_root_id = UINT64_MAX,
|
||||||
};
|
};
|
||||||
if (0 != BACKEND_CALL(ctx, backend_sandbox, &info)) {
|
if (0 != BACKEND_CALL(ctx, backend_sandbox, &info)) {
|
||||||
|
|
|
@ -115,7 +115,7 @@ enter_sandbox (
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct bookmarkfs_backend_init_resp resp = {
|
struct bookmarkfs_backend_create_resp resp = {
|
||||||
.bookmarks_root_id = UINT64_MAX,
|
.bookmarks_root_id = UINT64_MAX,
|
||||||
.tags_root_id = UINT64_MAX,
|
.tags_root_id = UINT64_MAX,
|
||||||
};
|
};
|
||||||
|
@ -213,7 +213,7 @@ init_backend (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct bookmarkfs_backend_init_resp resp = {
|
struct bookmarkfs_backend_create_resp resp = {
|
||||||
.bookmarks_root_id = UINT64_MAX,
|
.bookmarks_root_id = UINT64_MAX,
|
||||||
.tags_root_id = UINT64_MAX,
|
.tags_root_id = UINT64_MAX,
|
||||||
.bookmark_attrs = "",
|
.bookmark_attrs = "",
|
||||||
|
|
Loading…
Add table
Reference in a new issue