Uses PRIu64 to print 64 bit integers.

This commit is contained in:
Andrea Mazzoleni 2011-04-29 22:37:40 +02:00
parent 351beb96f3
commit 10511499aa
7 changed files with 20 additions and 16 deletions

View file

@ -78,16 +78,16 @@ int parity_create(const char* path, data_off_t size)
#endif
if (ret != 0) {
if (errno == ENOSPC) {
fprintf(stderr, "Failed to grow parity file '%s' to size %llu due lack of space.\n", path, size);
fprintf(stderr, "Failed to grow parity file '%s' to size %"PRIu64" due lack of space.\n", path, size);
} else {
fprintf(stderr, "Error growing parity file '%s' to size %llu. Do you have enough space? %s.\n", path, size, strerror(errno));
fprintf(stderr, "Error growing parity file '%s' to size %"PRIu64". Do you have enough space? %s.\n", path, size, strerror(errno));
}
goto bail;
}
} else if (st.st_size > size) {
ret = ftruncate(f, size);
if (ret != 0) {
fprintf(stderr, "Error truncating parity file '%s' to size %llu. %s.\n", path, size, strerror(errno));
fprintf(stderr, "Error truncating parity file '%s' to size %"PRIu64". %s.\n", path, size, strerror(errno));
goto bail;
}
}