Index: /trunk/ippTools/src/magictool.c
===================================================================
--- /trunk/ippTools/src/magictool.c	(revision 15346)
+++ /trunk/ippTools/src/magictool.c	(revision 15347)
@@ -684,4 +684,5 @@
         return false;
     }
+
     return true;
 }
@@ -698,4 +699,45 @@
 {
     PS_ASSERT_PTR_NON_NULL(config, false);
+
+    bool status = false;
+    psString magic_id = psMetadataLookupStr(&status, config->args, "-magic_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -magic_id");
+        return false;
+    }
+    if (!magic_id) {
+        psError(PS_ERR_UNKNOWN, true, "-magic_id is required");
+        return false;
+    }
+
+    psString diff_id = psMetadataLookupStr(&status, config->args, "-diff_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -diff_id");
+        return false;
+    }
+    if (!diff_id) {
+        psError(PS_ERR_UNKNOWN, true, "-diff_id is required");
+        return false;
+    }
+
+    psString uri = psMetadataLookupStr(&status, config->args, "-uri");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -uri");
+        return false;
+    }
+    if (!uri) {
+        psError(PS_ERR_UNKNOWN, true, "-uri is required");
+        return false;
+    }
+
+    if (!magicSkyfileMaskInsert(config->dbh,
+                (psS64)atoll(magic_id),
+                (psS64)atoll(diff_id),
+                uri
+        )) {
+        psError(PS_ERR_UNKNOWN, false, "database error");
+        return false;
+    }
+
     return true;
 }
