summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: df570a3)
raw | patch | inline | side by side (parent: df570a3)
author | Tim Laszlo <Tim.Laszlo@magnetar.com> | |
Mon, 28 Jul 2014 17:00:05 +0000 (12:00 -0500) | ||
committer | Tim Laszlo <Tim.Laszlo@magnetar.com> | |
Mon, 28 Jul 2014 17:00:05 +0000 (12:00 -0500) |
src/drbd.c | patch | blob | history |
diff --git a/src/drbd.c b/src/drbd.c
index 800bf62dadd26657a429b706e2d0eefba26a92ff..2c80ca2f6fe92b4ef0181c8c12bbf550fce8841d 100644 (file)
--- a/src/drbd.c
+++ b/src/drbd.c
}
-static int drbd_submit_fields (int resource,
+static int drbd_submit_fields (long int resource,
char **fields, size_t fields_num)
{
char plugin_instance[DATA_MAX_NAME_LEN];
if (fields_num != drbd_names_num)
{
WARNING ("drbd plugin: Wrong number of fields for "
- "r%i statistics. Expected %zu, got %zu.",
+ "r%ld statistics. Expected %zu, got %zu.",
resource, drbd_names_num, fields_num);
return (EINVAL);
}
- ssnprintf (plugin_instance, sizeof (plugin_instance), "r%i",
+ ssnprintf (plugin_instance, sizeof (plugin_instance), "r%ld",
resource);
for (i = 0; i < drbd_names_num; i++)
FILE *fh;
char buffer[256];
- int resource = -1;
+ long int resource = -1;
char *fields[16];
int fields_num = 0;
if (isdigit(fields[0][0]))
{
/* parse the resource line */
- resource = atoi(fields[0]);
+ resource = strtol(fields[0], NULL, 10);
}
else
{