* Ported to Linux's Second Extended File System as part of the
* dump and restore backup suit
* Remy Card <card@Linux.EU.Org>, 1994-1997
- * Stelian Pop <pop@cybercable.fr>, 1999
+ * Stelian Pop <pop@cybercable.fr>, 1999-2000
*/
/*-
#ifndef lint
static const char rcsid[] =
- "$Id: optr.c,v 1.7 1999/10/18 09:48:00 tiniou Exp $";
+ "$Id: optr.c,v 1.10 2000/02/10 09:42:32 stelian Exp $";
#endif /* not lint */
#include <sys/param.h>
tschedule = tnow + 300;
if (blockswritten < 500)
return;
+ if (blockswritten > tapesize)
+ tapesize = blockswritten;
deltat = tstart_writing - tnow +
(1.0 * (tnow - tstart_writing))
/ blockswritten * tapesize;
register struct fstab *new;
new = (struct fstab *)malloc(sizeof (*fs));
- if (new == NULL ||
- (new->fs_file = strdup(fs->fs_file)) == NULL ||
+ if (new == NULL)
+ quit("%s\n", strerror(errno));
+ if (strlen(fs->fs_file) > 1 && fs->fs_file[strlen(fs->fs_file) - 1] == '/')
+ fs->fs_file[strlen(fs->fs_file) - 1] = '\0';
+ if ((new->fs_file = strdup(fs->fs_file)) == NULL ||
(new->fs_type = strdup(fs->fs_type)) == NULL ||
(new->fs_spec = strdup(fs->fs_spec)) == NULL)
quit("%s\n", strerror(errno));