Blame SOURCES/dvd+rw-tools-7.1-format.patch

eaee06
diff -up dvd+rw-tools-7.1/dvd+rw-format.1.format dvd+rw-tools-7.1/dvd+rw-format.1
eaee06
--- dvd+rw-tools-7.1/dvd+rw-format.1.format	2012-08-23 17:30:20.001822268 +0200
eaee06
+++ dvd+rw-tools-7.1/dvd+rw-format.1	2012-08-24 09:37:14.549094680 +0200
eaee06
@@ -0,0 +1,132 @@
eaee06
+.TH DVD+RW\-FORMAT 1 "24 Aug 2012" "dvd+rw\-tools 7.1"
eaee06
+.SH NAME
eaee06
+dvd+rw\-format \- formatting and blanking DVD and BD media program.
eaee06
+.SH SYNOPSIS
eaee06
+.B dvd+rw\-format
eaee06
+[\fB\-force\fP[\fB\=full\fP]]
eaee06
+[\fB\-lead\-out|\-blank\fP[\fB\=full\fP]]
eaee06
+[\fB\-ssa\fP[\fB\=none|default|max|XXXm\fP]]
eaee06
+.I /dev/dvd
eaee06
+
eaee06
+.SH DESCRIPTION
eaee06
+\fBdvd+rw\-format\fP is a part of \fBdvd+rw\-tools\fP suite and allows to
eaee06
+format virgin DVD+RW or BD\-RE media for the first use or blank already
eaee06
+written DVD\-RW.
eaee06
+Typical use cases of using \fBdvd+rw\-format\fP is formatting DVD\-RW to
eaee06
+make them over\-writable, blanking used DVD\-RW to make them sequentially
eaee06
+writable from scratch, formatting BD\-RE and DVD\-RAM with custom
eaee06
+spare area sizes or re\-formatting BD\-RE and DVD\-RAM to change their spare
eaee06
+size.
eaee06
+It is not possible to format CD\-RW by \fBdvd+rw\-format\fP,
eaee06
+you can use \fBcdrskin\fP, \fBxorriso\fP or \fBwodim\fP utilities to blank
eaee06
+them or cdrwtool to format them instead, see section \fBEXAMPLES\fP.
eaee06
+
eaee06
+A DVD\-RW accepts two disc modes: the \fISequential Recording\fP
eaee06
+and the \fIRestricted Overwrite\fP. If a DVD\-RW medium is in the latter one,
eaee06
+it will behave much like DVD+RW.
eaee06
+By default DVD\-RW discs are in Sequential Recording mode, but
eaee06
+can be put into Restricted Overwrite mode using \fBdvd+rw\-format\fP
eaee06
+when no options given.
eaee06
+Be aware, that only \-blank=full, which lasts as long as full writing,
eaee06
+makes a used sequential DVD\-RW capable of performing multi\-session,
eaee06
+while fast blanked DVD\-RW can only do Disk\-At\-Once.
eaee06
+
eaee06
+Virgin DVD\-RW can be directly written without
eaee06
+the need of a formatting operation, however a non\-virgin DVD\-RW in
eaee06
+Sequential Recording mode needs to be blanked before writing a new
eaee06
+initial session. Since a DVD\-RW medium in the Restricted Overwrite
eaee06
+mode behaves much like DVD+RW, it  can be written again without prior
eaee06
+formatting the media.
eaee06
+
eaee06
+Virgin BD\-RE and DVD+RW media may be initially formatted prior
eaee06
+usage. Any\-time later, \fBgrowisofs\fP program will take care of formatting
eaee06
+it automatically whenever appropriate, while further formatting is not
eaee06
+recommended, however it is possible.
eaee06
+
eaee06
+.SH OPTIONS
eaee06
+.TP
eaee06
+.BI \-force[\=full]
eaee06
+Perform formatting even if the medium is formatted already. This is not
eaee06
+recommended for BD\-RE and DVD+RW media, since they need to be
eaee06
+formatted only once. Use \fB\-format=full\fP to perform full (lengthy)
eaee06
+reformat in case of DVD\-RAM or (lengthy) Full Certification in case of
eaee06
+BD\-RE.
eaee06
+.TP
eaee06
+.BI \-lead\-out
eaee06
+Relocates the lead\-out next to outermost written sector as well as makes
eaee06
+sure there is no virgin surface before it. This can make the medium more
eaee06
+compatible with some DVD players. Previously written data is not
eaee06
+affected by this operation. 
eaee06
+.TP
eaee06
+.BI \-blank[\=full]
eaee06
+Wipe data from DVD\-RW media. Data on BD\-RE and DVD+RW will we overwritten
eaee06
+automatically, so there is no need to blank them explicitly.
eaee06
+Use \fB\-blank\=full\fP to change DVD\-RW back to Sequential Recording mode.
eaee06
+.TP
eaee06
+.BI \-ssa[\=none|default|max|XXXm]
eaee06
+Grow, eliminate, reset to default or maximize \fISupplementary Spare Area\fP.
eaee06
+
eaee06
+.SH EXAMPLES
eaee06
+Actual device names vary from one operating system to another. We use
eaee06
+\fI/dev/dvd\fP as a collective name or as symbolic link to the actual
eaee06
+device if you wish. Under Linux it will most likely be a
eaee06
+device such as "/dev/sr0" or "/dev/hda" for older Linux 2.6.
eaee06
+
eaee06
+To blank a CD\-RW, you have to use another utility, e.g. wodim:
eaee06
+
eaee06
+        \fBwodim\fP \fBblank=fast\fP \-immed dev=\fI/dev/cdrom\fP
eaee06
+        \fBcdrskin\fP \fBblank=all|fast|as_needed\fP \-immed dev=\fI/dev/cdrom\fP
eaee06
+        \fBxorriso\fP \fB\-outdev\fP \fI/dev/cdrom\fP \fB\-blank all|fast|as_needed\fP
eaee06
+        
eaee06
+To format CD\-RW, you can use cdrwtool:
eaee06
+
eaee06
+        \fBcdrwtool\fP \fB\-d\fP \fI/dev/cdrom\fP \fB\-q\fP
eaee06
+
eaee06
+To blank a DVD\-RW and put in the incremental sequential mode, run:
eaee06
+
eaee06
+        \fBdvd+rw\-format\fP \fB\-blank=full\fP \fI/dev/dvd\fP
eaee06
+
eaee06
+To blank a DVD\-RW and put in the Restricted Overwrite mode, run:
eaee06
+
eaee06
+        \fBdvd+rw\-format\fP \fB\-force\fP \fI/dev/dvd\fP
eaee06
+
eaee06
+To overwrite data of BD\-RE, DVD+RW, DVD\-RW or DVD\-RAM run:
eaee06
+
eaee06
+        \fBgrowisofs\fP \fB\-Z\fP \fI/dev/dvd\fP\=\fI/dev/zero\fP
eaee06
+
eaee06
+To blank a DVD\-RAM, you can use:
eaee06
+
eaee06
+        \fBdd\fP if\=\fI/dev/zero\fP of\=\fI/dev/dvd\fP
eaee06
+
eaee06
+To relocate lead\-out sector, run:
eaee06
+
eaee06
+        \fBdvd+rw\-format\fP \fB\-lead\-out\fP \fI/dev/dvd\fP
eaee06
+        
eaee06
+.SH NOTES
eaee06
+Note that DVD+RW re\-formatting procedure does not substitute for
eaee06
+blanking. If you want to nullify the media, e.g. for privacy reasons,
eaee06
+do it explicitly with 'growisofs \-Z \fI/dev/dvd\fP\=\fB/dev/zero\fP'.
eaee06
+
eaee06
+When growisofs "runs into" blank Blu\-ray Disc media or BD\-RE,
eaee06
+it gets pre\-formatted with minimal spare area size of 256MB.
eaee06
+
eaee06
+.SH SEE ALSO
eaee06
+Most up\-to\-date information on dvd+rw\-tools is available at
eaee06
+http://fy.chalmers.se/~appro/linux/DVD+RW/.
eaee06
+.PP
eaee06
+.BR growisofs (1),
eaee06
+.BR cdrskin (1),
eaee06
+.BR xorriso (1),
eaee06
+.BR wodim (1),
eaee06
+.BR cdrwtool (1)
eaee06
+
eaee06
+.SH AUTHORS
eaee06
+Andy Polyakov <appro@fy.chalmers.se> stands for programming and on\-line
eaee06
+information.
eaee06
+
eaee06
+This manpage was created by Honza Horak <hhorak@redhat.com> and consulted by
eaee06
+Thomas Schmitt <scdbackup@gmx.net>.
eaee06
+
eaee06
+.SH LICENSE
eaee06
+\fBdvd+rw\-format\fP is distributed under GNU GPL.
eaee06
+
eaee06
diff -up dvd+rw-tools-7.1/growisofs.1.format dvd+rw-tools-7.1/growisofs.1
eaee06
--- dvd+rw-tools-7.1/growisofs.1.format	2008-03-01 11:40:06.000000000 +0100
eaee06
+++ dvd+rw-tools-7.1/growisofs.1	2012-08-24 09:35:55.550780073 +0200
eaee06
@@ -113,7 +113,7 @@ recordings.
eaee06
 Actual device names vary from one operating system to another. We use
