diff options
author | joerg <joerg@FreeBSD.org> | 1997-02-01 23:44:19 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1997-02-01 23:44:19 +0000 |
commit | 2b3e3d73631a489bffa4a50c304657e955ecca99 (patch) | |
tree | dc76471edeb31d300aec417640c523cda78aa232 /sbin/dump/main.c | |
parent | b0c88e4d210ce20c6d868495b891852c3939afa6 (diff) | |
download | FreeBSD-src-2b3e3d73631a489bffa4a50c304657e955ecca99.zip FreeBSD-src-2b3e3d73631a489bffa4a50c304657e955ecca99.tar.gz |
Add the `a' option (``auto-size'') to bypass all tape length
considerations, and dump right to the end of medium.
Diffstat (limited to 'sbin/dump/main.c')
-rw-r--r-- | sbin/dump/main.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/sbin/dump/main.c b/sbin/dump/main.c index 62d1caf..e100f27 100644 --- a/sbin/dump/main.c +++ b/sbin/dump/main.c @@ -168,11 +168,18 @@ main(argc, argv) case 'b': /* blocks per tape write */ ntrec = numarg('b', "number of blocks per write", 1L, 1000L, &argc, &argv); - /* XXX restore is unable to restore dumps that - were created with a blocksize larger than 32K. - Possibly a bug in the scsi tape driver. */ - if ( ntrec > 32 ) { - msg("please choose a blocksize <= 32\n"); + /* + * XXX + * physio(9) currently slices all requests to + * 64 KB chunks. So now, if somebody entered + * e.g. 96 KB block size here, he would effectively + * yield one 64 KB and one 32 KB block, which + * restore cannot handle. + * Thus we currently enforce pyhsio(9)'s limit + * here, too. + */ + if ( ntrec > 64 ) { + msg("please choose a blocksize <= 64\n"); exit(X_ABORT); } break; @@ -186,6 +193,10 @@ main(argc, argv) cartridge = 1; break; + case 'a': /* `auto-size', Write to EOM. */ + unlimited = 1; + break; + /* dump level */ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': @@ -235,7 +246,7 @@ main(argc, argv) if (blocksperfile) blocksperfile = blocksperfile / ntrec * ntrec; /* round down */ - else { + else if (!unlimited) { /* * Determine how to default tape size and density * @@ -361,7 +372,7 @@ main(argc, argv) anydirskipped = mapdirs(maxino, &tapesize); } - if (pipeout) { + if (pipeout || unlimited) { tapesize += 10; /* 10 trailer blocks */ msg("estimated %ld tape blocks.\n", tapesize); } else { |