dvdtape-1.6/0040755000113000000000000000000007321514343012000 5ustar adamsystemdvdtape-1.6/dvdtape.lsm0100644000113000000000000000102607160027505014140 0ustar adamsystemBegin4 Title: dvdtape Version: 1.4 Entered-date: 2000-09-13 Description: Generates DLT tapes for mastering DVD's Keywords: dvd dvd-rom dlt tape Author: adam@yggdrasil.com (Adam J. Richter) Maintained-by: adam@yggdrasil.com (Adam J. Richter) Primary-site: ftp.yggdrasil.com /pub/dist/device_control 18kB dvdtape-1.4.tar.gz Alternate-site: metalab.unc.edu /pub/Linux/utils/disk-management 18kB dvdtape-1.4.tar.gz Original-site: Platforms: Requires DLT tape drive Copying-policy: GPL End dvdtape-1.6/dvdtape.c0100644000113000000000000004712507321513560013601 0ustar adamsystem/* dvdtape: A program for generating master images of Digital Versatile Discs (DVD) to Digital Linear Tapes (DLT), including Disc Desciption Protocol information. Copyright 1999, 2000 Yggdrasil Computing, Incorporated Written by Adam J. Richter (adam@yggdrasil.com) This program may be freely redistributed under the terms and conditions of version 2 of the GNU General Public License, as published by the Free Software Foundations (Cambridge, MA, USA). A copy of these terms and conditions is in the file "COPYING", which you should have received along with this file. */ #define _FILE_OFFSET_BITS 64 #include "config.h" #include #include #include #include #include #include #include #include #include #ifdef HAVE_SYS_MTIO_H # include #endif #define _GNU_SOURCE #include #define TAPE_BLOCK_SIZE 32768ULL /* This is NOT a tunable paramter */ #define DEFAULT_CONTROL_SIZE 32768 #define DVD_SINGLE_SIZE (143432ULL * TAPE_BLOCK_SIZE) /* 4,699,979,776 bytes */ #define DVD_LAYER1_SIZE (130310ULL * TAPE_BLOCK_SIZE) /* 4,269,998,080 bytes */ /* A daul layer DVD has 8,539,996,160 bytes. */ #define DVD_SECTOR_SIZE 2048 #define CONTROL_START 0x2f200 #define IMAGE_START 0x30000 #define CONTROL_FILE "CONTROL.DAT" #define IMAGE_FILE "MAIN.DAT" extern unsigned long long isosize(int infile); static int layer = 0; static int layers = 1; static int layers_specified = 0; static int side = 0; static int sides = 1; static int sides_specified = 0; static unsigned long long offset = 0; static int offset_specified = 0; static unsigned long long combined_length; /* sum of lengths of both layers in 2 layer case */ static int combined_length_specified = 0; static unsigned long long layer_length = 0; static int length_specified = 0; static char *owner = ""; static char *usertext = ""; static char *input_filename = NULL; static char *control_filename = NULL; static char *control_output_filename = NULL; static char *output_filename = "/dev/st0"; static char time_string[7]; static char track_path; /* Direction of translation for second layer. I = inward, parallel to first layer. O = outward, opposite of first layer. */ static int track_path_specified = 0; static char diameter = 'B'; /* "A" = 8cm, "B" = 12cm. */ int readout_speed = 2; /* Minimum readout speed. Used only in the control file. 2 = 2,520,000 bits/second 5 = 5,040,000 bits/second 10 = 10,080,000 bits/second */ char master_id[49] = "\0"; #define need_control (layer == 0 || track_path == 'I') static struct option options[] = { {"combined-length", required_argument, NULL, 'C'}, {"controlfile", required_argument, NULL, 'c'}, /* for control data */ {"controlfile-output", required_argument, NULL, 'N'}, {"diameter", required_argument, NULL, 'd'}, {"inputfile", required_argument, NULL, 'i'}, {"layer", required_argument, NULL, 'l'}, {"layers", required_argument, NULL, 'L'}, {"length", required_argument, NULL, 'b'}, {"master-id", required_argument, NULL, 'm'}, {"offset", required_argument, NULL, 'o'}, {"outputfile", required_argument, NULL, 'f'}, {"owner", required_argument, NULL, 'O'}, {"readout-speed", required_argument, NULL, 'r'}, {"side", required_argument, NULL, 's'}, {"sides", required_argument, NULL, 'S'}, {"track-path", required_argument, NULL, 't'}, {"usertext", required_argument, NULL, 'u'}, {0, 0, NULL, 0} }; static void usage(void) { int i; fprintf (stderr, "Usage: dvdtape [options]\n" "Options:\n"); for (i = 0; options[i].name != NULL; i++) { fprintf(stderr, "\t--%s", options[i].name); switch (options[i].has_arg) { case no_argument: fprintf(stderr, "\n"); break; case required_argument: fprintf(stderr, "=%s\n", options[i].name); break; case optional_argument: fprintf(stderr, "[=%s]\n", options[i].name); break; } } exit(1); } static void parse_options (int argc, char **argv) { int opt; while ((opt = getopt_long(argc, argv, "l:L:s:S:o:O:u:l:", options, NULL)) != -1) { switch (opt) { case 'C': if (sscanf(optarg,"%Ld",&combined_length)!=1) { fprintf (stderr, "%s: not an integer\n", optarg); exit(1); } combined_length_specified = 1; break; case 'c': control_filename = optarg; break; case 'd': if (strcmp(optarg, "8cm") == 0) diameter = 'A'; else if (strcmp(optarg, "12cm") == 0) diameter = 'B'; else { fprintf (stderr, "Disc diameter must be \"8cm\" or \"12cm\".\n"); exit(1); } break; case 'l': layer = atoi(optarg); break; case 'L': layers = atoi(optarg); layers_specified = 1; break; case 'm': strncpy(master_id,optarg,sizeof(master_id)-1); master_id[sizeof(master_id)-1] = '\0'; break; case 'N': control_output_filename = optarg; break; case 'o': if (sscanf(optarg, "%Ld", &offset) != 1) { fprintf (stderr, "%s: not an integer\n", optarg); exit(1); } offset_specified = 1; break; case 'O': owner = optarg; break; case 'r': readout_speed = atoi(optarg); if (readout_speed != 2 && readout_speed != 5 && readout_speed != 10) { fprintf (stderr, "Read out speed must be 2, 5 or 10 for 2.52, 5.04, or 10.08 megabits/second.\n"); exit(1); } break; case 's': side = atoi(optarg); break; case 'S': sides = atoi(optarg); sides_specified = 1; break; case 't': if (strcmp(optarg, "opposite") == 0 || strcmp(optarg, "out") == 0 || strcmp(optarg, "outward") == 0) { track_path = 'O'; } else if (strcmp(optarg, "parallel") == 0 || strcmp(optarg, "in") == 0 || strcmp(optarg, "inward") == 0) { track_path = 'I'; } else { fprintf (stderr, "Track path must be one of opposite, out, outward (which are synonymous)\n" "or parallel, in or inward (which are synonymous).\n"); exit(1); } track_path_specified = 1; break; case 'u': usertext = optarg; break; case 'b': if (sscanf(optarg, "%Ld", &layer_length) != 1) { fprintf (stderr, "%s: not an integer\n", optarg); exit(1); } length_specified = 1; break; case 'i': input_filename = optarg; break; case 'f': output_filename = optarg; break; case '?': fprintf (stderr, "Unknown option.\n"); usage(); /*NOTREACHED*/ case ':': fprintf (stderr, "Missing option.\n"); usage(); /*NOTREACHED*/ } } } static void check_options(void) { int must_abort = 0; if (side == 0 && layer == 0 && offset != 0) { fprintf (stderr, "Warning: You have specified a nonzero input offset, even though you are making the first layer of the first side.\n"); } if (!sides_specified) sides = side+1; if (!layers_specified) layers = layer+1; if (sides > 2) { fprintf (stderr, "Disc cannot have more than two sides.\n"); must_abort = 1; } if (layers > 2) { fprintf (stderr, "Disc cannot have more than two layers.\n"); must_abort = 1; } if (side >= sides) { fprintf(stderr, "Side number (%d) is greater than or equal to" "number of sides(%d).\n", side, sides); must_abort = 1; } if (layer >= layers) { fprintf(stderr, "Layer number (%d) is greater than or equal to" "number of layers(%d).\n", layer, layers); must_abort = 1; } if (!input_filename) { fprintf(stderr, "Input file name not specified.\n"); must_abort = 1; } if (must_abort) { usage(); } } static void full_read(int infd, char *buf, int len) { while (len > 0) { int this_len = read(infd, buf, len); if (this_len < 0) { if (errno == EINTR) continue; else { perror("read"); exit(1); } } if (this_len == 0) { fprintf (stderr, "Premature end of file.\n"); exit(1); } buf += this_len; len -= this_len; } } static void full_write(int outfd, const char *buf, int len) { while (len > 0) { int this_len = write(outfd, buf, len); if (this_len < 0) { if (errno == EINTR) continue; else { perror("write"); exit(1); } } buf += this_len; len -= this_len; } } static void copy_bytes(int outfd, int infd, int blocksize, unsigned long long length) { int blkcount = 0; int nblocks = length / blocksize; while (length > 0) { char buf[blocksize]; if (length >= blocksize) { full_read(infd, buf, blocksize); full_write(outfd, buf, blocksize); length -= blocksize; } else { /* Pad to block size. */ full_read(infd, buf, length); memset(buf+length, 0, blocksize - length); full_write(outfd, buf, blocksize); return; } blkcount++; if (blkcount % 10000 == 0) { printf ("copy_bytes: %d %d byte blocks written (%d%% complete).\n", blkcount, blocksize, blkcount * 100 / nblocks); fflush(stdout); } } } static void write_vol_label(int outfd) { char buf[81]; sprintf(buf, "VOL1" /* Label ID */ "REEL%-2d" /* Reel ID */ " " /* Accessibility */ " " /* reserved (26 bytes) */ "%-14.14s" /* Owner */ " " /* reserved (28 bytes */ "4", /* Label Standard Version ("4" = ANSI label) */ (side*layers)+layer+1, /* Reel ID# */ owner); full_write(outfd, buf, sizeof(buf)-1); } static void write_hdr1(int outfd, char *labelid, char *fileid, int block_count) { char buf[81]; sprintf(buf, "%-4.4s" /* Label ID */ "%-17.17s" /* File ID */ "DVD " /* File set ID, 6 bytes */ "0001" /* File Section Number */ "0001" /* File Sequence Number */ "0001" /* File Generation Number */ "01" /* File Generation Version Number */ "%6.6s" /* Creation date */ "000000" /* Expiration date not specified */ " " /* Accessibility */ "%06d" /* Block count */ " " /* system code, 13 bytes */ " ", /* Reserved, 7 bytes */ labelid, fileid, time_string, block_count); full_write(outfd, buf, sizeof(buf)-1); } static void write_eof_mark(int outfd) { #ifdef HAVE_SYS_MTIO_H struct mtop mtop; mtop.mt_op = MTWEOF; mtop.mt_count = 1; if (ioctl(outfd, MTIOCTOP, &mtop) < 0) { perror ("writing end-of-file mark in tape stream"); } #else fsync(outfd); while (write(outfd, buf, 0) < 0) { if (errno != EINTR) { perror ("writing end-of-file mark in tape stream"); exit(1); } } fsync(outfd); #endif } static void write_hdr2(int outfd, char *labelid, int blocksize, int recordsize) { char buf[81]; sprintf(buf, "%-4.4s" /* Label ID */ "F" /* Record format, "F" = fixed */ "%05d" /* block size */ "%05d" /* record size */ " " /* reserved, 35 bytes */ "00" /* buffer offset length */ " ", /* reserved, 28 bytes */ labelid, blocksize, recordsize ); full_write(outfd, buf, sizeof(buf)-1); write_eof_mark(outfd); } static void write_ddpid(int outfd) { char buf[129]; char txtsize[3]; if (strlen(usertext) == 0) strcpy(txtsize, " "); else sprintf (txtsize, "%02d", strlen(usertext)); sprintf(buf, "DDP 2.00" /* DDP level */ " " /* UPC, reserved, 13 bytes */ " " /* MSS, Map Stream Start, 8 bytes */ " " /* MSL, reserved, 8 bytes */ " " /* Media Number */ "%-48.48s" /* Master ID (user supplied string) */ " " /* BK, reserved */ "DV" /* TYPE, Type of Disc ("DV" = DVD) */ "%01d" /* NSIDE, # of sides on final disc */ "%01d" /* SIDE */ "%01d" /* NLAYER */ "%01d" /* LAYER */ "%c" /* DIR. Direction of translation for second layer. "I" = inner to outer, "O" = outer to inner (opposite path). */ "%c" /* Disc size "B" = 12cm, "A" = 8cm */ "0" /* SSCRST. Security Scrambling Status "0" = No encryption. */ "0" /* SSCRMD. Security Scrambling Mode. "0" = DVD. */ "%s" /* SIZ. Size of user text */ "%-29.29s", /* TXT. User text */ master_id, sides, side, layers, layer, track_path, diameter, txtsize, usertext); full_write(outfd, buf, sizeof(buf)-1); } static void write_ddpms(int outfd, char *streamtype, int start, int len, char *filename) { char buf[129]; sprintf(buf, "VVVM" /* MPV Map Packet Valid */ "%-2.2s" /* DST Data Stream Type "D2" = control "D0" = main DVD */ " " /* DSP Data Stream Pointer, empty for tapes */ "%08d" /* DSL Data Stream Length */ "%08d" /* DSS Data Stream Start */ " " /* SUB Subcode descriptor */ "DV" /* CDM DVD Disc mode. */ "0" /* SSM Source Storage Mode */ "0" /* SCR source materials scrambled */ " " /* PRE1 Reserved. */ " " /* PRE2 Reserved. */ " " /* PST Reserved */ " " /* MED Number for multiple input media */ " " /* TRK Reserved. */ " " /* IDX Reserved. */ " " /* ISRC Reserved */ "017" /* SIZ Size of data stream identifier */ "%-17.17s" /* DSI Data stream identifier ("CONTROL.DAT" or "IMAGE.DAT") */ " " /* NEW Reserved */ " " /* PRE1NXT Reserved */ " " /* PAUSEADD Reserved. */ " " /* OFS Starting offset */ " ", /* PAD Padding, 15 bytes. */ streamtype, len, start, filename); full_write(outfd, buf, sizeof(buf)-1); } static void write_ddp_file(int outfd) { const int num_tape_blocks = (need_control ? 3 : 2); const unsigned long image_blocks = (layer_length + TAPE_BLOCK_SIZE - 1) / TAPE_BLOCK_SIZE; const unsigned long image_sectors = image_blocks * (TAPE_BLOCK_SIZE / DVD_SECTOR_SIZE); unsigned long image_start; write_hdr1(outfd, "HDR1", "DDPID", num_tape_blocks); write_hdr2(outfd, "HDR2", 128, 128); write_ddpid(outfd); if (need_control) { image_start = IMAGE_START; write_ddpms(outfd, "D2", CONTROL_START, 16, CONTROL_FILE); } else { image_start = IMAGE_START + (offset/DVD_SECTOR_SIZE) - 1; } write_ddpms(outfd, "D0", image_start, image_sectors, IMAGE_FILE); write_eof_mark(outfd); /* FIXME: Delete this? The sample tape from Marin Digital had an EOF mark here, but I don't see anything in the standard about it. -Adam Richter 2000.01.09 */ write_hdr1(outfd, "EOF1", "DDPID", num_tape_blocks); write_hdr2(outfd, "EOF2", 128, 128); } static void write_big_endian(unsigned char *out, unsigned long val) { out[0] = val >> 24; out[1] = val >> 16; out[2] = val >> 8; out[3] = val; } static void make_control(unsigned char control[DEFAULT_CONTROL_SIZE]) { unsigned long sectors_this_layer, sectors_other_layer; memset(control, 0, DEFAULT_CONTROL_SIZE); control[0] = 1; switch(readout_speed) { case 5: control[1] = 1; break; case 10: control[1] = 2; break; } if (diameter == 'A') control[1] |= 0x10; control[2] = ((layers-1) << 5) | 1; if (track_path == 'O') control[2] |= 0x10; control[3] = (layers-1) << 4; control[5] = 0x03; sectors_this_layer = IMAGE_START + (layer_length/DVD_SECTOR_SIZE); if (track_path == 'O' && layers > 1) { /* ASSERT(layer==0); */ sectors_other_layer = (combined_length - layer_length)/DVD_SECTOR_SIZE; write_big_endian(control+8, (~sectors_this_layer & 0xFFFFFF) + sectors_other_layer); write_big_endian(control+12, sectors_this_layer - 1); } else { write_big_endian(control+8, sectors_this_layer - 1); } if (control_output_filename != NULL) { int fd; if ((fd = creat(control_output_filename, 0666)) < 0 ) { perror(control_output_filename); } else { full_write(fd, control, DEFAULT_CONTROL_SIZE); close(fd); } } } static void write_control_file(int outfd) { int control_size; int control_fd = -1; char *control; if (control_filename == NULL) { control_size = DEFAULT_CONTROL_SIZE; } else { struct stat statbuf; if (stat(control_filename, &statbuf) < 0 || (control_fd = open(control_filename, O_RDONLY)) < 0) { perror(control_filename); exit(1); } control_size = statbuf.st_size; } /* Returns OK */ write_hdr1(outfd, "HDR1", CONTROL_FILE, 1); /* Gets seg fault */ write_hdr2(outfd, "HDR2", control_size, control_size / 16); control = alloca(control_size); if (control == NULL) { fprintf (stderr, "Could not allocate %d bytes of memory for" "control control data.\n", control_size); exit(1); } if (control_fd >= 0) { full_read(control_fd, control, control_size); } else { make_control(control); } full_write(outfd, control, control_size); if (control_fd >= 0) close(control_fd); write_eof_mark(outfd); /* FIXME: Delete this? The sample tape from Marin Digital had an EOF mark here, but I don't see anything in the standard about it. -Adam Richter 2000.01.09 */ write_hdr1(outfd, "EOF1", CONTROL_FILE, 1); write_hdr2(outfd, "EOF2", control_size, control_size/16); } static void write_dvd_file(int outfd, int infd) { const int blocksize = TAPE_BLOCK_SIZE; const int block_count = (layer_length+blocksize-1)/blocksize; write_hdr1(outfd, "HDR1", IMAGE_FILE, block_count); write_hdr2(outfd, "HDR2", blocksize, 2048); copy_bytes(outfd, infd, blocksize, layer_length); write_eof_mark(outfd); /* FIXME: Delete this? The sample tape from Marin Digital *may have* had an EOF mark here too, but I don't see anything in the standard about it. -Adam Richter 2000.01.09 */ write_hdr1(outfd, "EOF1", IMAGE_FILE, block_count); write_hdr2(outfd, "EOF2", blocksize, 2048); } static void guess_length_and_offset(int infd) { if (!combined_length_specified) { if (layers_specified && layers == 1 && length_specified) combined_length = layer_length; else combined_length = isosize(infd); } if (layer > 0 && !offset_specified) { offset = DVD_LAYER1_SIZE; } if (!length_specified) { layer_length = combined_length - offset; if (layer == 0 && layer_length > DVD_SINGLE_SIZE) layer_length = DVD_LAYER1_SIZE; } if (!layers_specified) { if (combined_length > DVD_SINGLE_SIZE) layers = 2; } if (!track_path_specified) { track_path = ((layers == 1) ? 'I' : 'O'); } } static void init_time(void) { time_t now; struct tm *tm; time(&now); tm = localtime(&now); sprintf (time_string, "%c%02d%03d", tm->tm_year >= 100 ? '0' : ' ', tm->tm_year % 100, tm->tm_yday + 1 /* E.g., Write Jan 1 as day 1, not day 0.*/ ); } int main(int argc, char **argv) { int outfd; int infd; parse_options(argc, argv); check_options(); init_time(); if ((infd = open (input_filename, O_RDONLY, 0644)) < 0) { perror(input_filename); exit(1); } guess_length_and_offset(infd); fprintf (stderr, "Writing %Lu bytes of DVD image starting at offset %Lu (layer %d of %d).\n", layer_length, offset, layer+1, layers); if ((outfd = open (output_filename, O_WRONLY|O_CREAT, 0644)) < 0) { perror(output_filename); exit(1); } /* Even if offset == 0, we must do an lseek here, because we do not know where guess_length_and_offst() left infd's seek pointer. */ if (lseek(infd, (off_t) offset, SEEK_SET) < 0) { perror("llseek"); exit(1); } write_vol_label(outfd); write_ddp_file(outfd); if (need_control) write_control_file(outfd); write_dvd_file(outfd, infd); close(infd); close(outfd); return 0; } /* Format of control data: control[0] = 1 ? control[1] = 0 2.52 Mbps minimum readout speed 1 5.04 Mbps minimum readout speed 2 10.08 Mbps minimum readout speed | 0x00 for 12cm disc | 0x10 for 8cm disc control[2] = 0x01 1 layer 0x21 2 layer | 0x00 for parallel spiral layers | 0x10 for opposite spiral layers control[3] = 0x00 1 layer 0x10 2 layer control[4] = 0 control[5] = 0x03 control[6] = 0 control[7] = 0 For parallel spiral layers: control[8..11] = BIG_ENDIAN(sectors_this_layer + 0x2FFFF) control[12..15] = 0 For opposite spiral layers: control[8..11] = BIG_ENDIAN(0xFCFFFF - layer0_sectors + layer1_sectors) control[12..15] = BIG_ENDIAN(layer0_sectors + 0x2FFFF) */ dvdtape-1.6/dvdtape.10100644000113000000000000001552607115622750013522 0ustar adamsystem.TH DVDTAPE 1 "February 2000" "Yggdrasil DVD Tools" "Yggdrasil" .SH NAME dvdtape \- Write a DLT tape for manufacturing a Digital Versatile Disc. .SH SYNOPSIS .B dvdtape --inputfile=\fIfile\fR [\fIoptions\fR]... .SH DESCRIPTION .PP ." Add any additional description here .PP dvdtape should be used to write directly to a Digital Linear Tape to send to a DVD factory for manufacturing. It writes all of the extra data that the factory needs in just the format that is expected. This includes ANSI tape headers, DDP information, DDPMS information, "lead in", and the DVD data itself. .TP \fB\-\-combined-length=length\fR When producing the first layer of a two layer opposite spiral track DVD, the dvdtape needs to know the combined length of both layers to record the length of the second layer in the leadin area of the first layer (opposite track DVD's only have one leadin area for both tracks). This parameter provides a way to specify that value. If this value is not specified and is needed, it is inferred from the image contents, based on the assumption that the data being written is a "fat" ISO-9660 file system. .TP \fB\-\-controlfile=file\fR The file from which the DVD leadin data should be read. The DVD leadin data is normally 32,768 bytes of data that contains information about the physical layout of the DVD-ROM, such as the number of layers, number of sides, and so on. This information does not appear as data sectors to programs reading the DVD-ROM, but is used internally by the DVD-ROM drive. If this parameter is not specified, dvdtape will attempt to create its own leadin data by a possibly incorrect algorithm written from experiments on a proprietary program that creates leadin data. Note also that leadin deliberately omitted for the second layer of an oppositely oriented dvd track. .TP \fB\-\-diameter=8cm or \-\-diameter=12cm\fR The physical diameter of the disc being made. 12 centimeters is the default. .TP \fB\-\-inputfile=file\fR The file from which the DVD contents should be read. This file usually contains an ISO-9660 or UDF file system. This parameter is mandatory. It has no default value. .TP \fB\-\-layer=0 or \-\-layer=1\fR The layer number being written. The 4.7 gigabyte first layer is layer 0. The optional 3.7 gigabyte second layer is layer 1. Note that you must create a separate physical tape for each layer. (DLT tapes have enough space to hold both layers, but the standard specifies two tapes.) The default is layer=0. .TP \fB\-\-layers=1 or \-\-layers=2\fR The total number of layers that the finished disc will comprise. The tape itself only contains information about one layer, but the total number of layers is stored in the header information on each tape. The default behavior is to guess the number of layers by assuming that the image is a "fat" ISO-9660 file system, determining the file system size, and setting layers=1 if the image will fit on one layer, and layers=2 otherwise. .TP \fB\-\-length=NNNNNNNN\fR The number of bytes to write for this layer of the DVD file system. This data will be padded with nulls to make its size a multiple of 32768 (the required block size for the image section of the tape). If length is not specified, the default is to read the length, based on the assumption that the data is a "fat" ISO-9660 file system. .TP \fB\-\-master\-id=string\fR Set the master ID to the specified string, which can be up to 48 characters in length. This string is a field in the tape header information, which sometimes displayed on the operator's console when the disc is being made. It is useful for identifying tapes at the factor, and apparently has no other purpose. .TP \fB\-\-offset=NNNNNNNN\fR Skip this many bytes before starting to read the DVD image. This is usually used for continuing a file system image on a second layer. The default offset is 0 if layer=0 and 4699979776 (the size of layer 0) if layer=1. .TP \fB\-\-outputfile=tape_device\fR Write the output to tape_device. You can write the output to a plain file, but the size of the tape blocks are 128 bytes in some sections and 32768 bytes in others, so you cannot write a proper tape later by simplying copying that file to a tape device. The default is /dev/st0. .TP \fB\-\-owner=string\fR Fill in the "owner" field in the tape. This option appears to be useful only if you want some specific information to appear before the operator who is running the disc manufacturing equipment. The default is an empty string. .TP \fB\-\-readout-speed=2 or \-\-readout-speed=5 or \-\-readout-speed=10\fR The leadin data contains a parameter that specifies a minimum required readout speed for the DVD-ROM. It can be 2.52, 5.04 or 10.08 megabits per second, which you can select by setting this argument to 2, 5, or 10, respectively. The default is 2.52 megabits per second. As far as this author can tell, there does not appear to be a way in the leadin format to specify no minimum readout speed. This argument is only used when dvdtape generates its own leadin data. .TP \fB\-\-side=0 or \-\-side=1\fR The side number being written. The first side is side 0. Note that you must create a separate physical tape for each side. (DLT tapes have enough space to hold both sides, but the standard is two tapes.) The default value is 0. .TP \fB\-\-sides=1 or \-\-sides=2\fR The total number of sides that the finished disc will comprise. The tape itself only contains information about one side, but the total number of sides is stored in the header information on each tape. The default value is 1. .TP \fB\-\-track-path=directionfR The direction of translation of the second layer in the DVD. This argument should have no effect for a single layer DVD, although it does fill in the corresponding field in the DVD header information. For the standard parallel layer arrangement, direction can be specified by the synonyms "opposite", "out" or "outward". For opposite track arrangment, direction can be "parallel", "in" or "inward". The default is parallel if there is only one layer and opposite if there are two layers. The legality of opposite orientation and only one layer is unclear. .TP \fB\-\-usertext=string\fR Fill in the "user text" field in the tape. This option appears to be useful only if you want some specific information to appear before the operator who is running the disc manufacturing equipment. The default value is an empty string. .SH "EXAMPLES" .TP \fBdvdtape --inputfile=mydvd.iso-image\fR Writes layer 0 to the tape on /dev/st0. .TP \fBdvdtape --inputfile=mydvd.iso-image --side=1\fR Writes layer 1 to the tape on /dev/st0. You only need to do this for an image that is too large to fit on one layer. .SH "COPYRIGHT" Copyright 1999, 2000 Yggdrasil Computing, Inc. dvdtape may be copied under the terms and conditions of version 2 of the GNU General Public License, as published by the Free Software Foundation (Cambridge, MA, USA). .SH "AUTHOR" Written by Adam J. Richter (adam@yggdrasil.com) dvdtape-1.6/ChangeLog0100644000113000000000000001104007321514277013551 0ustar adamsystem2001.07.06 Adam J. Richter (adam@yggdrasil.com), Version 1.5 More pointed out by Brian Somers : another option parsing bug fixed (I think I overlooked this part of Brian's patch previously), and rather than incorporating Brian's change to isosize.c to adjust some include files for FreeBSD, I removed the unneeded references to a number of include files including the one that needed to be adjusted for FreeBSD. 2001.06.24 Adam J. Richter (adam@yggdrasil.com), Version 1.5 Integrate changes proposed by Brian Somers to fix sprintf overruns and an option parsing bug. 2000.09.13 Adam J. Richter (adam@yggdrasil.com), Version 1.4 Corrected Linux Software Map entry. This release is basically just to mark the occasion that dvdtape has now been used to create a real DVD: Linux DVD Archives, Fall 2000 edition. It was a dual layer (DVD-9) with opposite track orientation. 2000.08.02 Adam J. Richter (adam@yggdrasil.com), Version 1.3 For layer 1 (second layer) with an "opposite track path" orientation, the Data Stream Start (DSS) field in the DDPMS section cannot be all spaces. Instead, it must be layer0_main_dss + layer1_main_dsl - 1. Corrected usage of "leadin" and "control". "Leadin" apparently are the blank sectors at the beginning of the DVD (not visibible on a DVD-ROM) and "control" is the 16 sector area that provides some metadata for the DVD drive regarding the layout of the data area. Also fixed some bugs in control.dat generation. 2000.07.10 Adam J. Richter (adam@yggdrasil.com), Version 1.2 Although the program was correctly padding the DVD-ROM layer lengths to a multiple of 32768 bytes, it was not recording the padded lengths in the tape headers. This release fixes that bug. 2000.06.20 Adam J. Richter (adam@yggdrasil.com), Version 1.1 It turns out the layer 0 for DVD9 is actually smaller than a single layer DVD5 disc. 2000.06.01 Adam J. Richter (adam@yggdrasil.com), Version 1.0 No bugs have been identified in a long time. Call this 1.0 and announce it to the world. 2000.02.16 Adam J. Richter (adam@yggdrasil.com), Version 0.15 Fix opposite track control.dat calculation. 2000.02.16 Adam J. Richter (adam@yggdrasil.com), Version 0.14 Default track spiral orientation to opposite for two layer DVD's and parallel for one layer DVD's. 2000.02.16 Adam J. Richter (adam@yggdrasil.com), Version 0.13 Documented --combined-length and --readout-speed in manual page. 2000.02.16 Adam J. Richter (adam@yggdrasil.com), Version 0.12 First version that can try to automatically generate correct leadin information. If there no bugs are found in the next couple of days, this version will become 1.0. 2000.02.15 Adam J. Richter (adam@yggdrasil.com), Version 0.11 Left justify Master ID field. Add ability to specify disc size (8cm or 12cm). 2000.02.15 Adam J. Richter (adam@yggdrasil.com), Version 0.10 Do an lseek on the input file descriptor, even when offset==0, because guess_length_and_offset() leaves it in a weird place. 2000.02.15 Adam J. Richter (adam@yggdrasil.com), Version 0.9 Fixes for my amazingly stupid bugs. I had the program seeking on the output device instead of the input device, and at one point it was using sizeof() to determine the size of an array which is now being dynamically set. 2000.02.15 Adam J. Richter (adam@yggdrasil.com), Version 0.8 Write DVD leadin file for both layers. 2000.02.15 Adam J. Richter (adam@yggdrasil.com), Version 0.7 Added "--master-id" option. 2000.02.15 Adam J. Richter (adam@yggdrasil.com), Version 0.6 Add "--track-path" option. Default second track direction to parallel. 2000.01.16 Adam J. Richter (adam@yggdrasil.com), Version 0.4 Add an option to read leadin control data from a file. 2000.01.10 Adam J. Richter (adam@yggdrasil.com), Version 0.4 More fixes. Put correct block counts in HDR1 and EOF1 labels. 2000.01.09 Adam J. Richter (adam@yggdrasil.com), Version 0.3 Fixed some bugs in HDR1 and EOF1 labels. 1999.11.19 Adam J. Richter (adam@yggdrasil.com), Version 0.2 Added a zero length block after each HDR2 or EOF2 record to match a sample DVD tape. Updated manual page. 1999.11.10 Adam J. Richter (adam@yggdrasil.com), Version 0.1. First exported snapshot. It seems to work, but there are a couple of bytes that it is supposed to set in the lead in data, which it does not do yet, because I do not have the necessary information. Once that is done and any bugs that are found in the interim are fixed, then I expect to call that release 1.0. dvdtape-1.6/Makefile0100644000113000000000000000045107012132706013431 0ustar adamsystemprefix=/usr BINDIR=${prefix}/bin MANDIR=${prefix}/man CFLAGS=-O2 -D_FILE_OFFSET_BITS=64 -Wall PROGRAM=dvdtape OBJECTS=dvdtape.o isosize.o all: $(PROGRAM) $(PROGRAM): $(OBJECTS) install: all install $(PROGRAM) $(BINDIR) install $(PROGRAM).1 $(MANDIR)/man1/ clean: -rm -f $(PROGRAM) *.o *~ dvdtape-1.6/isosize.c0100644000113000000000000000563107321514163013633 0ustar adamsystem#include #define HAVE_LONG_LONG #ifdef HAVE_LONG_LONG # define u64 unsigned long long #else # define u64 unsigned long #endif #define ISODCL(from, to) (to - from + 1) static unsigned int isonum_731 (unsigned char * p) { return ((p[0] & 0xff) | ((p[1] & 0xff) << 8) | ((p[2] & 0xff) << 16) | ((p[3] & 0xff) << 24)); } static unsigned int isonum_733 (unsigned char * p) { return (isonum_731 (p)); } struct iso_primary_descriptor { unsigned char type [ISODCL ( 1, 1)]; /* 711 */ unsigned char id [ISODCL ( 2, 6)]; unsigned char version [ISODCL ( 7, 7)]; /* 711 */ unsigned char unused1 [ISODCL ( 8, 8)]; unsigned char system_id [ISODCL ( 9, 40)]; /* aunsigned chars */ unsigned char volume_id [ISODCL ( 41, 72)]; /* dunsigned chars */ unsigned char unused2 [ISODCL ( 73, 80)]; unsigned char volume_space_size [ISODCL ( 81, 88)]; /* 733 */ unsigned char unused3 [ISODCL ( 89, 120)]; unsigned char volume_set_size [ISODCL (121, 124)]; /* 723 */ unsigned char volume_sequence_number [ISODCL (125, 128)]; /* 723 */ unsigned char logical_block_size [ISODCL (129, 132)]; /* 723 */ unsigned char path_table_size [ISODCL (133, 140)]; /* 733 */ unsigned char type_l_path_table [ISODCL (141, 144)]; /* 731 */ unsigned char opt_type_l_path_table [ISODCL (145, 148)]; /* 731 */ unsigned char type_m_path_table [ISODCL (149, 152)]; /* 732 */ unsigned char opt_type_m_path_table [ISODCL (153, 156)]; /* 732 */ unsigned char root_directory_record [ISODCL (157, 190)]; /* 9.1 */ unsigned char volume_set_id [ISODCL (191, 318)]; /* dunsigned chars */ unsigned char publisher_id [ISODCL (319, 446)]; /* achars */ unsigned char preparer_id [ISODCL (447, 574)]; /* achars */ unsigned char application_id [ISODCL (575, 702)]; /* achars */ unsigned char copyright_file_id [ISODCL (703, 739)]; /* 7.5 dchars */ unsigned char abstract_file_id [ISODCL (740, 776)]; /* 7.5 dchars */ unsigned char bibliographic_file_id [ISODCL (777, 813)]; /* 7.5 dchars */ unsigned char creation_date [ISODCL (814, 830)]; /* 8.4.26.1 */ unsigned char modification_date [ISODCL (831, 847)]; /* 8.4.26.1 */ unsigned char expiration_date [ISODCL (848, 864)]; /* 8.4.26.1 */ unsigned char effective_date [ISODCL (865, 881)]; /* 8.4.26.1 */ unsigned char file_structure_version [ISODCL (882, 882)]; /* 711 */ unsigned char unused4 [ISODCL (883, 883)]; unsigned char application_data [ISODCL (884, 1395)]; unsigned char unused5 [ISODCL (1396, 2048)]; }; u64 isosize(int infile) { struct iso_primary_descriptor ipd; struct iso_directory_record * idr; unsigned int blksize; lseek(infile, 16 << 11, 0); read(infile, &ipd, sizeof(ipd)); idr = (struct iso_directory_record *) &ipd.root_directory_record; blksize = isonum_733(ipd.logical_block_size); blksize &= (1<<16)-1; if (blksize == 0) blksize = 2048; return (u64) ((((u64) isonum_733(ipd.volume_space_size)) * ((u64) blksize))); } dvdtape-1.6/config.h0100644000113000000000000000003007036247443013413 0ustar adamsystem#define HAVE_SYS_MTIO_H dvdtape-1.6/COPYING0100644000113000000000000004311007015326726013035 0ustar adamsystem GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.