eaee06
 \fI/dev/dvd\fP as a collective name or as symbolic link to the actual
eaee06
 device if you wish. Under Linux it will most likely be an ide\-scsi
eaee06
-device  such as "/dev/scd0." Under NetBSD/OpenBSD it has to be a
eaee06
+device  such as "/dev/sr0." Under NetBSD/OpenBSD it has to be a
eaee06
 \fIcharacter\fP SCSI CD\-ROM device such as "/dev/rcd0c." Under Solaris
eaee06
 it also has to be a \fIcharacter\fP SCSI/ATAPI CD\-ROM device, e.g.
eaee06
 "/dev/rdsk/c0t1d0s2" or "/vol/dev/aliases/cdrom0." And likewise in
eaee06
@@ -210,11 +210,19 @@ DVD\-RAM or Blu\-ray Disc, as volumes ar
eaee06
 When growisofs "runs into" blank Blu\-ray Disc media, BD\-RE or BD\-R,
eaee06
 it gets pre-formatted with minimal spare area size of 256MB.
eaee06
 
eaee06
+A DVD\-RW accepts two disc modes: the \fISequential Recording\fP
eaee06
+and the \fIRestricted Overwrite\fP. If a DVD\-RW medium is in the later one,
eaee06
+it will behave much like DVD+RW.
eaee06
+By default DVD\-RW discs are in Sequential Recording mode, but
eaee06
+can be put into Restricted Overwrite mode using \fBdvd+rw\-format\fP.
eaee06
+See \fBdvd+rw\-format (1)\fP for more info.
eaee06
+
eaee06
 .SH SEE ALSO
