IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26095


Ignore:
Timestamp:
Nov 10, 2009, 2:41:25 PM (16 years ago)
Author:
bills
Message:

allow -all to -pendingcleanup

Location:
trunk/ippTools/src
Files:
2 edited

Legend:

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

    r26093 r26095  
    17341734    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
    17351735    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
    1736 
    1737     if (!psListLength(where->list)) {
    1738         psFree(where);
    1739         psError(PXTOOLS_ERR_DATA, false, "search parameters are required");
    1740         return false;
    1741     }
     1736    PXOPT_LOOKUP_BOOL(all, config->args, "-all", false);
    17421737
    17431738    psString query = pxDataGet("disttool_pendingcleanup.sql");
    17441739
    1745     psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
    1746     psStringAppend(&query, " AND %s", whereClause);
    1747     psFree(whereClause);
    1748     psFree(where);
     1740    if (psListLength(where->list)) {
     1741        psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
     1742        psStringAppend(&query, " AND %s", whereClause);
     1743        psFree(whereClause);
     1744        psFree(where);
     1745    } else if (!all) {
     1746        psFree(where);
     1747        psError(PXTOOLS_ERR_DATA, false, "search parameters or -all are required");
     1748        return false;
     1749    }
    17491750
    17501751    // treat limit == 0 as "no limit"
  • trunk/ippTools/src/disttoolConfig.c

    r26091 r26095  
    101101    psMetadataAddU64(pendingcleanupArgs, PS_LIST_TAIL, "-limit",  0,  "limit result set to N items", 0);
    102102    psMetadataAddBool(pendingcleanupArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false);
     103    psMetadataAddBool(pendingcleanupArgs, PS_LIST_TAIL, "-all",    0, "list all runs pending cleanup", NULL);
    103104
    104105
Note: See TracChangeset for help on using the changeset viewer.