2006-03-19 23:10:38 +01:00
|
|
|
$NetBSD: patch-ar,v 1.3 2006/03/19 22:10:38 joerg Exp $
|
2005-03-30 17:26:43 +02:00
|
|
|
|
2006-03-19 23:10:38 +01:00
|
|
|
--- server/monitor.c.orig 2005-05-24 04:29:32.000000000 +0000
|
2005-03-30 17:26:43 +02:00
|
|
|
+++ server/monitor.c
|
2006-03-19 23:10:38 +01:00
|
|
|
@@ -21,7 +21,7 @@
|
|
|
|
|
|
|
|
#include "gkrellmd.h"
|
|
|
|
#include "gkrellmd-private.h"
|
|
|
|
-
|
|
|
|
+#include <inttypes.h>
|
|
|
|
|
|
|
|
GList *gkrellmd_monitor_list;
|
|
|
|
|
2005-09-08 15:19:56 +02:00
|
|
|
@@ -555,14 +555,14 @@ serve_disk_data(GkrellmdMonitor *mon, gb
|
2005-03-30 17:26:43 +02:00
|
|
|
if (!disk->subdisk_parent)
|
2005-09-08 15:19:56 +02:00
|
|
|
{
|
|
|
|
if (gkrellmd_check_client_version(mon, 2, 2, 7) && disk->virtual)
|
|
|
|
- snprintf(buf, sizeof(buf), "%s virtual %llu %llu\n",
|
|
|
|
+ snprintf(buf, sizeof(buf), "%s virtual %" PRIu64 " %" PRIu64 "\n",
|
|
|
|
disk->name, disk->rb, disk->wb);
|
|
|
|
else
|
|
|
|
- snprintf(buf, sizeof(buf), "%s %llu %llu\n",
|
|
|
|
+ snprintf(buf, sizeof(buf), "%s %" PRIu64 " %" PRIu64 "\n",
|
|
|
|
disk->name, disk->rb, disk->wb);
|
|
|
|
}
|
2005-03-30 17:26:43 +02:00
|
|
|
else if (mon->privat->client->feature_subdisk)
|
|
|
|
- snprintf(buf, sizeof(buf), "%s %s %llu %llu\n",
|
|
|
|
+ snprintf(buf, sizeof(buf), "%s %s %" PRIu64 " %" PRIu64 "\n",
|
|
|
|
disk->name, disk->subdisk_parent, disk->rb, disk->wb);
|
|
|
|
else
|
|
|
|
continue;
|
2005-09-08 15:19:56 +02:00
|
|
|
@@ -1233,7 +1233,7 @@ serve_mem_data(GkrellmdMonitor *mon, gbo
|
2005-03-30 17:26:43 +02:00
|
|
|
if (mem.mem_changed || first_serve)
|
|
|
|
{
|
|
|
|
gkrellmd_set_serve_name(mon, "mem");
|
|
|
|
- snprintf(buf, sizeof(buf), "%llu %llu %llu %llu %llu %llu\n",
|
|
|
|
+ snprintf(buf, sizeof(buf), "%" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 "\n",
|
|
|
|
mem.total, mem.used, mem.free,
|
|
|
|
mem.shared, mem.buffers, mem.cached);
|
|
|
|
gkrellmd_serve_data(mon, buf);
|
2005-09-08 15:19:56 +02:00
|
|
|
@@ -1242,7 +1242,7 @@ serve_mem_data(GkrellmdMonitor *mon, gbo
|
2005-03-30 17:26:43 +02:00
|
|
|
if (mem.swap_changed || first_serve)
|
|
|
|
{
|
|
|
|
gkrellmd_set_serve_name(mon, "swap");
|
|
|
|
- snprintf(buf, sizeof(buf), "%llu %llu %lu %lu\n",
|
|
|
|
+ snprintf(buf, sizeof(buf), "%" PRIu64 " %" PRIu64 " %lu %lu\n",
|
|
|
|
mem.swap_total, mem.swap_used,
|
|
|
|
mem.swap_in, mem.swap_out);
|
|
|
|
gkrellmd_serve_data(mon, buf);
|