]> err.no Git - varnish/commitdiff
Output the fd in decimal instead of hex.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 6 Apr 2006 09:38:00 +0000 (09:38 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 6 Apr 2006 09:38:00 +0000 (09:38 +0000)
Do Id Keyword

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@133 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishlog/Makefile.am
varnish-cache/bin/varnishlog/varnishlog.c

index fa0d2324821b350e3a26e2d89c8c02ef15b3be7c..fbf4bfc66b9898fe77588c22ddea9cff4b9e38d6 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 62 2006-03-23 15:31:20Z phk $
+# $Id$
 
 INCLUDES = -I$(top_srcdir)/include
 
index ea3a961b6d1c4d516795b2cad908053d5bd8847b..b3b62ad22a96d6f781257b35c362bbb5fccfdb88 100644 (file)
@@ -39,6 +39,7 @@ main(int argc, char **argv)
 {
        int fd;
        int i;
+       unsigned u;
        struct shmloghead slh;
        unsigned char *p;
 
@@ -82,9 +83,9 @@ main(int argc, char **argv)
                                fflush(stdout);
                                sleep(1);
                        }
-                       printf("%02x %02d %02x%02x %-12s <",
-                           p[0], p[1], p[2], p[3],
-                           tagnames[p[0]]);
+                       u = (p[2] << 8) | p[3];
+                       printf("%02x %02d %4d %-12s <",
+                           p[0], p[1], u, tagnames[p[0]]);
                        if (p[1] > 0)
                                fwrite(p + 4, p[1], 1, stdout);
                        printf(">\n");