eaee06
 Most up-to-date information on dvd+rw\-tools is available at
eaee06
 http://fy.chalmers.se/~appro/linux/DVD+RW/.
eaee06
 .PP
eaee06
-The manpage for \fBmkisofs\fP.
eaee06
+.BR mkisofs (1),
eaee06
+.BR dvd+rw\-format (1)
eaee06
 
eaee06
 .SH AUTHORS
eaee06
 Andy Polyakov <appro@fy.chalmers.se> stands for programming and on-line
eaee06
diff -up dvd+rw-tools-7.1/growisofs.c.format dvd+rw-tools-7.1/growisofs.c
eaee06
--- dvd+rw-tools-7.1/growisofs.c.format	2008-03-04 10:15:03.000000000 +0100
eaee06
+++ dvd+rw-tools-7.1/growisofs.c	2012-08-23 17:30:20.028822506 +0200
eaee06
@@ -3433,8 +3433,15 @@ int main (int argc, char *argv[])
eaee06
 	else if (isatty (0)) warn_for_isofs |= 2;
eaee06
 
eaee06
 	if (no_tty_check || (warn_for_isofs&2))
eaee06
-	    fprintf (stderr,"WARNING: %s already carries isofs!\n",in_device),
eaee06
+	{
eaee06
+	    fprintf (stderr,"WARNING: %s already carries isofs!\n",in_device);
eaee06
+		/* we cannot re-write a DVD-RW media in Sequential mode */
eaee06
+		if ((int)(mmc_profile&0xFFFF) == 0x14)
eaee06
+			fprintf (stderr,"FATAL: DVD-RW medium is in Sequential mode, you "
eaee06
+				            "need to blank it before writing again.\n"),
eaee06
+			exit(FATAL_START(EBUSY));
eaee06
 	    printf ("About to execute '");
eaee06
+	}
eaee06
 	else
eaee06
 	    fprintf (stderr,"FATAL: %s already carries isofs!\n",in_device),
eaee06
 	    exit(FATAL_START(EBUSY));
eaee06
diff -up dvd+rw-tools-7.1/Makefile.format dvd+rw-tools-7.1/Makefile
eaee06
--- dvd+rw-tools-7.1/Makefile.format	2008-02-27 14:11:27.000000000 +0100
eaee06
+++ dvd+rw-tools-7.1/Makefile	2012-08-23 17:30:20.037822589 +0200
eaee06
@@ -22,6 +22,7 @@ pkg:
eaee06
 		$(DIST)/Makefile.m4		\
