chiark / gitweb /
basic/random-util: do not fall back to /dev/urandom if getrandom() returns short
[elogind.git] / src / libelogind / sd-id128 / id128-util.h
index 4a04c80d2fe8cdde18a212bef0dbc7ab7c5097a6..d435b976d98767a7657c8f80e5acc9aa610e7cfc 100644 (file)
@@ -1,27 +1,29 @@
 #pragma once
 
 /***
-  This file is part of elogind.
+  This file is part of systemd.
 
   Copyright 2016 Lennart Poettering
 
-  elogind is free software; you can redistribute it and/or modify it
+  systemd is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  elogind is distributed in the hope that it will be useful, but
+  systemd is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with elogind; If not, see <http://www.gnu.org/licenses/>.
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
 #include <stdbool.h>
 
 #include "sd-id128.h"
+
+#include "hash-funcs.h"
 #include "macro.h"
 
 char *id128_to_uuid_string(sd_id128_t id, char s[37]);
@@ -41,5 +43,11 @@ typedef enum Id128Format {
 int id128_read_fd(int fd, Id128Format f, sd_id128_t *ret);
 int id128_read(const char *p, Id128Format f, sd_id128_t *ret);
 
-int id128_write_fd(int fd, Id128Format f, sd_id128_t id);
-int id128_write(const char *p, Id128Format f, sd_id128_t id);
+int id128_write_fd(int fd, Id128Format f, sd_id128_t id, bool do_sync);
+#if 0 /// UNNEEDED by elogind
+int id128_write(const char *p, Id128Format f, sd_id128_t id, bool do_sync);
+
+void id128_hash_func(const void *p, struct siphash *state);
+int id128_compare_func(const void *a, const void *b) _pure_;
+extern const struct hash_ops id128_hash_ops;
+#endif // 0