Lines Matching refs:offset
233 * accepts an offset relative to di->mediaoffset. If we're carrying any
239 textdump_writeblock(struct dumperinfo *di, off_t offset, char *buffer)
244 if (offset + TEXTDUMP_BLOCKSIZE > di->mediasize)
246 if (offset < SIZEOF_METADATA)
248 textdump_error = dump_write(di, buffer, 0, offset + di->mediaoffset,
251 printf("textdump_writeblock: offset %jd, error %d\n", (intmax_t)offset,
257 * Interfaces to save and restore the dump offset, so that printers can go
272 textdump_restoreoff(off_t offset)
275 textdump_offset = offset;
279 * Interface to write the "next block" relative to the current offset; since
333 u_int i, len, offset, seq, total_len;
337 * Write out a dummy tar header to advance the offset; we'll rewrite
350 offset = 0;
356 textdump_block_buffer[offset] = buf[i];
357 offset++;
358 if (offset != sizeof(textdump_block_buffer))
362 total_len += offset;
363 offset = 0;
366 total_len += offset; /* Without the zero-padding. */
367 if (offset != 0) {
368 bzero(textdump_block_buffer + offset,
369 sizeof(textdump_block_buffer) - offset);