eaee06
 		$(DIST)/dvd+rw-tools.spec	\
eaee06
 		$(DIST)/growisofs.1		\
eaee06
+		$(DIST)/dvd+rw-format.1		\
eaee06
 		$(DIST)/transport.hxx		\
eaee06
 		$(DIST)/mp.h			\
eaee06
 		$(DIST)/win32err.h		\
eaee06
diff -up dvd+rw-tools-7.1/Makefile.m4.format dvd+rw-tools-7.1/Makefile.m4
eaee06
--- dvd+rw-tools-7.1/Makefile.m4.format	2012-08-23 17:30:19.971822000 +0200
eaee06
+++ dvd+rw-tools-7.1/Makefile.m4	2012-08-23 17:30:20.038822597 +0200
eaee06
@@ -32,6 +32,7 @@ BIN_MODE?=0755
eaee06
 install:	dvd+rw-tools
eaee06
 	install -o root -m $(BIN_MODE) $(CHAIN) /usr/bin
eaee06
 	install -o root -m 0644 growisofs.1 /usr/share/man/man1
eaee06
+	install -o root -m 0644 dvd+rw-format.1 /usr/share/man/man1
eaee06
 ])
eaee06
 
eaee06
 ifelse(OS,MINGW32,[
eaee06
@@ -68,6 +69,7 @@ BIN_MODE?=04755
eaee06
 install:	dvd+rw-tools
eaee06
 	install -o root -m $(BIN_MODE) $(CHAIN) /usr/local/bin
eaee06
 	install -o root -m 0644 growisofs.1 /usr/local/man/man1
eaee06
+	install -o root -m 0644 dvd+rw-format.1 /usr/local/man/man1
eaee06
 ])
eaee06
 
eaee06
 ifelse(OS,SunOS,[
eaee06
@@ -103,6 +105,7 @@ LDLIBS=-lvolmgt -lrt -lpthread -ldl
eaee06
 install:	dvd+rw-tools
eaee06
 	/usr/ucb/install -o root -m 04755 $(CHAIN) /usr/local/bin
eaee06
 	/usr/ucb/install -o root -m 0644 growisofs.1 /usr/local/man/man1
eaee06
+	/usr/ucb/install -o root -m 0644 dvd+rw-format.1 /usr/local/man/man1
eaee06
 ])
eaee06
 
eaee06
 ifelse(OS,HP-UX,[
eaee06
@@ -141,6 +144,7 @@ LDLIBS=-lrt -lpthread
eaee06
 install:	dvd+rw-tools
eaee06
 	/usr/sbin/install -o -f /usr/local/bin  $(CHAIN)
eaee06
 	/usr/sbin/install -o -f /usr/local/man/man1 growisofs.1
eaee06
+	/usr/sbin/install -o -f /usr/local/man/man1 dvd+rw-format.1
eaee06
 ])
eaee06
 
eaee06
 ifelse(OS,IRIX,[
eaee06
@@ -178,6 +182,7 @@ BIN_MODE=04755	# set-root-uid
eaee06
 install:	dvd+rw-tools
eaee06
 	/sbin/install -u root -m $(BIN_MODE) $(CHAIN) /usr/local/bin
eaee06
 	/sbin/install -u root -m 0644 growisofs.1 /usr/local/man/man1
eaee06
+	/sbin/install -u root -m 0644 dvd+rw-format.1 /usr/local/man/man1
eaee06
 ])
eaee06
 
eaee06
 ifelse(OS,Linux,[
eaee06
@@ -202,6 +207,7 @@ install:	dvd+rw-tools
eaee06
 	install $(minus_o) -m $(bin_mode) $(CHAIN) $(prefix)/bin
eaee06
 	[[ -d $(mandir)/man1 ]] || mkdir -p $(mandir)/man1
eaee06
 	install $(minus_o) -m 0644 growisofs.1 $(mandir)/man1
eaee06
+	install $(minus_o) -m 0644 dvd+rw-format.1 $(mandir)/man1
eaee06
 	-[[ -f rpl8 ]] && install $(minus_o) -m $(bin_mode) rpl8 $(prefix)/bin || :
eaee06
 	-[[ -f btcflash ]] && install $(minus_o) -m $(bin_mode) btcflash $(prefix)/bin || :
eaee06
 ])