Index: trunk/ippTools/src/magicdstool.c
===================================================================
--- trunk/ippTools/src/magicdstool.c	(revision 23388)
+++ trunk/ippTools/src/magicdstool.c	(revision 23389)
@@ -242,5 +242,5 @@
 
         // create a new magicRun for this group
-        magicRunRow *run = magicRunRowAlloc(0, exp_id, "run", workdir, "dirty", label, dvodb, registered, 0);
+        magicRunRow *run = magicRunRowAlloc(0, exp_id, "new", workdir, "dirty", label, dvodb, registered, 0);
         if (!run) {
             psAbort("failed to alloc magicRun object");
@@ -320,10 +320,11 @@
     PXOPT_LOOKUP_STR(stage, config->args, "-stage", true, false);
     PXOPT_LOOKUP_STR(outroot, config->args, "-outroot", true, false);
+
+    // optional
     PXOPT_LOOKUP_STR(recoveryroot, config->args, "-recoveryroot", false, false);
     PXOPT_LOOKUP_BOOL(re_place, config->args, "-replace", false);
     PXOPT_LOOKUP_BOOL(remove, config->args, "-remove", false);
-
-    // optional
     PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
+    PXOPT_LOOKUP_STR(label, config->args, "-label", false, false);
 
     psS64 stage_id = 0, cam_id = 0;
@@ -337,8 +338,9 @@
             0,          // ID
             magic_id,
-            "run",      // state
+            "new",      // state
             stage,
             stage_id,
             cam_id,
+            label,
             outroot,
             recoveryroot,
@@ -396,5 +398,5 @@
     PXOPT_COPY_S64(config->args, where, "-magic_ds_id", "magic_ds_id", "==");
     PXOPT_COPY_S64(config->args, where, "-magic_id", "magic_id", "==");
-//    PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "==");
+    PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
 
     PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
@@ -685,6 +687,6 @@
         psS64 magic_ds_id = psMetadataLookupS64(NULL, row, "magic_ds_id");
 
-        // set magicDSRun.state to 'stop'
-        if (!setmagicDSRunState(config, magic_ds_id, "stop")) {
+        // set magicDSRun.state to 'full'
+        if (!setmagicDSRunState(config, magic_ds_id, "full")) {
             psError(PS_ERR_UNKNOWN, false, "failed to change magicDSRun.state for magic_ds_id: %" PRId64,
                 magic_ds_id);
@@ -795,6 +797,6 @@
     // check that state is a valid string value
     if (!(
-            (strncmp(state, "run", 4) == 0)
-            || (strncmp(state, "stop", 5) == 0)
+            (strncmp(state, "new", 4) == 0)
+            || (strncmp(state, "full", 5) == 0)
         )
     ) {
Index: trunk/ippTools/src/magicdstoolConfig.c
===================================================================
--- trunk/ippTools/src/magicdstoolConfig.c	(revision 23388)
+++ trunk/ippTools/src/magicdstoolConfig.c	(revision 23389)
@@ -70,5 +70,5 @@
     psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-replace", 0, "use the simple output format", false);
     psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-remove", 0, "use the simple output format", false);
-//    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-label", 0, "define label", NULL);
+    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-label", 0, "define label", NULL);
     psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false);
 
@@ -88,5 +88,5 @@
     psMetadataAddS64(todestreakArgs, PS_LIST_TAIL, "-magic_ds_id", 0, "search by magic Destreak ID", 0);
     psMetadataAddS64(todestreakArgs, PS_LIST_TAIL, "-magic_id", 0, "search by magic ID", 0);
-//    psMetadataAddS64(todestreakArgs, PS_LIST_TAIL, "-exp_id", 0, "search by exposure ID", 0);
+    psMetadataAddStr(todestreakArgs, PS_LIST_TAIL, "-label", 0, "define label", NULL);
     psMetadataAddU64(todestreakArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0);
     psMetadataAddBool(todestreakArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false);
Index: trunk/ippTools/src/magictool.c
===================================================================
--- trunk/ippTools/src/magictool.c	(revision 23388)
+++ trunk/ippTools/src/magictool.c	(revision 23389)
@@ -217,5 +217,5 @@
 
         // create a new magicRun for this group
-        magicRunRow *run = magicRunRowAlloc(0, exp_id, diff_id, "run", workdir, "dirty", label, dvodb, registered, 0);
+        magicRunRow *run = magicRunRowAlloc(0, exp_id, diff_id, "new", workdir, "dirty", label, dvodb, registered, 0);
         if (!run) {
             psAbort("failed to alloc magicRun object");
@@ -538,5 +538,5 @@
 
     if (code > 0) {
-        char *query = "UPDATE magicRun SET fault = %d, state = 'stop' WHERE magic_id = %" PRId64;
+        char *query = "UPDATE magicRun SET fault = %d, state = 'full' WHERE magic_id = %" PRId64;
         if (!p_psDBRunQueryF(config->dbh, query, code, magic_id)) {
             psError(PS_ERR_UNKNOWN, false,
@@ -1088,8 +1088,8 @@
     }
 
-    // Set to "run"
+    // Set to "new"
     {
         psString query = psStringCopy("UPDATE magicRun JOIN magicMask USING(magic_id) "
-                                      "SET magicRun.state = 'run' WHERE magicMask.fault != 0");
+                                      "SET magicRun.state = 'new' WHERE magicMask.fault != 0");
 
         if (psListLength(where->list)) {
@@ -1481,6 +1481,6 @@
     // check that state is a valid string value
     if (!(
-            (strncmp(state, "run", 4) == 0)
-            || (strncmp(state, "stop", 5) == 0)
+            (strncmp(state, "new", 4) == 0)
+            || (strncmp(state, "full", 5) == 0)
             || (strncmp(state, "reg", 4) == 0)
         )
