]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
assert: no 0x before thread id
authorSage Weil <sage.weil@dreamhost.com>
Sun, 16 Oct 2011 17:36:31 +0000 (10:36 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Thu, 20 Oct 2011 04:14:13 +0000 (21:14 -0700)
There's no 0x prefix in the log lines either.  This makes it easier to
copy/paste word and search.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/common/assert.cc
src/global/signal_handler.cc

index ba80bd78009868fd635d6d57ad760415ba394a36..c525665ef9d277b7a34f458a59da6e276713926a 100644 (file)
@@ -52,9 +52,9 @@ namespace ceph {
     char buf[8096];
     BackTrace *bt = new BackTrace(1);
     snprintf(buf, sizeof(buf),
-            "%s: In function '%s', in thread '%p'\n"
+            "%s: In function '%s', in thread '%llx'\n"
             "%s: %d: FAILED assert(%s)\n",
-            file, func, (void*)pthread_self(), file, line, assertion);
+            file, func, (unsigned long long)pthread_self(), file, line, assertion);
     dout_emergency(buf);
 
     // TODO: get rid of this memory allocation.
index afc299193a9e3e5638278fb28656870be0074239..abe6f0f16e458383f4af14a9a653e96c718e8d5b 100644 (file)
@@ -77,8 +77,8 @@ static void handle_shutdown_signal(int signum)
 {
   char buf[1024];
   snprintf(buf, sizeof(buf), "*** Caught signal (%s) **\n "
-           "in thread %p. Shutting down.\n",
-           sys_siglist[signum], (void*)pthread_self());
+           "in thread %llx. Shutting down.\n",
+           sys_siglist[signum], (unsigned long long)pthread_self());
   dout_emergency(buf);
   pidfile_remove();
   reraise_fatal(signum);
@@ -91,7 +91,7 @@ static void handle_fatal_signal(int signum)
   // presumably dump core-- will handle it.
   char buf[1024];
   snprintf(buf, sizeof(buf), "*** Caught signal (%s) **\n "
-           "in thread %p\n", sys_siglist[signum], (void*)pthread_self());
+           "in thread %llx\n", sys_siglist[signum], (unsigned long long)pthread_self());
   dout_emergency(buf);
   pidfile_remove();