IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 15, 2009, 9:33:58 AM (17 years ago)
Author:
bills
Message:

add -clean argument to the exportrun modes. If set switch
state and data state from 'full' to 'cleaned'.
If no rows are found in -exportrun return error status for
the command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/faketool.c

    r23809 r23873  
    12651265  PXOPT_LOOKUP_STR(outfile, config->args, "-outfile", true,  false);
    12661266  PXOPT_LOOKUP_U64(limit,   config->args, "-limit",   false, false);
     1267  PXOPT_LOOKUP_BOOL(clean, config->args, "-clean", false);
    12671268
    12681269  FILE *f = fopen (outfile, "w");
     
    13131314    }
    13141315    if (!psArrayLength(output)) {
    1315       psTrace("regtool", PS_LOG_INFO, "no rows found");
     1316      psError(PS_ERR_UNKNOWN, true, "no rows found");
    13161317      psFree(output);
    1317       return true;
     1318      return false;
     1319    }
     1320
     1321    if (clean) {
     1322        if (!strcmp(tables[i].tableName, "fakeRun")) {
     1323            if(!pxSetStateCleaned("fakeRun", "state", output)) {
     1324                psFree(output);
     1325                psError(PS_ERR_UNKNOWN, false, "pxSetStateClean failed for table %s",  tables[i].tableName);
     1326                return false;
     1327            }
     1328        }
    13181329    }
    13191330
Note: See TracChangeset for help on using the changeset viewer.