Parcourir la source

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

liang.he il y a 2 ans
Parent
commit
5377e18623
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  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;
 }