RC2 - fix gkrellmd server to use 64 bit ints for block sizes.

This commit is contained in:
Bill Wilson 2015-12-23 11:06:10 -06:00
parent 624d667e46
commit eff1865a4b
4 changed files with 12 additions and 8 deletions

View File

@ -109,7 +109,7 @@
#define GKRELLMD_VERSION_MAJOR 2
#define GKRELLMD_VERSION_MINOR 3
#define GKRELLMD_VERSION_REV 6
#define GKRELLMD_EXTRAVERSION "-RC1"
#define GKRELLMD_EXTRAVERSION "-RC2"
#define GKRELLMD_CHECK_VERSION(major,minor,rev) \
(GKRELLMD_VERSION_MAJOR > (major) || \

View File

@ -1307,7 +1307,7 @@ typedef struct
*device,
*type,
*options;
glong blocks,
gint64 blocks,
bavail,
bfree,
bsize;
@ -1390,7 +1390,7 @@ gkrellm_fs_add_to_fstab_list(gchar *dir, gchar *dev, gchar *type, gchar *opt)
void
gkrellm_fs_assign_fsusage_data(gpointer pointer,
glong blocks, glong bavail, glong bfree, glong bsize)
gint64 blocks, gint64 bavail, gint64 bfree, gint64 bsize)
{
Mount *m = (Mount *) pointer;
@ -1542,7 +1542,8 @@ serve_fs_data(GkrellmdMonitor *mon, gboolean first_serve)
for (list = mounts_list; list; list = list->next)
{
m = (Mount *) list->data;
snprintf(buf, sizeof(buf), "%s %s %s %ld %ld %ld %ld\n",
snprintf(buf, sizeof(buf),
"%s %s %s %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 "\n",
m->directory, m->device, m->type,
m->blocks, m->bavail, m->bfree, m->bsize);
/*gkrellm_debug(DEBUG_SERVER,
@ -1558,7 +1559,8 @@ serve_fs_data(GkrellmdMonitor *mon, gboolean first_serve)
m = (Mount *) list->data;
if (!m->changed)
continue;
snprintf(buf, sizeof(buf), "%s %s %ld %ld %ld %ld\n",
snprintf(buf, sizeof(buf),
"%s %s %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 "\n",
m->directory, m->device,
m->blocks, m->bavail, m->bfree, m->bsize);
/*gkrellm_debug(DEBUG_SERVER,

View File

@ -753,7 +753,7 @@ typedef struct
gchar *directory,
*device,
*type;
gulong blocks,
gint64 blocks,
bavail,
bfree,
bsize;
@ -821,7 +821,9 @@ client_mounts_line_from_server(gchar *line)
else
{
m = g_new0(Mount, 1);
sscanf(line, "%127s %63s %63s %lu %lu %lu %lu", dir, dev, type,
sscanf(line,
"%127s %63s %63s %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64,
dir, dev, type,
&m->blocks, &m->bavail, &m->bfree, &m->bsize);
m->directory = g_strdup(dir);
m->device = g_strdup(dev);

View File

@ -109,7 +109,7 @@
#define GKRELLM_VERSION_MAJOR 2
#define GKRELLM_VERSION_MINOR 3
#define GKRELLM_VERSION_REV 6
#define GKRELLM_EXTRAVERSION "-RC1"
#define GKRELLM_EXTRAVERSION "-RC2"
#define GKRELLM_CHECK_VERSION(major,minor,rev) \
(GKRELLM_VERSION_MAJOR > (major) || \