backend: rename struct bookmarkfs_bookmark_entry

Rename field `next` -> `off`.
This commit is contained in:
CismonX 2025-01-31 20:31:52 +08:00
parent 93ff8cabe9
commit 78b80be2e5
No known key found for this signature in database
GPG key ID: 3094873E29A482FB
5 changed files with 9 additions and 9 deletions

View file

@ -278,7 +278,7 @@ struct bookmarkfs_bookmark_stat {
struct bookmarkfs_bookmark_entry { struct bookmarkfs_bookmark_entry {
char const *name; char const *name;
off_t next; off_t off;
struct bookmarkfs_bookmark_stat stat; struct bookmarkfs_bookmark_stat stat;
}; };

View file

@ -1376,7 +1376,7 @@ static int
parse_entry ( parse_entry (
struct backend_ctx const *ctx, struct backend_ctx const *ctx,
json_t const *node, json_t const *node,
off_t next, off_t off,
bool with_stat, bool with_stat,
struct bookmarkfs_bookmark_entry *buf struct bookmarkfs_bookmark_entry *buf
) { ) {
@ -1389,7 +1389,7 @@ parse_entry (
} }
buf->name = entry->name; buf->name = entry->name;
buf->next = next; buf->off = off;
buf->stat.id = id; buf->stat.id = id;
if (ctx->flags & BACKEND_FILENAME_GUID) { if (ctx->flags & BACKEND_FILENAME_GUID) {
json_t const *guid_node = json_object_sget(entry->node, "guid"); json_t const *guid_node = json_object_sget(entry->node, "guid");

View file

@ -2413,7 +2413,7 @@ bookmark_list_cb (
if (unlikely(position < 0)) { if (unlikely(position < 0)) {
goto fail; goto fail;
} }
entry.next = position + 1; entry.off = position + 1;
ssize_t len = -1; ssize_t len = -1;
if (SQLITE_INTEGER == sqlite3_column_type(stmt, 3)) { if (SQLITE_INTEGER == sqlite3_column_type(stmt, 3)) {

View file

@ -966,10 +966,10 @@ bm_readdir_cb (
size_t entry_size; size_t entry_size;
if (is_readdirplus) { if (is_readdirplus) {
entry_size = fuse_add_direntry_plus(rctx->req, buf, buf_len, entry_size = fuse_add_direntry_plus(rctx->req, buf, buf_len,
entry->name, &ep, entry->next); entry->name, &ep, entry->off);
} else { } else {
entry_size = fuse_add_direntry(rctx->req, buf, buf_len, entry->name, entry_size = fuse_add_direntry(rctx->req, buf, buf_len, entry->name,
&ep.attr, entry->next); &ep.attr, entry->off);
} }
if (entry_size > buf_len) { if (entry_size > buf_len) {
return 1; return 1;

View file

@ -130,7 +130,7 @@ do_list (
uint64_t *subdir_id_ptr uint64_t *subdir_id_ptr
) { ) {
struct bookmarkfs_bookmark_entry entry = { struct bookmarkfs_bookmark_entry entry = {
.next = dir->off, .off = dir->off,
.stat.id = UINT64_MAX, .stat.id = UINT64_MAX,
}; };
int status = BACKEND_CALL(ctx, bookmark_list, dir->id, dir->off, 0, int status = BACKEND_CALL(ctx, bookmark_list, dir->id, dir->off, 0,
@ -138,7 +138,7 @@ do_list (
if (status < 0) { if (status < 0) {
return status; return status;
} }
dir->off = entry.next; dir->off = entry.off;
*subdir_id_ptr = entry.stat.id; *subdir_id_ptr = entry.stat.id;
return 0; return 0;
} }
@ -153,7 +153,7 @@ do_list_cb (
if (entry->stat.value_len >= 0) { if (entry->stat.value_len >= 0) {
return 0; return 0;
} }
result->next = entry->next; result->off = entry->off;
result->stat.id = entry->stat.id; result->stat.id = entry->stat.id;
return 1; return 1;
} }