Index: branches/pap/ippTools/src/disttool.c
===================================================================
--- branches/pap/ippTools/src/disttool.c	(revision 23511)
+++ branches/pap/ippTools/src/disttool.c	(revision 23532)
@@ -102,5 +102,5 @@
 
     // TODO: check that stage_id actually exists for stage
-    // in magicdstool we queue off of a magic_id so the stage_id, exp_id, and cam_id get looked up 
+    // in magicdstool we queue off of a magic_id so the stage_id, exp_id, and cam_id get looked up
     // when the run is queued
     // Should we also check here that the run is full or cleaned and that all of the images
@@ -138,8 +138,8 @@
     PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false);
     PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false);
-    PXOPT_LOOKUP_S16(code, config->args, "-code", false, false);
-
-    if ((!state) && (!label) && (!code)) {
-        psError(PXTOOLS_ERR_DATA, false, "parameters (-code or -set_state or -set_label) are required");
+    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
+
+    if ((!state) && (!label) && (!fault)) {
+        psError(PXTOOLS_ERR_DATA, false, "parameters (-fault or -set_state or -set_label) are required");
         psFree(where);
         return false;
@@ -156,6 +156,6 @@
     }
 
-    if (code) {
-        psStringAppend(&query, " , fault = %d", code);
+    if (fault) {
+        psStringAppend(&query, " , fault = %d", fault);
     }
 
@@ -182,5 +182,5 @@
     PXOPT_COPY_STR(config->args, where, "-state", "state", "==");
     PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
-    PXOPT_COPY_S16(config->args, where, "-code", "distComponent.fault", "==");
+    PXOPT_COPY_S16(config->args, where, "-fault", "distComponent.fault", "==");
 
     // It might be useful to be able to query by the parameters of the underlying runs
@@ -368,6 +368,6 @@
     // unless fault code is set require filename, bytes, and md5sum
     bool require_fileinfo = false;
-    PXOPT_LOOKUP_S16(code, config->args, "-code", false, false);
-    if (!code) {
+    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
+    if (!fault) {
         require_fileinfo = true;
     }
@@ -376,5 +376,5 @@
     PXOPT_LOOKUP_STR(name, config->args, "-name", require_fileinfo, false);
 
-    if (!distComponentInsert(config->dbh, dist_id, component, bytes, md5sum, "full", name, code)) {
+    if (!distComponentInsert(config->dbh, dist_id, component, bytes, md5sum, "full", name, fault)) {
         psError(PS_ERR_UNKNOWN, false, "database error");
         return false;
