+void
+holding_set_origsize(
+ char *holding_file,
+ off_t orig_size)
+{
+ int fd;
+ size_t buflen;
+ char buffer[DISK_BLOCK_BYTES];
+ char *read_buffer;
+ dumpfile_t file;
+
+ if((fd = robust_open(holding_file, O_RDWR, 0)) == -1) {
+ dbprintf(_("holding_set_origsize: open of %s failed: %s\n"),
+ holding_file, strerror(errno));
+ return;
+ }
+
+ buflen = full_read(fd, buffer, SIZEOF(buffer));
+ if (buflen <= 0) {
+ dbprintf(_("holding_set_origsize: %s: empty file?\n"), holding_file);
+ return;
+ }
+ parse_file_header(buffer, &file, (size_t)buflen);
+ lseek(fd, (off_t)0, SEEK_SET);
+ file.orig_size = orig_size;
+ read_buffer = build_header(&file, NULL, DISK_BLOCK_BYTES);
+ full_write(fd, read_buffer, DISK_BLOCK_BYTES);
+ dumpfile_free_data(&file);
+ amfree(read_buffer);
+ close(fd);
+}
+