Index: branches/pap/ippTools/src/difftool.c
===================================================================
--- branches/pap/ippTools/src/difftool.c	(revision 23511)
+++ branches/pap/ippTools/src/difftool.c	(revision 23532)
@@ -485,7 +485,8 @@
     PXOPT_LOOKUP_S64(diff_id, config->args, "-diff_id", true, false); // required
     PXOPT_LOOKUP_STR(skycell_id, config->args, "-skycell_id", true, false);
-    PXOPT_LOOKUP_S16(code, config->args, "-code", false, false);
-    PXOPT_LOOKUP_STR(uri, config->args, "-uri", (code == 0), false);
-    PXOPT_LOOKUP_STR(path_base, config->args, "-path_base", (code == 0), false);
+    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
+    PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false);
+    PXOPT_LOOKUP_STR(uri, config->args, "-uri", (fault == 0), false);
+    PXOPT_LOOKUP_STR(path_base, config->args, "-path_base", (fault == 0), false);
 
     // optional
@@ -540,5 +541,6 @@
                            hostname,
                            good_frac,
-                           code,
+                           fault,
+                           quality,
                            magicked
           )) {
@@ -578,5 +580,5 @@
     PXOPT_COPY_S64(config->args, where,  "-diff_skyfile_id", "diffInputSkyfile.diff_skyfile_id", "==");
     PXOPT_COPY_STR(config->args, where, "-tess_id", "diffSkyfile.tess_id", "==");
-    PXOPT_COPY_S16(config->args, where, "-code", "diffSkyfile.fault", "==");
+    PXOPT_COPY_S16(config->args, where, "-fault", "diffSkyfile.fault", "==");
     PXOPT_COPY_S64(config->args, where, "-exp_id", "rawExp.exp_id", "==");
     PXOPT_COPY_STR(config->args, where, "-exp_name", "rawExp.exp_name", "==");
@@ -655,5 +657,6 @@
     PXOPT_COPY_S64(config->args, where,  "-diff_id", "diffSkyfile.diff_id", "==");
     PXOPT_COPY_STR(config->args, where,  "-label", "diffRun.label", "==");
-    PXOPT_COPY_S16(config->args, where, "-code",     "fault", "==");
+    PXOPT_COPY_S16(config->args, where, "-fault",     "fault", "==");
+    PXOPT_COPY_S16(config->args, where, "-quality",     "quality", "==");
 
     if (!psDBTransaction(config->dbh)) {
@@ -1662,10 +1665,10 @@
     PS_ASSERT_PTR_NON_NULL(config, false);
 
-    PXOPT_LOOKUP_S16(code, config->args, "-code", true, false);
+    PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false);
 
     psMetadata *where = psMetadataAlloc();
     PXOPT_COPY_S64(config->args, where, "-diff_id",   "diff_id",   "==");
 
-    if (!pxSetFaultCode(config->dbh, "diffSkyfile", where, code)) {
+    if (!pxSetFaultCode(config->dbh, "diffSkyfile", where, fault)) {
         psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag");
         psFree (where);
