diff options
author | Veronia Bahaa | 2016-03-20 18:16:19 +0100 |
---|---|---|
committer | Paolo Bonzini | 2016-03-22 22:20:17 +0100 |
commit | f348b6d1a53e5271cf1c9f9acc4646b4b98c1771 (patch) | |
tree | 2eb2da02e51400b1b1ecae295e32a81c7a889ab1 /include/qemu/help_option.h | |
parent | Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND (diff) | |
download | qemu-f348b6d1a53e5271cf1c9f9acc4646b4b98c1771.tar.gz qemu-f348b6d1a53e5271cf1c9f9acc4646b4b98c1771.tar.xz qemu-f348b6d1a53e5271cf1c9f9acc4646b4b98c1771.zip |
util: move declarations out of qemu-common.h
Move declarations out of qemu-common.h for functions declared in
utils/ files: e.g. include/qemu/path.h for utils/path.c.
Move inline functions out of qemu-common.h and into new files (e.g.
include/qemu/bcd.h)
Signed-off-by: Veronia Bahaa <veroniabahaa@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu/help_option.h')
-rw-r--r-- | include/qemu/help_option.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/qemu/help_option.h b/include/qemu/help_option.h new file mode 100644 index 0000000000..e39a66e77b --- /dev/null +++ b/include/qemu/help_option.h @@ -0,0 +1,22 @@ +#ifndef QEMU_HELP_OPTION_H +#define QEMU_HELP_OPTION_H 1 + +/** + * is_help_option: + * @s: string to test + * + * Check whether @s is one of the standard strings which indicate + * that the user is asking for a list of the valid values for a + * command option like -cpu or -M. The current accepted strings + * are 'help' and '?'. '?' is deprecated (it is a shell wildcard + * which makes it annoying to use in a reliable way) but provided + * for backwards compatibility. + * + * Returns: true if @s is a request for a list. + */ +static inline bool is_help_option(const char *s) +{ + return !strcmp(s, "?") || !strcmp(s, "help"); +} + +#endif |