Lines Matching full:we
74 static int can_unlnk = 0; /* do we unlink null archives? */
78 int force_one_volume; /* 1 if we ignore volume changes */
88 * Note: we may be called with name == NULL on the first open only.
183 * make sure beyond any doubt that we can unlink only regular files in ar_open()
184 * we created in ar_open()
189 * if we are writing, we are done in ar_open()
199 * On all new archive volumes, we shift to wrblksz (if the user in ar_open()
200 * specified one, otherwise we will continue to use rdblksz). We in ar_open()
210 * that support variable sized records, we must make large in ar_open()
211 * reads to make sure we get the entire record, otherwise we in ar_open()
212 * will just get the first part of the record (up to size we in ar_open()
214 * multiple records in a single read. We really do not care in ar_open()
215 * what the physical record size is UNLESS we are going to in ar_open()
216 * append. (We will need the physical block size to rewrite in ar_open()
217 * the trailer). Only when we are appending do we go to the in ar_open()
228 * block size, we use that to read. Under append, we must in ar_open()
229 * always keep blksz == rdblksz. Otherwise we go ahead and use in ar_open()
244 * For performance go for large reads when we can without harm in ar_open()
254 * we must always keep blksz == rdblksz in ar_open()
261 * See if we can find the blocking factor from the file size in ar_open()
267 * When we cannot find a match, we may have a flawed archive. in ar_open()
272 * for performance go for large reads when we can in ar_open()
293 * If in_sig is set we're in a signal handler and can't flush stdio.
308 * Close archive file. This may take a LONG while on tapes (we may be in ar_close()
320 * if nothing was written to the archive (and we created it), we remove in ar_close()
362 * and we have already determined the archive format. in ar_close()
381 * If we have not determined the format yet, we just say how many bytes in ar_close()
382 * we have skipped over looking for a header to id. there is no way we in ar_close()
418 * we only drain from a pipe/socket. Other devices can be closed in ar_drain()
419 * without reading up to end of file. We sure hope that pipe is closed in ar_drain()
420 * on the other side so we will get an EOF. in ar_drain()
437 * For all archive devices we are already positioned at the place we want
449 * we must make sure the trailer is rewritten on append, ar_next() in ar_set_wr()
460 * Ok we have an archive in a regular file. If we were rewriting a in ar_set_wr()
461 * file, we must get rid of all the stuff after the current offset in ar_set_wr()
474 * check if the last volume in the archive allows appends. We cannot check
475 * this until we are ready to write since there is no spec that says all
478 * 0 if we can append, -1 otherwise.
499 * supplied buffer. When dealing with tapes we may not always be able to
500 * read what we want.
517 * how we read must be based on device type in ar_read()
524 * sized records so we leave blksz == MAXBLK. The in ar_read()
533 * any record after the first, we probably have in ar_read()
535 * (we are getting multiple records in a single in ar_read()
554 * be trusted at all. So when we are dealing with character in ar_read()
555 * devices and pipes we just take what they have ready for us in ar_read()
567 * We are in trouble at this point, something is broken... in ar_read()
607 * write broke, see what we can do with it. We try to send any partial in ar_write()
650 * see if we reached the end of media, if so force a change to in ar_write()
659 * we cannot fix errors to these devices in ar_write()
666 * if this is a block aligned archive format, we may have a bad archive in ar_write()
668 * we can deal with the mis-aligned data, it violates spec and other in ar_write()
679 * If we were trying to rewrite the trailer and it didn't work, we in ar_write()
717 * we need to go to the next volume not try a resync in ar_rdsync()
732 * if the last i/o was a successful data transfer, we assume in ar_rdsync()
733 * the fault is just a bad record on the tape that we are now in ar_rdsync()
734 * past. If we did not get any data since the last resync try in ar_rdsync()
785 * bytes as supported by the device. If we cannot move the requested
803 * we cannot move forward at EOF or error in ar_fow()
810 * the media without reading to it. With tapes we cannot be sure of the in ar_fow()
811 * number of physical blocks to skip (we do not know physical block in ar_fow()
812 * size at this point), so we must only read forward on tapes! in ar_fow()
818 * figure out where we are in the archive in ar_fow()
822 * we can be asked to move farther than there are bytes in this in ar_fow()
843 * count as supported by the device. With tapes drives we RESET rdblksz to
845 * NOTE: We should only be called to move backwards so we can rewrite the
859 * make sure we do not have try to reverse on a flawed archive in ar_rev()
883 * high probability of failure as we really do not know the in ar_rev()
884 * true attributes of the device we are talking to (the device in ar_rev()
886 * First we figure out where we are in the archive. in ar_rev()
896 * we may try to go backwards past the start when the archive in ar_rev()
897 * is only a single record. If this happens and we are on a in ar_rev()
898 * multi-volume archive, we need to go to the end of the in ar_rev()
923 * tape size, we cannot do the move (this should never happen). in ar_rev()
924 * (We also cannot handle trailers spread over two vols.) in ar_rev()
925 * get_phys() also makes sure we are in front of the filemark. in ar_rev()
939 * if no movement is required, just return (we must be after in ar_rev()
946 * ok we have to move. Make sure the tape drive can do it. in ar_rev()
974 * Determine the physical block size on a tape drive. We need the physical
975 * block size so we know how many bytes we skip over when we move with
976 * mtio commands. We also make sure we are BEFORE THE TAPE FILEMARK when
998 * we know we are at file mark when we get back a 0 from in get_phys()
1010 * move backwards over the file mark so we are at the end of the in get_phys()
1021 * move backwards so we are in front of the last record and read it to in get_phys()
1053 * set lstrval so we know that the filemark has not been seen in get_phys()
1064 * make sure we can move backwards over the padding. (this should in get_phys()
1074 * we were first called (if required). in get_phys()
1089 * we may allow the media to be changed. Otherwise a new archive is
1091 * read on tty input, we must quit pax.
1104 * WE MUST CLOSE THE DEVICE. A lot of devices must see last close, (so in ar_next()
1106 * also be called via a signal handler, so we must prevent a race. in ar_next()
1120 * if i/o is on stdin or stdout, we cannot reopen it (we do not know in ar_next()
1164 * we are to continue with the same device in ar_next()