- Timestamp:
- Mar 29, 2010, 3:55:49 PM (16 years ago)
- Location:
- branches/eam_branches/20100225
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTools/src/magicdstool.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20100225
- Property svn:mergeinfo changed
-
branches/eam_branches/20100225/ippTools/src/magicdstool.c
r26981 r27517 114 114 PXOPT_LOOKUP_STR(note, config->args, "-set_note", false, false); 115 115 PXOPT_LOOKUP_BOOL(rerun, config->args, "-rerun", false); 116 PXOPT_LOOKUP_BOOL( dry_run, config->args, "-dry_run", false);116 PXOPT_LOOKUP_BOOL(pretend, config->args, "-pretend", false); 117 117 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 118 118 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); … … 237 237 // Parse the list of runs ready to be destreaked 238 238 239 if (! dry_run&& !psDBTransaction(config->dbh)) {239 if (!pretend && !psDBTransaction(config->dbh)) { 240 240 psError(PS_ERR_UNKNOWN, false, "database error"); 241 241 return false; … … 286 286 } 287 287 288 if (! dry_run) {288 if (!pretend) { 289 289 if (!magicDSRunInsertObject(config->dbh, run)) { 290 290 psError(PS_ERR_UNKNOWN, false, "database error"); … … 305 305 } 306 306 307 if (! dry_run&& !psDBCommit(config->dbh)) {307 if (!pretend && !psDBCommit(config->dbh)) { 308 308 psError(PS_ERR_UNKNOWN, false, "database error"); 309 309 return false; … … 392 392 return false; 393 393 } 394 const char *rerun_flag = rerun ? " \n" : ""; // String to give query to activate (or not) rerun394 const char *rerun_flag = rerun ? "" : "\n"; // String to give query to activate (or not) rerun 395 395 396 396 if (stageNum != IPP_STAGE_DIFF) { … … 408 408 psFree(limitString); 409 409 } 410 if (!p_psDBRunQueryF(config->dbh, query, rerun_flag)) {410 if (!p_psDBRunQueryF(config->dbh, query, set_label, rerun_flag)) { 411 411 psError(PS_ERR_UNKNOWN, false, "database error"); 412 412 psFree(query); … … 552 552 // optional 553 553 PXOPT_LOOKUP_STR(set_label, config->args, "-set_label", false, false); 554 PXOPT_LOOKUP_STR(set_data_group, config->args, "-set_data_group", false, false); 554 555 psString setString = NULL; 555 556 if (set_label) { 556 557 psStringAppend(&setString, ", label = '%s'", set_label); 558 } 559 if (set_data_group) { 560 psStringAppend(&setString, ", data_group = '%s'", set_data_group); 557 561 } 558 562 … … 573 577 PXOPT_COPY_S64(config->args, where, "-stage_id", "stage_id", "=="); 574 578 PXOPT_COPY_STR(config->args, where, "-stage", "stage", "=="); 579 PXOPT_COPY_STR(config->args, where, "-state", "state", "=="); 580 PXOPT_COPY_STR(config->args, where, "-data_group", "data_group", "LIKE"); 575 581 576 582 if (psListLength(where->list) < 2) { … … 832 838 PXOPT_LOOKUP_BOOL(setmagicked, config->args, "-setmagicked", false); 833 839 PXOPT_LOOKUP_F32(streak_frac, config->args, "-streak_frac", false, false); 840 PXOPT_LOOKUP_F32(nondiff_frac, config->args, "-nondiff_frac", false, false); 834 841 PXOPT_LOOKUP_F32(run_time, config->args, "-run_time", false, false); 835 842 … … 861 868 recovery_path_base, 862 869 streak_frac, 870 nondiff_frac, 863 871 run_time, 864 872 fault, … … 1190 1198 if (!((strcmp(state, "new") == 0) || 1191 1199 (strcmp(state, "full") == 0) || 1200 (strcmp(state, "drop") == 0) || 1192 1201 (strcmp(state, "failed_revert") == 0) || 1193 1202 (strcmp(state, "failed_cleanup") == 0) || … … 1398 1407 psMetadata *where = psMetadataAlloc(); 1399 1408 1400 PXOPT_COPY_S 64(config->args, where, "-stage", "stage", "==");1409 PXOPT_COPY_STR(config->args, where, "-stage", "stage", "=="); 1401 1410 PXOPT_COPY_S64(config->args, where, "-magic_ds_id", "magic_ds_id", "=="); 1402 1411 PXOPT_COPY_S64(config->args, where, "-magic_id", "magic_id", "==");
Note:
See TracChangeset
for help on using the changeset viewer.
