Lines Matching full:we
87 * does not specify a blocksize, we use the format default blocksize. in wr_start()
88 * We must be picky on writes, so we do not allow the user to create an in wr_start()
89 * archive that might be hard to read elsewhere. If all ok, we then in wr_start()
111 * we only allow wrblksz to be used with all archive operations in wr_start()
133 * leave space for the header pushback (see get_arc()). If we are in rd_start()
184 * position of the tape head) and the write point within the data we have
185 * stored in the read (soon to become write) buffer. We may have to move
190 * We first calculate which record has the first byte of the trailer. We
192 * up. We set the buffer write pointer to be at this byte (the byte where
193 * the trailer starts). We then move the OS file pointer back to the
218 * in the last archive volume read. (If a is set we still use rdblksz in appnd_start()
233 * Calculate bytes to move back and move in front of record where we in appnd_start()
234 * need to start writing from. Remember we have to add in any padding in appnd_start()
235 * that might be in the buffer after the trailer in the last block. We in appnd_start()
245 * We may have gone too far if there is valid data in the block we are in appnd_start()
252 * to be real physical blocksize so we must loop until we get in appnd_start()
254 * determination of the physical block size, we will fail. in appnd_start()
279 * At this point we are ready to write. If the device requires special in appnd_start()
281 * that is handled in ar_set_wr(). From now on we operate under normal in appnd_start()
297 * try to reset the device (if possible) so we can continue to read. Keep
298 * trying to do this until we get a valid read, or we reach the limit on
299 * consecutive read faults (at which point we give up). The user can
312 * if the user says bail out on first fault, we are out of here... in rd_sync()
345 * bad media and try again. if media is badly damaged, we ask in rd_sync()
347 * volume. remember the goal on reads is to get the most we in rd_sync()
365 * buffer. This is required as we cannot be sure that the header does NOT
366 * overlap a block boundary (as in the case we are trying to recover a
396 * consume what data we have in the buffer. If we have to move forward in rd_skip()
397 * whole records, we call the low level skip function to see if we can in rd_skip()
398 * move within the archive without doing the expensive reads on data we in rd_skip()
414 * We have to read more, calculate complete and partial record reads in rd_skip()
415 * based on rdblksz. we skip over "cnt" complete records in rd_skip()
421 * if the skip fails, we will have to resync. ar_fow will tell us in rd_skip()
422 * how much it can skip over. We will have to read the rest. in rd_skip()
430 * what is left we have to read (which may be the whole thing if in rd_skip()
436 * if the read fails, we will have to resync in rd_skip()
451 * flush out any data (and pad if required) the last block. We always pad
452 * with zero (even though we do not have to). Padding with 0 makes it a
470 * by format specific write routines to pass a file header). On failure we
471 * punt. We do not allow the user to continue to write flawed archives.
472 * We assume these headers are not very large (the memory copy we use is
492 * only move what we have space for in wr_rdbuf()
522 * loop until we fill the buffer with the requested number of bytes in rd_wrbuf()
528 * read error, return what we got (or the error if in rd_wrbuf()
554 * we add zero filled padding as it makes flawed archives much easier to
584 * fill write buffer with the contents of a file. We are passed an open
586 * file we are storing. The variable "left" is modified to contain the
587 * number of bytes of the file we were NOT able to write to the archive.
588 * it is important that we always write EXACTLY the number of bytes that
591 * we just detect this case and warn the user. We never create a bad
592 * archive if we can avoid it. Of course trying to archive files that are
593 * active is asking for trouble. It we fail, we pass back how much we
643 * extract the contents of a file from the archive. If we are unable to
644 * extract the entire file (due to failure to write the file) we return
645 * the numbers of bytes we did NOT process. This way the caller knows how
647 * was due to an archive read, we will catch that when we try to skip. If
648 * the format supplies a file data crc value, we calculate the actual crc
651 * We call a special function to write the file. This function attempts to
657 * 0 ok, -1 if archive read failure. if we cannot write the entire file,
658 * we return a 0 but "left" is set to be the amount unwritten
689 * Copy the archive to the file the number of bytes specified. We have in rd_wrfile()
690 * to assume that we want to recover file holes as none of the archive in rd_wrfile()
696 * if we get a read error, we do not want to skip, as we may in rd_wrfile()
697 * miss a header, so we do not set left, but if we get a write in rd_wrfile()
698 * error, we do want to skip over the unprocessed data. in rd_wrfile()
721 * if the last block has a file hole (all zero), we must make sure this in rd_wrfile()
722 * gets updated in the file. We force the last block of zeros to be in rd_wrfile()
730 * if we failed from archive read, we do not want to skip in rd_wrfile()
736 * some formats record a crc on file data. If so, then we compare the in rd_wrfile()
747 * just as in rd_wrfile() we use a special write function to write the
748 * destination file so we can properly copy files with holes.
765 * check for holes in the source file. If none, we will use regular in cp_file()
813 * if the last block has a file hole (all zero), we must make sure this in cp_file()
814 * gets updated in the file. We force the last block of zeros to be in cp_file()
824 * fill the read buffer with the next record (or what we can get) from
843 * opened and we try again. in buf_fill()
854 * but in case we have not determined yet the format, in buf_fill()
855 * this means that we have a very short file, so we in buf_fill()
872 * force the write buffer to the archive. We are passed the number of
873 * bytes in the buffer at the point of the flush. When we change archives
887 * if we have reached the user specified byte count for each archive in buf_flush()
889 * NOTE: If the wrlimit is smaller than wrcnt, we will always write in buf_flush()
890 * at least one record. We always round limit UP to next blocksize. in buf_flush()
903 * write blocksize. if so we figure out if we need to write in buf_flush()
906 * bytes in the buffer, (the blocksize, at the point we were in buf_flush()
918 * We have enough data to write at least one archive block in buf_flush()
932 /* we have extra data to push to the front. in buf_flush()
934 * so we loop back to write again in buf_flush()
947 * Oh drat we got a partial write! in buf_flush()
949 * we warned the user in ar_write().... but this means in buf_flush()
972 * size. if so, figure out if we have too much or too little in buf_flush()
983 * write failed, stop pax. we must not create a bad archive! in buf_flush()