summaryrefslogtreecommitdiffstats
path: root/include/qemu/osdep.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2013-06-04 11:24:49 -0700
committerRichard Henderson <rth@twiddle.net>2013-11-30 07:45:13 +1300
commitb6a3e690b4f396633c75e18a9c3e7b6771fb71ba (patch)
treea0b751f6356373549aa8d6acbf7bc32f46dbd0c6 /include/qemu/osdep.h
parent7dc65c02fe3fb8f3146ce0b9ff5fec5945329f0e (diff)
downloadhqemu-b6a3e690b4f396633c75e18a9c3e7b6771fb71ba.zip
hqemu-b6a3e690b4f396633c75e18a9c3e7b6771fb71ba.tar.gz
osdep: Create qemu_getauxval and qemu_init_auxval
Abstract away dependence on a system implementation of getauxval. Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'include/qemu/osdep.h')
-rw-r--r--include/qemu/osdep.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 26136f1..b3e2b6d 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -215,4 +215,29 @@ bool fips_get_state(void);
*/
char *qemu_get_local_state_pathname(const char *relative_pathname);
+/**
+ * qemu_getauxval:
+ * @type: the auxiliary vector key to lookup
+ *
+ * Search the auxiliary vector for @type, returning the value
+ * or 0 if @type is not present.
+ */
+#if defined(CONFIG_GETAUXVAL) || defined(__linux__)
+unsigned long qemu_getauxval(unsigned long type);
+#else
+static inline unsigned long qemu_getauxval(unsigned long type) { return 0; }
+#endif
+
+/**
+ * qemu_init_auxval:
+ * @envp: the third argument to main
+ *
+ * If supported and required, locate the auxiliary vector at program startup.
+ */
+#if defined(CONFIG_GETAUXVAL) || !defined(__linux__)
+static inline void qemu_init_auxval(char **envp) { }
+#else
+void qemu_init_auxval(char **envp);
+#endif
+
#endif
OpenPOWER on IntegriCloud