From 4f4eee3d2e237c2f0becd9c5ce41524f8f5bc1c1 Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Fri, 10 Nov 2000 13:22:10 +0000 Subject: [PATCH] Dump EOM detection is now a default. --- CHANGES | 7 ++++++- dump/dump.8.in | 42 ++++++++++++++++++++---------------------- dump/main.c | 7 ++++++- 3 files changed, 32 insertions(+), 24 deletions(-) diff --git a/CHANGES b/CHANGES index 8e4d9fb..60a14c4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.87 2000/11/10 11:48:31 stelian Exp $ +$Id: CHANGES,v 1.88 2000/11/10 13:22:10 stelian Exp $ Changes between versions 0.4b19 and 0.4b20 (released ???????????????) ===================================================================== @@ -46,6 +46,11 @@ Changes between versions 0.4b19 and 0.4b20 (released ???????????????) the list in the same order as in fstab file. Thanks to Andreas Dilger for the patch. +10. Made dump's -a (automatic end of tape detection) the + default. Specifying one of -B, -c, -d or -s options will + override the EOM detection. Thanks to Andreas Dilger + for the patch. + Changes between versions 0.4b18 and 0.4b19 (released August 20, 2000) ===================================================================== diff --git a/dump/dump.8.in b/dump/dump.8.in index f81cffb..38ba084 100644 --- a/dump/dump.8.in +++ b/dump/dump.8.in @@ -30,7 +30,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dump.8.in,v 1.17 2000/11/10 11:48:31 stelian Exp $ +.\" $Id: dump.8.in,v 1.18 2000/11/10 13:22:10 stelian Exp $ .\" .Dd __DATE__ .Dt DUMP 8 @@ -73,16 +73,12 @@ option below for doing remote backups). A dump that is larger than the output medium is broken into multiple volumes. On most media the size is determined by writing until an -end-of-media indication is returned. This can be enforced -by using the -.Fl a -option. +end-of-media indication is returned. .Pp On media that cannot reliably return an end-of-media indication -(such as some cartridge tape drives), -each volume is of a fixed size; -the actual size is determined by the tape size, density and/or -block count options below. +(such as some cartridge tape drives), each volume is of a fixed size; +the actual size is determined by specifying cartridge media, or via the +tape size, density and/or block count options below. By default, the same output file name is used for each volume after prompting the operator to change media. .Pp @@ -116,16 +112,16 @@ last dump of a lower level. The default level is 9. .It Fl B Ar records The number of 1 KB blocks per volume. -This option overrides the calculation of tape size -based on length and density. +This option overrides the end-of-media detection, and calculation +of tape size based on length and density. .It Fl a .Dq auto-size . -Bypass all tape length considerations, and enforce writing -until an end-of-media indication is returned. This fits best -for most modern tape drives. Use of this option is particularly -recommended when appending to an existing tape, or using a tape -drive with hardware compression (where you can never be sure about -the compression ratio). +Bypass all tape length calculations, and write +until an end-of-media indication is returned. This works best +for most modern tape drives, and is the default. +Use of this option is particularly recommended when appending to an +existing tape, or using a tape drive with hardware compression +(where you can never be sure about the compression ratio). .It Fl b Ar blocksize The number of kilobytes per dump record. Since the IO system slices all requests into chunks of MAXBSIZE @@ -138,7 +134,8 @@ will constrain writes to MAXBSIZE. The default blocksize is 10. .It Fl c Change the defaults for use with a cartridge tape drive, with a density -of 8000 bpi, and a length of 1700 feet. +of 8000 bpi, and a length of 1700 feet. Specifying a cartridge drive +overrides the end-of-media detection. .It Fl e Ar inode Exclude .Ar inode @@ -158,7 +155,8 @@ but full backups retain them. .It Fl d Ar density Set tape density to .Ar density . -The default is 1600BPI. +The default is 1600BPI. Specifying a tape density overrides the +end-of-media detection. .It Fl f Ar file Write the backup to .Ar file ; @@ -241,13 +239,13 @@ notify all operators in the group by means similar to a .Xr wall 1 . .It Fl s Ar feet -Attempt to calculate the amount of tape needed -at a particular density. +Attempt to calculate the amount of tape needed at a particular density. If this amount is exceeded, .Nm prompts for a new tape. It is recommended to be a bit conservative on this option. -The default tape length is 2300 feet. +The default tape length is 2300 feet. Specifying the tape size +overrides end-of-media detection. .ne 1i .It Fl S Size estimate. Determine the amount of space diff --git a/dump/main.c b/dump/main.c index 6bf9a53..61afed8 100644 --- a/dump/main.c +++ b/dump/main.c @@ -40,7 +40,7 @@ #ifndef lint static const char rcsid[] = - "$Id: main.c,v 1.26 2000/09/26 12:34:52 stelian Exp $"; + "$Id: main.c,v 1.27 2000/11/10 13:22:10 stelian Exp $"; #endif /* not lint */ #include @@ -143,6 +143,7 @@ main(int argc, char *argv[]) #endif tsize = 0; /* Default later, based on 'c' option for cart tapes */ + unlimited = 1; eot_script = NULL; if ((tapeprefix = getenv("TAPE")) == NULL) tapeprefix = _PATH_DEFTAPE; @@ -175,6 +176,7 @@ main(int argc, char *argv[]) break; case 'B': /* blocks per output file */ + unlimited = 0; blocksperfile = numarg("number of blocks per file", 1L, 0L); break; @@ -191,10 +193,12 @@ main(int argc, char *argv[]) break; case 'c': /* Tape is cart. not 9-track */ + unlimited = 0; cartridge = 1; break; case 'd': /* density, in bits per inch */ + unlimited = 0; density = numarg("density", 10L, 327670L) / 10; if (density >= 625 && !bflag) ntrec = HIGHDENSITYTREC; @@ -259,6 +263,7 @@ main(int argc, char *argv[]) break; case 's': /* tape size, feet */ + unlimited = 0; tsize = numarg("tape size", 1L, 0L) * 12 * 10; break; -- 2.39.2