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