projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup: Move lttng-modules instrumentation headers
[lttng-modules.git]
/
wrapper
/
random.c
diff --git
a/wrapper/random.c
b/wrapper/random.c
index da8cb176bce9e5904542834cd4acbc4833eeacb2..7b91fc7f3e146a4b8046b7996ecb4855812537a5 100644
(file)
--- a/
wrapper/random.c
+++ b/
wrapper/random.c
@@
-1,13
+1,14
@@
-/*
- * 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)
/* boot_id depends on sysctl */
#if defined(CONFIG_SYSCTL)
@@
-15,7
+16,7
@@
#include <linux/file.h>
#include <linux/sched.h>
#include <linux/uaccess.h>
#include <linux/file.h>
#include <linux/sched.h>
#include <linux/uaccess.h>
-#include
"random.h"
+#include
<wrapper/random.h>
/*
* Returns string boot id.
/*
* Returns string boot id.
@@
-44,7
+45,7
@@
int wrapper_get_bootid(char *bootid)
ret = -EINVAL;
goto end;
}
ret = -EINVAL;
goto end;
}
-
+
bootid[BOOT_ID_LEN - 1] = '\0';
ret = 0;
end:
bootid[BOOT_ID_LEN - 1] = '\0';
ret = 0;
end:
@@
-52,6
+53,7
@@
end:
filp_close(file, current->files);
return ret;
}
filp_close(file, current->files);
return ret;
}
+EXPORT_SYMBOL_GPL(wrapper_get_bootid);
#else
#else
@@
-59,5
+61,6
@@
int wrapper_get_bootid(char *bootid)
{
return -ENOSYS;
}
{
return -ENOSYS;
}
+EXPORT_SYMBOL_GPL(wrapper_get_bootid);
#endif
#endif
This page took
0.0253 seconds
and
4
git commands to generate.