Lines Matching full:we

82 	 * does not specify a blocksize, we use the format default blocksize.  in wr_start()
83 * We must be picky on writes, so we do not allow the user to create an in wr_start()
84 * archive that might be hard to read elsewhere. If all ok, we then in wr_start()
106 * we only allow wrblksz to be used with all archive operations in wr_start()
128 * leave space for the header pushback (see get_arc()). If we are in rd_start()
179 * position of the tape head) and the write point within the data we have
180 * stored in the read (soon to become write) buffer. We may have to move
185 * We first calculate which record has the first byte of the trailer. We
187 * up. We set the buffer write pointer to be at this byte (the byte where
188 * the trailer starts). We then move the OS file pointer back to the
213 * in the last archive volume read. (If a is set we still use rdblksz in appnd_start()
228 * Calculate bytes to move back and move in front of record where we in appnd_start()
229 * need to start writing from. Remember we have to add in any padding in appnd_start()
230 * that might be in the buffer after the trailer in the last block. We in appnd_start()
240 * We may have gone too far if there is valid data in the block we are in appnd_start()
247 * to be real physical blocksize so we must loop until we get in appnd_start()
249 * determination of the physical block size, we will fail. in appnd_start()
274 * At this point we are ready to write. If the device requires special in appnd_start()
276 * that is handled in ar_set_wr(). From now on we operate under normal in appnd_start()
292 * try to reset the device (if possible) so we can continue to read. Keep
293 * trying to do this until we get a valid read, or we reach the limit on
294 * consecutive read faults (at which point we give up). The user can
307 * if the user says bail out on first fault, we are out of here... in rd_sync()
340 * bad media and try again. if media is badly damaged, we ask in rd_sync()
342 * volume. remember the goal on reads is to get the most we in rd_sync()
360 * buffer. This is required as we cannot be sure that the header does NOT
361 * overlap a block boundary (as in the case we are trying to recover a
392 * consume what data we have in the buffer. If we have to move forward in rd_skip()
393 * whole records, we call the low level skip function to see if we can in rd_skip()
394 * move within the archive without doing the expensive reads on data we in rd_skip()
410 * We have to read more, calculate complete and partial record reads in rd_skip()
411 * based on rdblksz. we skip over "cnt" complete records in rd_skip()
417 * if the skip fails, we will have to resync. ar_fow will tell us in rd_skip()
418 * how much it can skip over. We will have to read the rest. in rd_skip()
426 * what is left we have to read (which may be the whole thing if in rd_skip()
432 * if the read fails, we will have to resync in rd_skip()
447 * flush out any data (and pad if required) the last block. We always pad
448 * with zero (even though we do not have to). Padding with 0 makes it a
466 * by format specific write routines to pass a file header). On failure we
467 * punt. We do not allow the user to continue to write flawed archives.
468 * We assume these headers are not very large (the memory copy we use is
488 * only move what we have space for in wr_rdbuf()
518 * loop until we fill the buffer with the requested number of bytes in rd_wrbuf()
524 * read error, return what we got (or the error if in rd_wrbuf()
550 * we add zero filled padding as it makes flawed archives much easier to
580 * fill write buffer with the contents of a file. We are passed an open
582 * file we are storing. The variable "left" is modified to contain the
583 * number of bytes of the file we were NOT able to write to the archive.
584 * it is important that we always write EXACTLY the number of bytes that
587 * we just detect this case and warn the user. We never create a bad
588 * archive if we can avoid it. Of course trying to archive files that are
589 * active is asking for trouble. It we fail, we pass back how much we
639 * extract the contents of a file from the archive. If we are unable to
640 * extract the entire file (due to failure to write the file) we return
641 * the numbers of bytes we did NOT process. This way the caller knows how
643 * was due to an archive read, we will catch that when we try to skip. If
644 * the format supplies a file data crc value, we calculate the actual crc
647 * We call a special function to write the file. This function attempts to
653 * 0 ok, -1 if archive read failure. if we cannot write the entire file,
654 * we return a 0 but "left" is set to be the amount unwritten
683 * Copy the archive to the file the number of bytes specified. We have in rd_wrfile()
684 * to assume that we want to recover file holes as none of the archive in rd_wrfile()
690 * if we get a read error, we do not want to skip, as we may in rd_wrfile()
691 * miss a header, so we do not set left, but if we get a write in rd_wrfile()
692 * error, we do want to skip over the unprocessed data. in rd_wrfile()
715 * if the last block has a file hole (all zero), we must make sure this in rd_wrfile()
716 * gets updated in the file. We force the last block of zeros to be in rd_wrfile()
724 * if we failed from archive read, we do not want to skip in rd_wrfile()
730 * some formats record a crc on file data. If so, then we compare the in rd_wrfile()
741 * just as in rd_wrfile() we use a special write function to write the
742 * destination file so we can properly copy files with holes.
759 * check for holes in the source file. If none, we will use regular in cp_file()
807 * if the last block has a file hole (all zero), we must make sure this in cp_file()
808 * gets updated in the file. We force the last block of zeros to be in cp_file()
819 * fill the read buffer with the next record (or what we can get) from
838 * opened and we try again. in buf_fill()
849 * but in case we have not determined yet the format, in buf_fill()
850 * this means that we have a very short file, so we in buf_fill()
867 * force the write buffer to the archive. We are passed the number of
868 * bytes in the buffer at the point of the flush. When we change archives
882 * if we have reached the user specified byte count for each archive in buf_flush()
884 * NOTE: If the wrlimit is smaller than wrcnt, we will always write in buf_flush()
885 * at least one record. We always round limit UP to next blocksize. in buf_flush()
898 * write blocksize. if so we figure out if we need to write in buf_flush()
901 * bytes in the buffer, (the blocksize, at the point we were in buf_flush()
913 * We have enough data to write at least one archive block in buf_flush()
927 /* we have extra data to push to the front. in buf_flush()
929 * so we loop back to write again in buf_flush()
942 * Oh drat we got a partial write! in buf_flush()
944 * we warned the user in ar_write().... but this means in buf_flush()
967 * size. if so, figure out if we have too much or too little in buf_flush()
978 * write failed, stop pax. we must not create a bad archive! in buf_flush()