[SLOF] [PATCH v4 28/33] slof: Implement SLOF_get_keystroke
Stefan Berger
stefanb at linux.vnet.ibm.com
Thu Dec 12 07:27:23 AEDT 2019
Signed-off-by: Stefan Berger <stefanb at linux.ibm.com>
---
include/helpers.h | 1 +
slof/helpers.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/include/helpers.h b/include/helpers.h
index aaef977..4353b3b 100644
--- a/include/helpers.h
+++ b/include/helpers.h
@@ -43,6 +43,7 @@ extern void SLOF_encode_dhcp_response(void *addr, size_t size);
extern int SLOF_get_property(const char *node, const char *propname,
char **addr, int *len);
extern unsigned long SLOF_get_vtpm_unit(void);
+extern int SLOF_get_keystroke(void);
#define offset_of(type, member) ((long) &((type *)0)->member)
#define container_of(ptr, type, member) ({ \
diff --git a/slof/helpers.c b/slof/helpers.c
index a287c6b..a651c17 100644
--- a/slof/helpers.c
+++ b/slof/helpers.c
@@ -230,3 +230,9 @@ unsigned long SLOF_get_vtpm_unit(void)
forth_eval("vtpm-unit");
return forth_pop();
}
+
+int SLOF_get_keystroke(void)
+{
+ forth_eval("key");
+ return forth_pop();
+}
--
2.17.1
More information about the SLOF
mailing list