#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.73 2002/07/17 10:18:52 stelian Exp $";
+ "$Id: main.c,v 1.76 2002/10/07 19:27:36 stelian Exp $";
#endif /* not lint */
#include <config.h>
char *__progname;
#endif
-int maxbsize = 64*1024; /* XXX MAXBSIZE from sys/param.h */
+int maxbsize = 1024*1024; /* XXX MAXBSIZE from sys/param.h */
static long numarg __P((const char *, long, long));
static void obsolete __P((int *, char **[]));
static void usage __P((void));
case 'b': /* blocks per tape write */
ntrec = numarg("number of blocks per write",
- 1L, 1000L);
+ 1L, 1048576L);
if (ntrec > maxbsize/1024) {
msg("Please choose a blocksize <= %dkB\n",
maxbsize/1024);
/* print QFA-file header */
snprintf(gTps, sizeof(gTps), "%s\n%s\n%ld\n\n", QFA_MAGIC, QFA_VERSION, (unsigned long)spcl.c_date);
gTps[sizeof(gTps) - 1] = '\0';
- if (write(gTapeposfd, gTps, strlen(gTps)) != strlen(gTps))
+ if (write(gTapeposfd, gTps, strlen(gTps)) != (ssize_t)strlen(gTps))
quit("can't write tapeposfile\n");
sprintf(gTps, "ino\ttapeno\ttapepos\n");
- if (write(gTapeposfd, gTps, strlen(gTps)) != strlen(gTps))
+ if (write(gTapeposfd, gTps, strlen(gTps)) != (ssize_t)strlen(gTps))
quit("can't write tapeposfile\n");
}
#endif /* USE_QFA */
unsigned long inod;
inod = strtoul(ino, &r, 10);
- if (*r != '\0' || inod <= ROOTINO) {
+ if (( *r != '\0' && !isspace(*r) ) || inod <= ROOTINO) {
msg("Invalid inode argument %s\n", ino);
msg("The ENTIRE dump is aborted.\n");
exit(X_STARTUP);