mirror of
https://github.com/openharmony/developtools_syscap_codec.git
synced 2026-08-27 02:11:19 -04:00
change syscap_tool parameters judegement.
Signed-off-by: yudechen <chenyude@huawei.com> Change-Id: I12ddfb81501508bb35b1a76e7d2e0fb2a22aca87
This commit is contained in:
+2
-2
@@ -80,8 +80,8 @@ int main(int argc, char **argv)
|
||||
break;
|
||||
case 'C':
|
||||
pcidfile = optarg;
|
||||
if (optind < 0 || optind > argc) {
|
||||
PRINT_ERR("Input file path too few or too many.\n");
|
||||
if (argc != 4 || optind < 0 || optind >= argc) { // 4, argc of ./syscap_tool -C f1 f2
|
||||
PRINT_ERR("Input file too few or too many.\n");
|
||||
return -1;
|
||||
}
|
||||
rpcidfile = argv[optind];
|
||||
|
||||
Reference in New Issue
Block a user