Changeset 13996
- Timestamp:
- Jul 2, 2007, 3:57:20 PM (19 years ago)
- Location:
- branches/backtrack/ippTools/src
- Files:
-
- 2 deleted
- 8 edited
-
Makefile.am (modified) (1 diff)
-
camqueue.c (deleted)
-
camtool.c (modified) (1 diff)
-
camtool.h (modified) (1 diff)
-
chipqueue.c (deleted)
-
chiptool.c (modified) (2 diffs)
-
chiptool.h (modified) (1 diff)
-
pxchip.c (modified) (2 diffs)
-
pxchip.h (modified) (1 diff)
-
regtool.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/backtrack/ippTools/src/Makefile.am
r13994 r13996 57 57 pxregister.c \ 58 58 pxchip.c \ 59 pxcam.c \ 60 chipqueue.c \ 61 camqueue.c 59 pxcam.c 62 60 63 61 # for pxtools.h -
branches/backtrack/ippTools/src/camtool.c
r13994 r13996 258 258 259 259 // queue the exp 260 if (! camQueueChipID(config,260 if (!pxcamQueueByChipID(config, 261 261 row->chip_id, 262 262 workdir ? workdir : row->workdir, -
branches/backtrack/ippTools/src/camtool.h
r12237 r13996 38 38 pxConfig *camtoolConfig(pxConfig *config, int argc, char **argv); 39 39 40 bool camQueueChipID(pxConfig *config,41 psS64 chip_id,42 psString workdir,43 psString label,44 psString recipe,45 psString expgroup,46 psString dvodb);47 48 40 #endif // CAMTOOL_H -
branches/backtrack/ippTools/src/chiptool.c
r13994 r13996 242 242 243 243 // queue the exp 244 if (! chipQueueExpTag(config, exp_tag, workdir, label, reduction, expgroup, dvodb)) {244 if (!pxchipQueueByExpTag(config, exp_tag, workdir, label, reduction, expgroup, dvodb)) { 245 245 if (!psDBRollback(config->dbh)) { 246 246 psError(PS_ERR_UNKNOWN, false, "database error"); … … 844 844 // camQueueChipID() can only be run after chipRun.state has been set to 845 845 // stop 846 if (! camQueueChipID(config,846 if (!pxcamQueueByChipID(config, 847 847 chipRun->chip_id, 848 848 chipRun->workdir, -
branches/backtrack/ippTools/src/chiptool.h
r13578 r13996 38 38 pxConfig *chiptoolConfig(pxConfig *config, int argc, char **argv); 39 39 40 bool chipQueueExpTag(pxConfig *config,41 psString exp_tag,42 psString workdir,43 psString label,44 psString recipe,45 psString expgroup,46 psString dvodb);47 48 40 #endif // CHIPTOOL_H -
branches/backtrack/ippTools/src/pxchip.c
r13994 r13996 2 2 * pxchip.c 3 3 * 4 * Copyright (C) 200 6Joshua Hoblitt4 * Copyright (C) 2007 Joshua Hoblitt 5 5 * 6 6 * This program is free software; you can redistribute it and/or modify it … … 54 54 return true; 55 55 } 56 57 58 bool pxchipQueueByExpTag(pxConfig *config, 59 psString exp_tag, 60 psString workdir, 61 psString label, 62 psString reduction, 63 psString expgroup, 64 psString dvodb) 65 { 66 PS_ASSERT_PTR_NON_NULL(config, false); 67 68 // start a transaction 69 if (!psDBTransaction(config->dbh)) { 70 psError(PS_ERR_UNKNOWN, false, "database error"); 71 return false; 72 } 73 74 // create a chipRun 75 if (!chipRunInsert(config->dbh, 76 0x0, 77 "run", // state 78 workdir, 79 "dirty", // workdir_state 80 label, 81 reduction, 82 expgroup, 83 dvodb) 84 ) { 85 // rollback 86 if (!psDBRollback(config->dbh)) { 87 psError(PS_ERR_UNKNOWN, false, "database error"); 88 } 89 psError(PS_ERR_UNKNOWN, false, "database error"); 90 return false; 91 } 92 93 #if 0 94 // get the chip_id 95 long chip_id = psDBLastInsertID(config->dbh); 96 #endif 97 98 // populate the chipPendingImfile table from rawImfile based on exp_tag, 99 // where the coresponding newExp.state entry is set to stop 100 psString query = pxDataGetCached("chiptool_queuerawimfile.sql"); 101 if (!query) { 102 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 103 return false; 104 } 105 106 // queue the imfiles for the exp_tag 107 if (!p_psDBRunQuery(config->dbh, query, exp_tag)) { 108 psError(PS_ERR_UNKNOWN, false, "database error"); 109 return false; 110 } 111 112 // just to be safe, we should have changed at least one row 113 if (psDBAffectedRows(config->dbh) < 1) { 114 psError(PS_ERR_UNKNOWN, false, 115 "no rows affected - should have changed at least one row"); 116 return false; 117 } 118 119 // point of no return 120 if (!psDBCommit(config->dbh)) { 121 psError(PS_ERR_UNKNOWN, false, "database error"); 122 return false; 123 } 124 125 return true; 126 } -
branches/backtrack/ippTools/src/pxchip.h
r13994 r13996 27 27 bool pxchipRunSetState(pxConfig *config, psS64 chip_id, const char *state); 28 28 29 bool pxchipQueueByExpTag(pxConfig *config, 30 psString exp_tag, 31 psString workdir, 32 psString label, 33 psString recipe, 34 psString expgroup, 35 psString dvodb); 36 29 37 #endif // PXCHIP_H -
branches/backtrack/ippTools/src/regtool.c
r13990 r13996 634 634 // insert an entry into the chipPendingExp table 635 635 // this can only be run as the newExp's state has been set to stop 636 if (! chipQueueExpTag(config, exp_tag, NULL, NULL, NULL, NULL, NULL)) {636 if (!pxchipQueueByExpTag(config, exp_tag, NULL, NULL, NULL, NULL, NULL)) { 637 637 // rollback 638 638 if (!psDBRollback(config->dbh)) {
Note:
See TracChangeset
for help on using the changeset viewer.
