aboutsummaryrefslogtreecommitdiff
path: root/include/qemu/help_option.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/qemu/help_option.h')
-rw-r--r--include/qemu/help_option.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/qemu/help_option.h b/include/qemu/help_option.h
index 328d2a89fd..ca6389a154 100644
--- a/include/qemu/help_option.h
+++ b/include/qemu/help_option.h
@@ -19,4 +19,15 @@ static inline bool is_help_option(const char *s)
return !strcmp(s, "?") || !strcmp(s, "help");
}
+static inline int starts_with_help_option(const char *s)
+{
+ if (*s == '?') {
+ return 1;
+ }
+ if (g_str_has_prefix(s, "help")) {
+ return 4;
+ }
+ return 0;
+}
+
#endif