aboutsummaryrefslogtreecommitdiff
path: root/fesvr
diff options
context:
space:
mode:
authorJames Clarke <jrtc27@jrtc27.com>2020-01-31 20:57:04 +0000
committerJames Clarke <jrtc27@jrtc27.com>2020-01-31 20:57:04 +0000
commitc050d113fe4d5a0554b9ece58aa352a065e6a70c (patch)
tree92c84b502b40930bbe8c168725ce74f2714dfad1 /fesvr
parent455b8493320163c74b5443b2aed3c452aa92bc68 (diff)
downloadspike-c050d113fe4d5a0554b9ece58aa352a065e6a70c.zip
spike-c050d113fe4d5a0554b9ece58aa352a065e6a70c.tar.gz
spike-c050d113fe4d5a0554b9ece58aa352a065e6a70c.tar.bz2
Support plusarg +h/+help option for HTIF
Diffstat (limited to 'fesvr')
-rw-r--r--fesvr/htif.cc6
-rw-r--r--fesvr/htif.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/fesvr/htif.cc b/fesvr/htif.cc
index d9e884f..2309f12 100644
--- a/fesvr/htif.cc
+++ b/fesvr/htif.cc
@@ -249,7 +249,11 @@ void htif_t::parse_arguments(int argc, char ** argv)
throw std::invalid_argument("Unknown argument (did you mean to enable +permissive parsing?)");
case 1: {
std::string arg = optarg;
- if (arg == "+rfb") {
+ if (arg == "+h" || arg == "+help") {
+ c = 'h';
+ optarg = nullptr;
+ }
+ else if (arg == "+rfb") {
c = HTIF_LONG_OPTIONS_OPTIND;
optarg = nullptr;
}
diff --git a/fesvr/htif.h b/fesvr/htif.h
index d312c77..cc1e320 100644
--- a/fesvr/htif.h
+++ b/fesvr/htif.h
@@ -83,6 +83,7 @@ class htif_t : public chunked_memif_t
#define HTIF_USAGE_OPTIONS \
"HOST OPTIONS\n\
-h, --help Display this help and exit\n\
+ +h, +help\n\
+permissive The host will ignore any unparsed options up until\n\
+permissive-off (Only needed for VCS)\n\
+permissive-off Stop ignoring options. This is mandatory if using\n\