@@ -42,6 +42,8 @@ extern void SLOF_encode_bootp_response(void *addr, size_t size);
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 int SLOF_get_keystroke(void);
+extern void SLOF_reset(void);
#define offset_of(type, member) ((long) &((type *)0)->member)
#define container_of(ptr, type, member) ({ \
@@ -224,3 +224,14 @@ int SLOF_get_property(const char *node, const char *propname,
*addr = (char *)forth_pop();
return 0;
}
+
+int SLOF_get_keystroke(void)
+{
+ forth_eval("key");
+ return forth_pop();
+}
+
+void SLOF_reset(void)
+{
+ forth_eval("reset-all");
+}
Implement SLOF_get_keystroke() and SLOF_reset() helper functions. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> --- include/helpers.h | 2 ++ slof/helpers.c | 11 +++++++++++ 2 files changed, 13 insertions(+)