Index: trunk/ippTools/src/disttool.c
===================================================================
--- trunk/ippTools/src/disttool.c	(revision 23661)
+++ trunk/ippTools/src/disttool.c	(revision 23688)
@@ -106,5 +106,5 @@
 
     // TODO: should we 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
 
@@ -151,8 +151,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;
@@ -169,6 +169,6 @@
     }
 
-    if (code) {
-        psStringAppend(&query, " , fault = %d", code);
+    if (fault) {
+        psStringAppend(&query, " , fault = %d", fault);
     }
 
@@ -195,5 +195,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
@@ -402,6 +402,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;
     }
@@ -410,5 +410,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;
