- Timestamp:
- May 26, 2009, 1:59:32 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090301
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
ippTools/src (modified) (1 prop)
-
ippTools/src/regtool.c (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090301
- Property svn:mergeinfo changed
-
branches/cnb_branches/cnb_branch_20090301/ippTools/src
- Property svn:ignore
-
old new 33 33 pstamptool 34 34 disttool 35 receivetool
-
- Property svn:ignore
-
branches/cnb_branches/cnb_branch_20090301/ippTools/src/regtool.c
r23594 r24244 78 78 MODECASE(REGTOOL_MODE_UPDATEPROCESSEDEXP, updateprocessedexpMode); 79 79 MODECASE(REGTOOL_MODE_CLEARDUPEXP, cleardupexpMode); 80 MODECASE( CHIPTOOL_MODE_EXPORTRUN,exportrunMode);81 MODECASE( CHIPTOOL_MODE_IMPORTRUN,importrunMode);80 MODECASE(REGTOOL_MODE_EXPORTRUN, exportrunMode); 81 MODECASE(REGTOOL_MODE_IMPORTRUN, importrunMode); 82 82 default: 83 83 psAbort("invalid option (this should not happen)"); … … 238 238 PXOPT_LOOKUP_TIME(dateobs, config->args, "-dateobs", false, false); 239 239 PXOPT_LOOKUP_STR(hostname, config->args, "-hostname", false, false); 240 PXOPT_LOOKUP_S16(code, config->args, "-code", false, false); 240 241 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 242 PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false); 241 243 242 244 if (!rawImfileInsert( … … 302 304 ignored, 303 305 hostname, 304 code, 306 fault, 307 quality, 305 308 NULL, 306 309 0 … … 408 411 PXOPT_COPY_STR(config->args, where, "-tmp_class_id", "tmp_class_id", "=="); 409 412 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 410 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");413 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 411 414 PXOPT_COPY_S64(config->args, where, "-exp_id_begin", "exp_id", ">="); 412 415 PXOPT_COPY_S64(config->args, where, "-exp_id_end", "exp_id", "<="); … … 452 455 PXOPT_LOOKUP_STR(class_id, config->args, "-class_id", true, false); 453 456 454 PXOPT_LOOKUP_S16( code, config->args, "-code",false, false);457 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 455 458 PXOPT_LOOKUP_F64(user_1, config->args, "-user_1", false, false); 456 459 457 if (( code== INT16_MAX) && !isfinite(user_1)) {458 psError(PS_ERR_UNKNOWN, false, "one of - codeor -user_1 must be selected");459 return false; 460 } 461 if (( code!= INT16_MAX) && isfinite(user_1)) {462 psError(PS_ERR_UNKNOWN, false, "only one of - codeor -user_1 must be selected");460 if ((fault == INT16_MAX) && !isfinite(user_1)) { 461 psError(PS_ERR_UNKNOWN, false, "one of -fault or -user_1 must be selected"); 462 return false; 463 } 464 if ((fault != INT16_MAX) && isfinite(user_1)) { 465 psError(PS_ERR_UNKNOWN, false, "only one of -fault or -user_1 must be selected"); 463 466 return false; 464 467 } … … 468 471 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 469 472 470 if ( code!= INT16_MAX) {473 if (fault != INT16_MAX) { 471 474 // this is fairly dangerous : can set all if the where is not set... 472 if (!pxSetFaultCode(config->dbh, "rawImfile", where, code)) {475 if (!pxSetFaultCode(config->dbh, "rawImfile", where, fault)) { 473 476 psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag"); 474 477 psFree (where); … … 644 647 645 648 // default 646 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);649 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 647 650 648 651 psString query = pxDataGet("regtool_pendingexp.sql"); … … 801 804 moon_phase, 802 805 hostname, 803 code,806 fault, 804 807 NULL, 805 808 0 … … 995 998 psMetadata *where = psMetadataAlloc(); 996 999 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 997 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");1000 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 998 1001 PXOPT_COPY_S64(config->args, where, "-exp_id_begin", "exp_id", ">="); 999 1002 PXOPT_COPY_S64(config->args, where, "-exp_id_end", "exp_id", "<="); … … 1039 1042 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 1040 1043 1041 PXOPT_LOOKUP_S16( code, config->args, "-code", true, false);1042 1043 if (!pxSetFaultCode(config->dbh, "rawExp", where, code)) {1044 PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false); 1045 1046 if (!pxSetFaultCode(config->dbh, "rawExp", where, fault)) { 1044 1047 psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag"); 1045 1048 psFree(where); … … 1161 1164 char sqlFilename[80]; 1162 1165 } ExportTable; 1163 1166 1164 1167 int numExportTables = 2; 1165 1168 … … 1180 1183 1181 1184 ExportTable tables [] = { 1182 {"rawExp", "regtool_export_ raw__exp.sql"},1183 {"rawImfile", "regtool_export_ raw_imfile.sql"},1185 {"rawExp", "regtool_export_exp.sql"}, 1186 {"rawImfile", "regtool_export_imfile.sql"}, 1184 1187 }; 1185 1188 … … 1241 1244 1242 1245 PS_ASSERT_PTR_NON_NULL(config, NULL); 1243 1246 1244 1247 PXOPT_LOOKUP_STR(infile, config->args, "-infile", true, false); 1245 1248 … … 1252 1255 psAssert (item, "entry not in input?"); 1253 1256 psAssert (item->type == PS_DATA_METADATA_MULTI, "entry not multi?"); 1254 1257 1255 1258 psMetadataItem *entry = psListGet (item->data.list, 0); 1256 1259 assert (entry);
Note:
See TracChangeset
for help on using the changeset viewer.
