#include <sys/types.h>
#include <unistd.h>
#include <getopt.h>
+#include <inttypes.h>
#include "include/rbd/librbd.h"
if (offset + size > rbdsize(fi->fh)) {
int r;
- fprintf(stderr, "rbdfs_write resizing %s to 0x%lx\n",
+ fprintf(stderr, "rbdfs_write resizing %s to 0x%"PRIxMAX"\n",
path, offset+size);
r = rbd_resize(rbd->image, offset+size);
if (r < 0)
return -ENOENT;
rbd = &opentbl[fd];
- fprintf(stderr, "truncate %s to %ld (0x%lx)\n", path, size, size);
+ fprintf(stderr, "truncate %s to %"PRIdMAX" (0x%"PRIxMAX")\n", path, size, size);
r = rbd_resize(rbd->image, size);
if (r < 0)
return r;
for (ap = attrs; ap->attrname != NULL; ap++) {
if (strcmp(name, ap->attrname) == 0) {
*ap->attrvalp = strtoull(value, NULL, 0);
- fprintf(stderr, "rbd-fuse: %s set to 0x%lx\n",
+ fprintf(stderr, "rbd-fuse: %s set to 0x%"PRIx64"\n",
ap->attrname, *ap->attrvalp);
return 0;
}
for (ap = attrs; ap->attrname != NULL; ap++) {
if (strcmp(name, ap->attrname) == 0) {
- sprintf(buf, "%lu", *ap->attrvalp);
+ sprintf(buf, "%"PRIu64, *ap->attrvalp);
if (value != NULL && size >= strlen(buf))
strcpy(value, buf);
fprintf(stderr, "rbd-fuse: get %s\n", ap->attrname);