Handle more than 16 characters for the device names in dumpdates.
Fixed a bug in dump which prevented the creation of the dumpdates file when doing a 0-level dump.
Changed the way dump 'S' flag reports the size estimate from number of blocks into bytes.
-$Id: CHANGES,v 1.27 1999/12/17 10:21:30 tiniou Exp $
+$Id: CHANGES,v 1.28 2000/01/07 19:23:53 tiniou Exp $
Changes between versions 0.4b11 and 0.4b12 (released ????????????????)
======================================================================
dump. Thanks to Matti Taskinen <mkt@rni.helsinki.fi> for
submitting the patch.
+3. Handle EINTR in atomical reads/writes in dump, which was causing
+ dump to fail on some systems. Thanks to Eric Jergensen
+ <eric@dvns.com> for reporting the bug and submitting the patch.
+
+4. Handle more than 16 characters for the device names in dumpdates.
+ (up to 255 now). Thanks to Rainer Clasen <bj@ncc.cicely.de> for
+ tracking down the problem and proposing the solution.
+
+5. Fixed a bug in dump which prevented the creation of the
+ dumpdates file when doing a 0-level dump without already
+ having a dumpdates file. Thanks to Patrik Schindler
+ <poc@pocnet.net> for reporting the bug.
+
+6. Changed the way dump 'S' flag reports the size estimate
+ from number of blocks into bytes (making it compatible
+ with the Solaris version, and simplifying things for
+ amanda users). Thanks to Jason L Tibbitts III
+ <tibbs@math.uh.edu> for reporting the bug.
+
Changes between versions 0.4b10 and 0.4b11 (released December 5, 1999)
======================================================================
-$Id: THANKS,v 1.14 1999/12/17 10:14:27 tiniou Exp $
+$Id: THANKS,v 1.15 2000/01/07 19:23:53 tiniou Exp $
Dump and restore were written by the people of the CSRG at the University
of California, Berkeley.
Stephen Carr sgcarr@civeng.adelaide.edu.au
Rob Cermak cermak@ahab.rutgers.edu
+Rainer Clasen bj@ncc.cicely.de
Abhijit Dasgupta abhijit@ans.net
Jason Fearon jasonf@netrider.org.au
Jeremy Fitzhardinge jeremy@goop.org
Eirik Fuller eirik@netcom.com
+Eric Jergensen eric@dvns.com
Henry Katz hkatz@hkatz.dialup.access.net
Klaus Kudielka kkudielk@cacofonix.nt.tuwien.ac.at
Thorsten Kukuk kukuk@suse.de
Nuno Oliveira nuno@eq.uc.pt
Brent Olson night@halcyon.com
Bernhard Sadlowski sadlowsk@Mathematik.Uni-Bielefeld.DE
+Patrik Schindler poc@pocnet.net
Chris Siebenmann cks@utcc.utoronto.ca
Bob Snyder rsnyder@janet.advsys.com
Matti Taskinen mkt@rni.helsinki.fi
+Jason L Tibbitts III tibbs@math.uh.edu
Theodore Y. Ts'o tytso@mit.edu
Stephen Tweedie sct@dcs.ed.ac.uk
Daniel Veillard Daniel.Veillard@imag.fr
-$Id: TODO,v 1.8 1999/11/21 02:24:45 tiniou Exp $
+$Id: TODO,v 1.9 2000/01/07 19:23:53 tiniou Exp $
Need to verify:
---------------
6. Add a compression mode using zlib on each file (see
http://www.cdrom.com/pub/infozip/zlib).
-7. Add some support in dump and restore for numbering in sequence
- the output files (when dumping to a file). Something like -N <prefix>
- which creates (or reads) <prefix>-1, <prefix>-2 etc...
-
-8. Make a bootable dump tape? I don't know if it is possible...
+7. Make a bootable dump tape? I don't know if it is possible...
+8. From Kjetil Torgrim Homme <kjetilho@ifi.uio.no>:
+ a archive_file
+ Archive file. Archive a dump table-of-contents in
+ the specified archive_file to be used by
+ ufsrestore(1M) to determine whether a file is in
+ the dump file that is being restored.
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: dumprestore.h,v 1.3 1999/10/11 13:31:09 stelian Exp $
+ * $Id: dumprestore.h,v 1.4 2000/01/07 19:24:04 tiniou Exp $
*/
#ifndef _PROTOCOLS_DUMPRESTORE_H_
#define DR_NEWHEADER 0x0001 /* new format tape header */
#define DR_NEWINODEFMT 0x0002 /* new format inodes on tape */
-#define DUMPOUTFMT "%-16s %c %s" /* for printf */
- /* name, level, ctime(date) */
-#define DUMPINFMT "%16s %c %[^\n]\n" /* inverse for scanf */
-
#endif /* !_DUMPRESTORE_H_ */
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: dump.8.in,v 1.7 1999/12/06 21:37:50 tiniou Exp $
+.\" $Id: dump.8.in,v 1.8 2000/01/07 19:24:04 tiniou Exp $
.\"
.Dd __DATE__
.Dt DUMP 8
Size estimate. Determine the amount of space
that is needed to perform the dump without
actually doing it, and display the estimated
-number of blocks it will take. This is useful
+number of bytes it will take. This is useful
with incremental dumps to determine how many
volumes of media will be needed.
.It Fl T Ar date
#ifndef lint
static const char rcsid[] =
- "$Id: itime.c,v 1.7 1999/10/31 19:48:28 tiniou Exp $";
+ "$Id: itime.c,v 1.8 2000/01/07 19:24:04 tiniou Exp $";
#endif /* not lint */
#include <sys/param.h>
spcl.c_ddate = 0;
lastlevel = '0';
- /* If this is a level 0 dump, there's no point in trying to read
+ /* If this is a level 0 dump, and we're not updating
+ dumpdates, there's no point in trying to read
dumpdates. It may not exist yet, or may not be mounted. For
incrementals, we *must* read dumpdates (fail if it's not there!) */
- if (level == lastlevel)
+ if ( (level == lastlevel) && !createdumpdates)
return;
initdumptimes(createdumpdates);
if (ddatev == NULL)
dumprecout(FILE *file, struct dumpdates *what)
{
- if (fprintf(file, DUMPOUTFMT,
+ if (fprintf(file, "%s %c %s",
what->dd_name,
what->dd_level,
ctime(&what->dd_ddate)) < 0)
static int
makedumpdate(struct dumpdates *ddp, char *tbuf)
{
- char un_buf[BUFSIZ];
+ char *tok;
+
+ /* device name */
+ if ( NULL == (tok = strsep( &tbuf, " ")) )
+ return(-1);
+ if ( strlen(tok) > NAME_MAX )
+ return(-1);
+ strcpy(ddp->dd_name, tok);
+
+ /* eat whitespace */
+ for( ; *tbuf == ' ' ; tbuf++);
+
+ /* dump level */
+ ddp->dd_level = *tbuf;
+ ++tbuf;
+
+ /* eat whitespace */
+ for( ; *tbuf == ' ' ; tbuf++);
- (void) sscanf(tbuf, DUMPINFMT, ddp->dd_name, &ddp->dd_level, un_buf);
- ddp->dd_ddate = unctime(un_buf);
+ /* dump date */
+ ddp->dd_ddate = unctime(tbuf);
if (ddp->dd_ddate < 0)
return(-1);
return(0);
#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.10 1999/12/17 10:14:59 tiniou Exp $";
+ "$Id: main.c,v 1.11 2000/01/07 19:24:04 tiniou Exp $";
#endif /* not lint */
#include <sys/param.h>
}
if (sizest) {
- printf("%ld\n", tapesize + 10);
+ printf("%.0f\n", ((double)tapesize + 10) * TP_BSIZE);
exit(X_FINOK);
} /* stop here for size estimate */
#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.9 1999/11/21 16:01:47 tiniou Exp $";
+ "$Id: tape.c,v 1.10 2000/01/07 19:24:04 tiniou Exp $";
#endif /* not lint */
#ifdef __linux__
{
int got, need = count;
- while ((got = read(fd, buf, need)) > 0 && (need -= got) > 0)
- (char *)buf += got;
+ do {
+ while ((got = read(fd, buf, need)) > 0 && (need -= got) > 0)
+ (char *)buf += got;
+ } while (got == -1 && errno == EINTR);
return (got < 0 ? got : count - need);
}
{
int got, need = count;
- while ((got = write(fd, buf, need)) > 0 && (need -= got) > 0)
- (char *)buf += got;
+ do {
+ while ((got = write(fd, buf, need)) > 0 && (need -= got) > 0)
+ (char *)buf += got;
+ } while (got == -1 && errno == EINTR);
return (got < 0 ? got : count - need);
}