main.c (21413) | main.c (22192) |
---|---|
1/*- 2 * Copyright (c) 1980, 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 154 unchanged lines hidden (view full) --- 163 lastlevel = '?'; 164 argc--; 165 argv++; 166 break; 167 168 case 'b': /* blocks per tape write */ 169 ntrec = numarg('b', "number of blocks per write", 170 1L, 1000L, &argc, &argv); | 1/*- 2 * Copyright (c) 1980, 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 154 unchanged lines hidden (view full) --- 163 lastlevel = '?'; 164 argc--; 165 argv++; 166 break; 167 168 case 'b': /* blocks per tape write */ 169 ntrec = numarg('b', "number of blocks per write", 170 1L, 1000L, &argc, &argv); |
171 /* XXX restore is unable to restore dumps that 172 were created with a blocksize larger than 32K. 173 Possibly a bug in the scsi tape driver. */ 174 if ( ntrec > 32 ) { 175 msg("please choose a blocksize <= 32\n"); | 171 /* 172 * XXX 173 * physio(9) currently slices all requests to 174 * 64 KB chunks. So now, if somebody entered 175 * e.g. 96 KB block size here, he would effectively 176 * yield one 64 KB and one 32 KB block, which 177 * restore cannot handle. 178 * Thus we currently enforce pyhsio(9)'s limit 179 * here, too. 180 */ 181 if ( ntrec > 64 ) { 182 msg("please choose a blocksize <= 64\n"); |
176 exit(X_ABORT); 177 } 178 break; 179 180 case 'B': /* blocks per output file */ 181 blocksperfile = numarg('B', "number of blocks per file", 182 1L, 0L, &argc, &argv); 183 break; 184 185 case 'c': /* Tape is cart. not 9-track */ 186 cartridge = 1; 187 break; 188 | 183 exit(X_ABORT); 184 } 185 break; 186 187 case 'B': /* blocks per output file */ 188 blocksperfile = numarg('B', "number of blocks per file", 189 1L, 0L, &argc, &argv); 190 break; 191 192 case 'c': /* Tape is cart. not 9-track */ 193 cartridge = 1; 194 break; 195 |
196 case 'a': /* `auto-size', Write to EOM. */ 197 unlimited = 1; 198 break; 199 |
|
189 /* dump level */ 190 case '0': case '1': case '2': case '3': case '4': 191 case '5': case '6': case '7': case '8': case '9': 192 level = *cp; 193 break; 194 195 case 'u': /* update /etc/dumpdates */ 196 uflag = 1; --- 33 unchanged lines hidden (view full) --- 230 } 231 if (strcmp(tape, "-") == 0) { 232 pipeout++; 233 tape = "standard output"; 234 } 235 236 if (blocksperfile) 237 blocksperfile = blocksperfile / ntrec * ntrec; /* round down */ | 200 /* dump level */ 201 case '0': case '1': case '2': case '3': case '4': 202 case '5': case '6': case '7': case '8': case '9': 203 level = *cp; 204 break; 205 206 case 'u': /* update /etc/dumpdates */ 207 uflag = 1; --- 33 unchanged lines hidden (view full) --- 241 } 242 if (strcmp(tape, "-") == 0) { 243 pipeout++; 244 tape = "standard output"; 245 } 246 247 if (blocksperfile) 248 blocksperfile = blocksperfile / ntrec * ntrec; /* round down */ |
238 else { | 249 else if (!unlimited) { |
239 /* 240 * Determine how to default tape size and density 241 * 242 * density tape size 243 * 9-track 1600 bpi (160 bytes/.1") 2300 ft. 244 * 9-track 6250 bpi (625 bytes/.1") 2300 ft. 245 * cartridge 8000 bpi (100 bytes/.1") 1700 ft. 246 * (450*4 - slop) --- 109 unchanged lines hidden (view full) --- 356 msg("mapping (Pass I) [regular files]\n"); 357 anydirskipped = mapfiles(maxino, &tapesize); 358 359 msg("mapping (Pass II) [directories]\n"); 360 while (anydirskipped) { 361 anydirskipped = mapdirs(maxino, &tapesize); 362 } 363 | 250 /* 251 * Determine how to default tape size and density 252 * 253 * density tape size 254 * 9-track 1600 bpi (160 bytes/.1") 2300 ft. 255 * 9-track 6250 bpi (625 bytes/.1") 2300 ft. 256 * cartridge 8000 bpi (100 bytes/.1") 1700 ft. 257 * (450*4 - slop) --- 109 unchanged lines hidden (view full) --- 367 msg("mapping (Pass I) [regular files]\n"); 368 anydirskipped = mapfiles(maxino, &tapesize); 369 370 msg("mapping (Pass II) [directories]\n"); 371 while (anydirskipped) { 372 anydirskipped = mapdirs(maxino, &tapesize); 373 } 374 |
364 if (pipeout) { | 375 if (pipeout || unlimited) { |
365 tapesize += 10; /* 10 trailer blocks */ 366 msg("estimated %ld tape blocks.\n", tapesize); 367 } else { 368 double fetapes; 369 370 if (blocksperfile) 371 fetapes = (double) tapesize / blocksperfile; 372 else if (cartridge) { --- 214 unchanged lines hidden --- | 376 tapesize += 10; /* 10 trailer blocks */ 377 msg("estimated %ld tape blocks.\n", tapesize); 378 } else { 379 double fetapes; 380 381 if (blocksperfile) 382 fetapes = (double) tapesize / blocksperfile; 383 else if (cartridge) { --- 214 unchanged lines hidden --- |