Changeset 18357 for branches/cleanup/ippTools/src/dettool.c
- Timestamp:
- Jun 29, 2008, 2:44:04 PM (18 years ago)
- File:
-
- 1 edited
-
branches/cleanup/ippTools/src/dettool.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/cleanup/ippTools/src/dettool.c
r18153 r18357 87 87 static bool detrunsummaryMode(pxConfig *config); 88 88 static bool revertdetrunsummaryMode(pxConfig *config); 89 static bool updatedetrunsummaryMode(pxConfig *config); 90 // run 89 91 static bool updatedetrunMode(pxConfig *config); 90 92 static bool rerunMode(pxConfig *config); … … 179 181 MODECASE(DETTOOL_MODE_DETRUNSUMMARY, detrunsummaryMode); 180 182 MODECASE(DETTOOL_MODE_REVERTDETRUNSUMMARY, revertdetrunsummaryMode); 183 MODECASE(DETTOOL_MODE_UPDATEDETRUNSUMMARY, updatedetrunsummaryMode); 181 184 MODECASE(DETTOOL_MODE_UPDATEDETRUN, updatedetrunMode); 182 185 MODECASE(DETTOOL_MODE_RERUN, rerunMode); … … 456 459 } 457 460 458 if (!convertIdToStr(detRuns)) {459 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");460 psFree(detRuns);461 return false;462 }463 464 461 // negative simple so the default is true 465 462 if (!ippdbPrintMetadatas(stdout, detRuns, "detRun", !simple)) { … … 719 716 } 720 717 721 // convert det_id to a string externaly722 if (!convertIdToStr(detRuns)) {723 psError(PS_ERR_UNKNOWN, false, "failed to convert det_id to a string");724 psFree(detRuns);725 return false;726 }727 728 718 // negative simple so the default is true 729 719 if (!ippdbPrintMetadatas(stdout, detRuns, "detRun", !simple)) { … … 1012 1002 } 1013 1003 1014 // convert det_id to a string externaly1015 if (!convertIdToStr(detRuns)) {1016 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");1017 psFree(detRuns);1018 return false;1019 }1020 1021 1004 // negative simple so the default is true 1022 1005 if (!ippdbPrintMetadatas(stdout, newDetRuns, "detRun", !simple)) { … … 1111 1094 psFree(runs); 1112 1095 return true; 1113 }1114 1115 // convert det_id to a string externaly1116 if (!convertIdToStr(runs)) {1117 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");1118 psFree(runs);1119 return false;1120 1096 } 1121 1097 … … 1180 1156 psFree(output); 1181 1157 return true; 1182 }1183 1184 // convert det_id to a string externaly1185 if (!convertIdToStr(output)) {1186 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");1187 psFree(output);1188 return false;1189 1158 } 1190 1159 … … 3851 3820 3852 3821 3822 static bool updatedetrunsummaryMode(pxConfig *config) 3823 { 3824 PS_ASSERT_PTR_NON_NULL(config, false); 3825 3826 // required 3827 PXOPT_LOOKUP_STR(det_id, config->args, "-det_id", true, false); 3828 3829 PXOPT_LOOKUP_BOOL(accept, config->args, "-accept", false); 3830 PXOPT_LOOKUP_BOOL(reject, config->args, "-reject", false); 3831 3832 if (accept && reject) { 3833 psError(PS_ERR_UNKNOWN, true, "-accept and -reject are exclusive"); 3834 return false; 3835 } 3836 3837 if (!(accept || reject)) { 3838 psError(PS_ERR_UNKNOWN, true, "either -accept or -reject is required"); 3839 return false; 3840 } 3841 3842 char *query = "UPDATE detRunSummary SET accept = %d WHERE det_id = %"PRId64; 3843 if (!p_psDBRunQuery(config->dbh, query, accept, (psS64)atoll(det_id))) { 3844 psError(PS_ERR_UNKNOWN, false, "database error"); 3845 return false; 3846 } 3847 3848 return true; 3849 } 3850 3851 3853 3852 static bool updatedetrunMode(pxConfig *config) 3854 3853 { … … 4252 4251 } 4253 4252 4254 if (!convertIdToStr(detRuns)) {4255 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");4256 psFree(detRuns);4257 return false;4258 }4259 4260 4253 // negative simple so the default is true 4261 4254 if (!ippdbPrintMetadatas(stdout, detRuns, "detRun", !simple)) {
Note:
See TracChangeset
for help on using the changeset viewer.
