summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/ipxe')
-rw-r--r--src/include/ipxe/editstring.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/ipxe/editstring.h b/src/include/ipxe/editstring.h
index 5c1a18bea..26cb434cf 100644
--- a/src/include/ipxe/editstring.h
+++ b/src/include/ipxe/editstring.h
@@ -28,6 +28,19 @@ struct edit_string {
unsigned int mod_end;
};
+/**
+ * Initialise editable string
+ *
+ * @v string Editable string
+ * @v buf Buffer for string
+ * @v len Length of buffer
+ */
+static inline void init_editstring ( struct edit_string *string, char *buf,
+ size_t len ) {
+ string->buf = buf;
+ string->len = len;
+}
+
extern int edit_string ( struct edit_string *string, int key ) __nonnull;
#endif /* _IPXE_EDITSTRING_H */