Revision: 14307
Author: adrian.chadd
Date: Sat Sep 26 00:15:44 2009
Log: * Add debug init from environment code
* Add in start/finish debugging info


http://code.google.com/p/lusca-cache/source/detail?r=14307

Modified:
  /branches/LUSCA_HEAD/app/ufs_newfs/ufs_newfs.c

=======================================
--- /branches/LUSCA_HEAD/app/ufs_newfs/ufs_newfs.c      Thu Jul 23 03:32:01 2009
+++ /branches/LUSCA_HEAD/app/ufs_newfs/ufs_newfs.c      Sat Sep 26 00:15:44 2009
@@ -64,10 +64,26 @@
  main(int argc, const char *argv[])
  {
        store_ufs_dir_t sd;
-
+        char *t = NULL;
+        char *debug_args = "ALL,1";
+
+        /* Setup the debugging library */
+        if ((t = getenv("SQUID_DEBUG")))
+                debug_args = xstrdup(t);
+        _db_init(debug_args);
+        _db_set_stderr_debug(99);
+        getCurrentTime();
+
+       if (argc < 3) {
+               printf("Usage: %s <path> <l1> <l2>\n", argv[0]);
+               exit(127);
+       }
+
+       debug(85, 1) ("ufs_newfs: %s: starting newfs\n", argv[1]);
        store_ufs_init(&sd, argv[1], atoi(argv[2]), atoi(argv[3]), "/tmp/f");
        storeAufsDirCreateSwapSubDirs(&sd);
        store_ufs_done(&sd);
+       debug(85, 1) ("ufs_newfs: %s: finished newfs\n", argv[1]);

        exit(0);
  }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to