Use correct format strings for 64bit uvm structure layout.
This commit is contained in:
parent
fee3d9e82f
commit
76574d9216
4 changed files with 41 additions and 18 deletions
|
@ -1,9 +1,9 @@
|
|||
# $NetBSD: Makefile,v 1.21 2012/10/23 19:51:39 asau Exp $
|
||||
# $NetBSD: Makefile,v 1.22 2013/09/10 14:45:05 joerg Exp $
|
||||
#
|
||||
|
||||
DISTNAME= ${PKGNAME_NOREV:S/-//}
|
||||
PKGNAME= xuvmstat-20050909
|
||||
PKGREVISION= 1
|
||||
PKGREVISION= 2
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= http://www.NetBSD.org/~chuck/gz/
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
$NetBSD: distinfo,v 1.10 2011/09/29 21:00:19 wiz Exp $
|
||||
$NetBSD: distinfo,v 1.11 2013/09/10 14:45:05 joerg Exp $
|
||||
|
||||
SHA1 (xuvmstat20050909.tar.gz) = b8118b1b11c260683ff14fe2200e9ee584f6b7c5
|
||||
RMD160 (xuvmstat20050909.tar.gz) = 6400ee7e396c410bf22ef9673b27b909f2a29a68
|
||||
Size (xuvmstat20050909.tar.gz) = 7661 bytes
|
||||
SHA1 (patch-aa) = 85115066c866198ba3c40b3bf819d68272921cdd
|
||||
SHA1 (patch-aa) = 39881270046f9588c014546c6c8327f123326fb9
|
||||
SHA1 (patch-ab) = d68a14dc0a465b1f6e6a3b422f41f677c03b20b6
|
||||
SHA1 (patch-ac) = e1c71e5f4a1936723a8b591e5fd5543e1f2f8223
|
||||
SHA1 (patch-ad) = 3e607f136531e486f2404368b3922250cd3b3d8c
|
||||
SHA1 (patch-ad) = 92253fe9a125b961964389e7bb70db418d4a38f2
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: patch-aa,v 1.10 2011/09/29 21:00:19 wiz Exp $
|
||||
$NetBSD: patch-aa,v 1.11 2013/09/10 14:45:05 joerg Exp $
|
||||
|
||||
--- xuvmstat.c.orig 2005-09-09 13:38:48.000000000 +0000
|
||||
+++ xuvmstat.c
|
||||
|
@ -53,12 +53,14 @@ $NetBSD: patch-aa,v 1.10 2011/09/29 21:00:19 wiz Exp $
|
|||
gettimeofday(&tv, NULL);
|
||||
/* NEW GRAPH DATA HERE */
|
||||
|
||||
@@ -186,7 +187,7 @@ int was_timeout;
|
||||
@@ -185,8 +186,8 @@ int was_timeout;
|
||||
y += 5;
|
||||
|
||||
XSetFont(xdpy->dpy, gc, fnt_fixed->fid);
|
||||
snprintf(buf, sizeof(buf),"The UVM system manages %d %d-byte pages",
|
||||
- snprintf(buf, sizeof(buf),"The UVM system manages %d %d-byte pages",
|
||||
- cexp.npages, cexp.pagesize);
|
||||
+ curexp.npages, curexp.pagesize);
|
||||
+ snprintf(buf, sizeof(buf),"The UVM system manages %jd %jd-byte pages",
|
||||
+ (intmax_t)curexp.npages, (intmax_t)curexp.pagesize);
|
||||
XDrawImageString(xdpy->dpy, win, gc, 5, get_fontheight(fnt_fixed) + y,
|
||||
buf, strlen(buf));
|
||||
y += get_fontheight(fnt_fixed) + 5;
|
||||
|
@ -219,8 +221,8 @@ $NetBSD: patch-aa,v 1.10 2011/09/29 21:00:19 wiz Exp $
|
|||
y += get_fontheight(fnt_fixed) + 5;
|
||||
|
||||
+#if __NetBSD_Version__ >= 599002100
|
||||
+ snprintf(buf, sizeof(buf), " woke=%d, revs=%d",
|
||||
+ curexp.pdwoke, curexp.pdrevs);
|
||||
+ snprintf(buf, sizeof(buf), " woke=%jd, revs=%jd",
|
||||
+ (intmax_t)curexp.pdwoke, (intmax_t)curexp.pdrevs);
|
||||
+#else
|
||||
snprintf(buf, sizeof(buf), " woke=%d, revs=%d, swout=%d",
|
||||
- cexp.pdwoke, cexp.pdrevs, cexp.pdswout);
|
||||
|
@ -230,23 +232,26 @@ $NetBSD: patch-aa,v 1.10 2011/09/29 21:00:19 wiz Exp $
|
|||
buf, strlen(buf));
|
||||
y += get_fontheight(fnt_fixed) + 1;
|
||||
|
||||
snprintf(buf, sizeof(buf), " scans=%d, anon_scans=%d, obj_scans=%d",
|
||||
- snprintf(buf, sizeof(buf), " scans=%d, anon_scans=%d, obj_scans=%d",
|
||||
- cexp.pdscans, cexp.pdanscan, cexp.pdobscan);
|
||||
+ curexp.pdscans, curexp.pdanscan, curexp.pdobscan);
|
||||
+ snprintf(buf, sizeof(buf), " scans=%jd, anon_scans=%jd, obj_scans=%jd",
|
||||
+ (intmax_t)curexp.pdscans, (intmax_t)curexp.pdanscan, (intmax_t)curexp.pdobscan);
|
||||
XDrawImageString(xdpy->dpy, win, gc, 5, get_fontheight(fnt_fixed) + y,
|
||||
buf, strlen(buf));
|
||||
y += get_fontheight(fnt_fixed) + 1;
|
||||
|
||||
snprintf(buf, sizeof(buf), " busy=%d, freed=%d, pending=%d",
|
||||
- snprintf(buf, sizeof(buf), " busy=%d, freed=%d, pending=%d",
|
||||
- cexp.pdbusy, cexp.pdfreed, cexp.pdpending);
|
||||
+ curexp.pdbusy, curexp.pdfreed, curexp.pdpending);
|
||||
+ snprintf(buf, sizeof(buf), " busy=%jd, freed=%jd, pending=%jd",
|
||||
+ (intmax_t)curexp.pdbusy, (intmax_t)curexp.pdfreed, (intmax_t)curexp.pdpending);
|
||||
XDrawImageString(xdpy->dpy, win, gc, 5, get_fontheight(fnt_fixed) + y,
|
||||
buf, strlen(buf));
|
||||
y += get_fontheight(fnt_fixed) + 1;
|
||||
|
||||
snprintf(buf, sizeof(buf), " reactivate=%d, deactivate=%d, pageouts=%d",
|
||||
- snprintf(buf, sizeof(buf), " reactivate=%d, deactivate=%d, pageouts=%d",
|
||||
- cexp.pdreact, cexp.pddeact, cexp.pdpageouts);
|
||||
+ curexp.pdreact, curexp.pddeact, curexp.pdpageouts);
|
||||
+ snprintf(buf, sizeof(buf), " reactivate=%jd, deactivate=%jd, pageouts=%jd",
|
||||
+ (intmax_t)curexp.pdreact, (intmax_t)curexp.pddeact, (intmax_t)curexp.pdpageouts);
|
||||
XDrawImageString(xdpy->dpy, win, gc, 5, get_fontheight(fnt_fixed) + y,
|
||||
buf, strlen(buf));
|
||||
y += get_fontheight(fnt_fixed) + 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: patch-ad,v 1.2 2011/09/29 21:00:19 wiz Exp $
|
||||
$NetBSD: patch-ad,v 1.3 2013/09/10 14:45:05 joerg Exp $
|
||||
|
||||
--- libcdcx.c.orig 2005-09-09 13:38:48.000000000 +0000
|
||||
+++ libcdcx.c
|
||||
|
@ -10,6 +10,24 @@ $NetBSD: patch-ad,v 1.2 2011/09/29 21:00:19 wiz Exp $
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -164,7 +165,7 @@ u_long *vals, *colors, backcolor;
|
||||
colwidth = barwidth / cols;
|
||||
|
||||
for (lcv = 0 ; lcv < n ; lcv++) {
|
||||
- snprintf(buf, sizeof(buf), "%s = %d", names[lcv], vals[lcv]);
|
||||
+ snprintf(buf, sizeof(buf), "%s = %lu", names[lcv], vals[lcv]);
|
||||
XSetForeground(xdpy->dpy, gc, colors[lcv]);
|
||||
XDrawImageString(xdpy->dpy, win, gc, x, get_fontheight(font) + y,
|
||||
buf, strlen(buf));
|
||||
@@ -252,7 +253,7 @@ u_long *vals, *colors, backcolor;
|
||||
colwidth = barwidth / cols;
|
||||
|
||||
for (lcv = 0 ; lcv < n ; lcv++) {
|
||||
- snprintf(buf, sizeof(buf), "%s = %d", names[lcv], vals[lcv]);
|
||||
+ snprintf(buf, sizeof(buf), "%s = %lu", names[lcv], vals[lcv]);
|
||||
XSetForeground(xdpy->dpy, gc, colors[lcv]);
|
||||
XDrawImageString(xdpy->dpy, win, gc, x, get_fontheight(font) + y,
|
||||
buf, strlen(buf));
|
||||
@@ -285,7 +286,7 @@ struct graph *create_graph(nlines, title
|
||||
int nlines;
|
||||
char *title;
|
||||
|
|
Loading…
Reference in a new issue