Browse Source

Support plusarg +h/+help option for HTIF

pull/390/head
James Clarke 6 years ago
parent
commit
c050d113fe
  1. 6
      fesvr/htif.cc
  2. 1
      fesvr/htif.h

6
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;
}

1
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\

Loading…
Cancel
Save