summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/sd-id128/id128-util.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-03-31 09:12:39 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-04-04 04:46:18 +0200
commitc227c46b8b6fefe2604ca110b2e2c4e4f78c2c9d (patch)
tree7466f74e2226acda45e9cfc33e506c9028690c54 /src/libsystemd/sd-id128/id128-util.h
parentsd-id128: introduce id128_read_at() (diff)
downloadsystemd-c227c46b8b6fefe2604ca110b2e2c4e4f78c2c9d.tar.xz
systemd-c227c46b8b6fefe2604ca110b2e2c4e4f78c2c9d.zip
sd-id128: introduce id128_write_at()
Diffstat (limited to '')
-rw-r--r--src/libsystemd/sd-id128/id128-util.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsystemd/sd-id128/id128-util.h b/src/libsystemd/sd-id128/id128-util.h
index 7bab3e8303..fde58a5228 100644
--- a/src/libsystemd/sd-id128/id128-util.h
+++ b/src/libsystemd/sd-id128/id128-util.h
@@ -26,7 +26,10 @@ static inline int id128_read(const char *path, Id128Flag f, sd_id128_t *ret) {
}
int id128_write_fd(int fd, Id128Flag f, sd_id128_t id);
-int id128_write(const char *path, Id128Flag f, sd_id128_t id);
+int id128_write_at(int dir_fd, const char *path, Id128Flag f, sd_id128_t id);
+static inline int id128_write(const char *path, Id128Flag f, sd_id128_t id) {
+ return id128_write_at(AT_FDCWD, path, f, id);
+}
void id128_hash_func(const sd_id128_t *p, struct siphash *state);
int id128_compare_func(const sd_id128_t *a, const sd_id128_t *b) _pure_;