summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Krinkin <krinkin.m.u@gmail.com>2015-08-23 21:38:56 +0300
committerKent Overstreet <kent.overstreet@gmail.com>2015-08-26 16:23:44 -0800
commite9acf2e0d2441d480c30e888800c8aa490e6dea0 (patch)
treef08b770f041319587e1137ac63d11a6d5a16270b
parentf45d84c6abcebfc83f645962191de69e3ad53edf (diff)
Fix build error with libblkid usage
-rw-r--r--bcacheadm-query.c6
-rw-r--r--probe-bcache.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/bcacheadm-query.c b/bcacheadm-query.c
index e11b98d..6e3499c 100644
--- a/bcacheadm-query.c
+++ b/bcacheadm-query.c
@@ -303,7 +303,7 @@ int cmd_status(NihCommand *command, char *const *args)
buf[len] = '\0';
dev_names[dev_count] = dev_name(buf);
- snprintf(dev_path, MAX_PATH, "%s/%s", "/dev",
+ snprintf(dev_path, sizeof(dev_path), "%s/%s", "/dev",
dev_names[dev_count]);
sb = query_dev(dev_path, false, false,
true, dev_uuid);
@@ -331,7 +331,7 @@ int cmd_status(NihCommand *command, char *const *args)
int j;
uuid_unparse(m->uuid.b, uuid_str);
- snprintf(dev_state, MAX_PATH, "%s",
+ snprintf(dev_state, sizeof(dev_state), "%s",
cache_state[CACHE_STATE(m)]);
for (j = 0; j < dev_count; j++) {
@@ -339,7 +339,7 @@ int cmd_status(NihCommand *command, char *const *args)
break;
} else if (j == dev_count - 1) {
if (!strcmp(cache_state[CACHE_STATE(m)], "active"))
- snprintf(dev_state, MAX_PATH, "%s", "missing");
+ snprintf(dev_state, sizeof(dev_state), "%s", "missing");
break;
}
}
diff --git a/probe-bcache.c b/probe-bcache.c
index 1b85c4a..cc04f53 100644
--- a/probe-bcache.c
+++ b/probe-bcache.c
@@ -8,7 +8,7 @@
#define __USE_FILE_OFFSET64
#define _XOPEN_SOURCE 500
-#include <blkid.h>
+#include <blkid/blkid.h>
#include <fcntl.h>
#include <linux/fs.h>
#include <stdbool.h>