Commit graph

22 commits

Author SHA1 Message Date
CismonX
5a28b069c4
fs_ops: fix file size opened with O_CREAT|O_TRUNC
Also make sure that new regular files always have a size of zero.
2025-04-29 14:48:39 +08:00
CismonX
2e3685f217
backend_firefox: fix directory deletion
Also reverts commit fef7b4d3a8.

The DELETE_DIR flag is in fact useful, but bookmark_delete()
incorrectly checked CREATE_DIR instead.
2025-03-26 19:03:00 +08:00
CismonX
09e186b348
fs_ops: fix setattr 2025-03-20 12:21:47 +08:00
CismonX
e0d2aa2058
backend: refactor bookmark_set() for timestamps
Do not expose UTIME_OMIT to backends, but instead specify
which timestamps to update with flags.

This allows us to further refactor backend code, especially
the Chromium backend.
2025-03-20 12:14:59 +08:00
CismonX
00f40beec7
xstd: add helper function for getting current time
Also, don't bother with failed clock_gettime() calls.
2025-03-19 21:26:27 +08:00
CismonX
85b02f6c2b
backend_firefox, fs_ops: store hashcode in entry
Trade a bit of memory for hashmap rehash/remove efficiency.
2025-03-09 15:44:29 +08:00
CismonX
9fab17734c
chore: misc cleanup 2025-03-07 14:35:45 +08:00
CismonX
c2a91d6420
hashmap: refactor interface
- `hashmap_insert()` no longer takes key as argument, and
  takes the pointer to be associated with the entry as argument.
- Rename `hashmap_entry_delete` -> `hashmap_delete`.
- Make `user_data` the first argument for `hashmap_walk_func`.
- Other misc renames.
2025-03-06 06:40:28 +08:00
CismonX
8cbd5846d9
chore: tidy up 2025-03-01 23:40:34 +08:00
CismonX
55c0726c7f
all: minor refactor 2025-02-26 00:23:27 +08:00
CismonX
bd90602d4a
xattr: misc refactor
- Check for XATTR_CREATE in setxattr.
- Rename bookmark_attrs -> xattr_names.
- Other misc changes.
2025-02-19 11:34:03 +08:00
CismonX
fef7b4d3a8
backend: remove BOOKMARKFS_BOOKMARK_DELETE_DIR
It's up to the backend to check whether it's deleting a directory.
2025-02-17 17:52:50 +08:00
CismonX
c90c5f6fc7
all: fix build with musl libc
- Should not assume whether O_xxx macros are defined by checking
  feature test macros.
- Workaround conflicting getdents() declaration.
2025-02-16 00:19:51 +08:00
CismonX
52b3707d2b
backend: rename bookmark_fsck -> bookmark_check
Some relevant names are also renamed.
2025-02-12 20:47:10 +08:00
CismonX
3375674973
backend: ignore val_len when updating timestamps 2025-02-12 12:36:30 +08:00
CismonX
d1dac54b72
chore: tidy up includes 2025-02-08 18:56:45 +08:00
CismonX
d0aa74b212
backend: rename object_free -> cookie_free 2025-02-03 18:15:52 +08:00
CismonX
78b80be2e5
backend: rename struct bookmarkfs_bookmark_entry
Rename field `next` -> `off`.
2025-01-31 20:31:52 +08:00
CismonX
56fa90397d
fs_ops: limit xattr value length 2025-01-27 23:48:37 +08:00
CismonX
10ad224b03
backend: rename backend_sync -> bookmark_sync 2025-01-24 23:07:22 +08:00
CismonX
3cb99fe85b
all: fix punctuation regarding "e.g." and "i.e."
Follow the convention of modern English grammar that
a comma should usually come after "e.g." and "i.e.".
2025-01-23 19:23:54 +08:00
CismonX
cdf0ddfc53
init: prepare for Savannah 2024-12-31 18:09:03 +08:00