-/*
- * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com)
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
+ *
+ * wrapper/random.c
*
- * wrapper around bootid read. Using KALLSYMS to get its address when
- * available, else we need to have a kernel that exports this function to GPL
- * modules.
+ * wrapper around bootid read. Read the boot id through the /proc filesystem.
*
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*/
+#include <linux/errno.h>
+
/* boot_id depends on sysctl */
#if defined(CONFIG_SYSCTL)
#include <linux/file.h>
#include <linux/sched.h>
#include <linux/uaccess.h>
-#include "random.h"
+#include <wrapper/random.h>
/*
* Returns string boot id.
ret = -EINVAL;
goto end;
}
-
+
bootid[BOOT_ID_LEN - 1] = '\0';
ret = 0;
end: