Ver código fonte

iwasm: Print help when meeting unknown cmd options (#2824)

liang.he 2 anos atrás
pai
commit
5377e18623
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3 0
      product-mini/platforms/common/libc_wasi.c

+ 3 - 0
product-mini/platforms/common/libc_wasi.c

@@ -156,6 +156,9 @@ libc_wasi_parse(char *arg, libc_wasi_parse_context_t *ctx)
         }
         ctx->ns_lookup_pool[ctx->ns_lookup_pool_size++] = arg + 16;
     }
+    else {
+        return LIBC_WASI_PARSE_RESULT_NEED_HELP;
+    }
     return LIBC_WASI_PARSE_RESULT_OK;
 }