Changeset 41549 for trunk/ippTools/src/faketool.c
- Timestamp:
- Apr 9, 2021, 4:44:03 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/faketool.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/faketool.c
r34081 r41549 367 367 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 368 368 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 369 PXOPT_LOOKUP_BOOL(all, config->args, "-all", false); 369 370 370 371 psMetadata *where = psMetadataAlloc(); … … 385 386 psStringAppend(&query, " AND %s", whereClause); 386 387 psFree(whereClause); 388 } else { 389 if (!all) { 390 psError(PXTOOLS_ERR_SYS, false, "unrestricted query not allowed (try -all)"); 391 return false; 392 } 387 393 } 388 394 psFree(where); … … 432 438 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 433 439 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 440 PXOPT_LOOKUP_BOOL(all, config->args, "-all", false); 434 441 435 442 psMetadata *where = psMetadataAlloc(); … … 451 458 psStringAppend(&query, " AND %s", whereClause); 452 459 psFree(whereClause); 460 } else { 461 if (!all) { 462 psError(PXTOOLS_ERR_SYS, false, "unrestricted query not allowed (try -all)"); 463 return false; 464 } 453 465 } 454 466 psFree(where); … … 886 898 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 887 899 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 900 PXOPT_LOOKUP_BOOL(all, config->args, "-all", false); 888 901 889 902 psMetadata *where = psMetadataAlloc(); … … 900 913 psStringAppend(&query, " AND %s", whereClause); 901 914 psFree(whereClause); 915 } else { 916 if (!all) { 917 psError(PXTOOLS_ERR_SYS, false, "unrestricted query not allowed (try -all)"); 918 return false; 919 } 902 920 } 903 921 psFree(where); … … 948 966 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 949 967 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 968 PXOPT_LOOKUP_BOOL(all, config->args, "-all", false); 950 969 951 970 psMetadata *where = psMetadataAlloc(); … … 965 984 psStringAppend(&query, " AND %s", whereClause); 966 985 psFree(whereClause); 986 } else { 987 if (!all) { 988 psError(PXTOOLS_ERR_SYS, false, "unrestricted query not allowed (try -all)"); 989 return false; 990 } 967 991 } 968 992 psFree(where);
Note:
See TracChangeset
for help on using the changeset viewer.
