static void combinebackup_system_identifier_cb(JsonManifestParseContext *context,
uint64 manifest_system_identifier);
static void combinebackup_per_file_cb(JsonManifestParseContext *context,
- const char *pathname, size_t size,
+ const char *pathname, uint64 size,
pg_checksum_type checksum_type,
int checksum_length,
uint8 *checksum_payload);
*/
static void
combinebackup_per_file_cb(JsonManifestParseContext *context,
- const char *pathname, size_t size,
+ const char *pathname, uint64 size,
pg_checksum_type checksum_type,
int checksum_length, uint8 *checksum_payload)
{
{
uint32 status; /* hash status */
const char *pathname;
- size_t size;
+ uint64 size;
pg_checksum_type checksum_type;
int checksum_length;
uint8 *checksum_payload;
*/
void
add_file_to_manifest(manifest_writer *mwriter, const char *manifest_path,
- size_t size, time_t mtime,
+ uint64 size, time_t mtime,
pg_checksum_type checksum_type,
int checksum_length,
uint8 *checksum_payload)
appendStringInfoString(&mwriter->buf, "\", ");
}
- appendStringInfo(&mwriter->buf, "\"Size\": %zu, ", size);
+ appendStringInfo(&mwriter->buf, "\"Size\": %llu, ",
+ (unsigned long long) size);
appendStringInfoString(&mwriter->buf, "\"Last-Modified\": \"");
enlargeStringInfo(&mwriter->buf, 128);
uint64 system_identifier);
extern void add_file_to_manifest(manifest_writer *mwriter,
const char *manifest_path,
- size_t size, time_t mtime,
+ uint64 size, time_t mtime,
pg_checksum_type checksum_type,
int checksum_length,
uint8 *checksum_payload);
if (m->size != member->size)
{
report_backup_error(mystreamer->context,
- "\"%s\" has size %lld in \"%s\" but size %zu in the manifest",
- member->pathname, (long long int) member->size,
- mystreamer->archive_name, m->size);
+ "\"%s\" has size %llu in \"%s\" but size %llu in the manifest",
+ member->pathname,
+ (unsigned long long) member->size,
+ mystreamer->archive_name,
+ (unsigned long long) m->size);
m->bad = true;
return;
}
if (mystreamer->checksum_bytes != m->size)
{
report_backup_error(mystreamer->context,
- "file \"%s\" in \"%s\" should contain %zu bytes, but read %zu bytes",
+ "file \"%s\" in \"%s\" should contain %llu bytes, but read %llu bytes",
m->pathname, mystreamer->archive_name,
- m->size, mystreamer->checksum_bytes);
+ (unsigned long long) m->size,
+ (unsigned long long) mystreamer->checksum_bytes);
return;
}
static void verifybackup_system_identifier(JsonManifestParseContext *context,
uint64 manifest_system_identifier);
static void verifybackup_per_file_cb(JsonManifestParseContext *context,
- const char *pathname, size_t size,
+ const char *pathname, uint64 size,
pg_checksum_type checksum_type,
int checksum_length,
uint8 *checksum_payload);
*/
static void
verifybackup_per_file_cb(JsonManifestParseContext *context,
- const char *pathname, size_t size,
+ const char *pathname, uint64 size,
pg_checksum_type checksum_type,
int checksum_length, uint8 *checksum_payload)
{
if (m->size != sb.st_size)
{
report_backup_error(context,
- "\"%s\" has size %lld on disk but size %zu in the manifest",
- relpath, (long long int) sb.st_size, m->size);
+ "\"%s\" has size %llu on disk but size %llu in the manifest",
+ relpath, (unsigned long long) sb.st_size,
+ (unsigned long long) m->size);
m->bad = true;
}
const char *relpath = m->pathname;
int fd;
int rc;
- size_t bytes_read = 0;
+ uint64 bytes_read = 0;
uint8 checksumbuf[PG_CHECKSUM_MAX_LENGTH];
int checksumlen;
if (bytes_read != m->size)
{
report_backup_error(context,
- "file \"%s\" should contain %zu bytes, but read %zu bytes",
- relpath, m->size, bytes_read);
+ "file \"%s\" should contain %llu bytes, but read %llu bytes",
+ relpath, (unsigned long long) m->size,
+ (unsigned long long) bytes_read);
return;
}
{
uint32 status; /* hash status */
const char *pathname;
- size_t size;
+ uint64 size;
pg_checksum_type checksum_type;
int checksum_length;
uint8 *checksum_payload;
json_manifest_finalize_file(JsonManifestParseState *parse)
{
JsonManifestParseContext *context = parse->context;
- size_t size;
+ uint64 size;
char *ep;
int checksum_string_length;
pg_checksum_type checksum_type;
}
/* Parse size. */
- size = strtoul(parse->size, &ep, 10);
+ size = strtou64(parse->size, &ep, 10);
if (*ep)
json_manifest_parse_failure(parse->context,
"file size is not an integer");
uint64 manifest_system_identifier);
typedef void (*json_manifest_per_file_callback) (JsonManifestParseContext *,
const char *pathname,
- size_t size, pg_checksum_type checksum_type,
+ uint64 size, pg_checksum_type checksum_type,
int checksum_length, uint8 *checksum_payload);
typedef void (*json_manifest_per_wal_range_callback) (JsonManifestParseContext *,
TimeLineID tli,