summaryrefslogtreecommitdiff
path: root/src/id.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/id.h')
-rw-r--r--src/id.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/id.h b/src/id.h
index 7c45a64..ae1c788 100644
--- a/src/id.h
+++ b/src/id.h
@@ -1,20 +1,22 @@
// SPDX-License-Identifier: BSD-3-Clause
-#ifndef FSID_H
-#define FSID_H
+#pragma once
#include <sys/types.h>
+#include "random-seed.h"
#include "util.h"
-#if defined(HAVE_UDEV) || defined(HAVE_UTIL_LINUX)
-size_t get_fs_uuid(char **fs_uuid, int seed_fd);
+#if defined(HAVE_LIBUDEV) || defined(HAVE_UTIL_LINUX)
+#define HAVE_FS_UUID
+bool set_rs_device(struct random_seed *rs, int fd);
+const char *get_fs_uuid(struct random_seed *rs);
#endif
-#ifdef HAVE_UDEV
-size_t get_drive_id(char **drive_id, int seed_fd);
-#endif
-size_t get_machine_id(char **machine_id);
-size_t get_fs_id(fsid_t *fs_id, int seed_fd);
-void hash(const unsigned char salt[static SALT_LEN], unsigned char *out, const void *in, size_t size);
+#ifdef HAVE_LIBUDEV
+const char *get_drive_id(struct random_seed *rs);
#endif
+
+const char *get_machine_id();
+bool get_fs_id(fsid_t *fs_id, int fd);
+void hash(const unsigned char salt[static SALT_LEN], unsigned char *out, const void *in, size_t size);