projects
/
debian
/
dump
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 0.4b43
[debian/dump]
/
dump
/
main.c
diff --git
a/dump/main.c
b/dump/main.c
index b73a7887012475bfdd86f4953e5c0110679f59cb..ae3e3caa6ee64f3c12ebdcc47390db0a5bb628b4 100644
(file)
--- a/
dump/main.c
+++ b/
dump/main.c
@@
-37,7
+37,7
@@
#ifndef lint
static const char rcsid[] =
#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.9
4 2004/07/05 15:12:45
stelian Exp $";
+ "$Id: main.c,v 1.9
7 2010/04/28 09:29:50
stelian Exp $";
#endif /* not lint */
#include <config.h>
#endif /* not lint */
#include <config.h>
@@
-123,7
+123,7
@@
int fifoout; /* true => output to fifo */
dump_ino_t curino; /* current inumber; used globally */
int newtape; /* new tape flag */
int density; /* density in 0.1" units */
dump_ino_t curino; /* current inumber; used globally */
int newtape; /* new tape flag */
int density; /* density in 0.1" units */
-long
tapesize;
/* estimated tape size, blocks */
+long
long tapesize;
/* estimated tape size, blocks */
long tsize; /* tape size in 0.1" units */
long asize; /* number of 0.1" units written on current tape */
int etapes; /* estimated number of tapes */
long tsize; /* tape size in 0.1" units */
long asize; /* number of 0.1" units written on current tape */
int etapes; /* estimated number of tapes */
@@
-239,6
+239,8
@@
main(int argc, char *argv[])
quit("TP_BSIZE must be a multiple of DEV_BSIZE\n");
memset(&lastlevel, 0, NUM_STR_SIZE);
memset(&level, 0, NUM_STR_SIZE);
quit("TP_BSIZE must be a multiple of DEV_BSIZE\n");
memset(&lastlevel, 0, NUM_STR_SIZE);
memset(&level, 0, NUM_STR_SIZE);
+ /* Default dump level is zero. */
+ level[0] = '0';
if (argc < 2)
usage();
if (argc < 2)
usage();
@@
-541,7
+543,7
@@
main(int argc, char *argv[])
}
(void)setuid(getuid()); /* rmthost() is the only reason to be setuid */
}
(void)setuid(getuid()); /* rmthost() is the only reason to be setuid */
- if (Apath && (Afile =
open
(Apath, O_WRONLY|O_CREAT|O_TRUNC,
+ if (Apath && (Afile =
OPEN
(Apath, O_WRONLY|O_CREAT|O_TRUNC,
S_IRUSR | S_IWUSR | S_IRGRP |
S_IWGRP | S_IROTH | S_IWOTH)) < 0) {
msg("Cannot open %s for writing: %s\n",
S_IRUSR | S_IWUSR | S_IRGRP |
S_IWGRP | S_IROTH | S_IWOTH)) < 0) {
msg("Cannot open %s for writing: %s\n",
@@
-867,12
+869,12
@@
main(int argc, char *argv[])
if (pipeout || unlimited) {
tapesize += 1 + ntrec; /* 1 map header + trailer blocks */
if (pipeout || unlimited) {
tapesize += 1 + ntrec; /* 1 map header + trailer blocks */
- msg("estimated %ld blocks.\n", tapesize);
+ msg("estimated %l
l
d blocks.\n", tapesize);
} else {
double fetapes;
if (blocksperfiles) {
} else {
double fetapes;
if (blocksperfiles) {
- long tapesize_left;
+ long
long
tapesize_left;
tapesize_left = tapesize;
fetapes = 0;
tapesize_left = tapesize;
fetapes = 0;
@@
-919,7
+921,7
@@
main(int argc, char *argv[])
tapesize += (etapes - 1) *
(howmany(mapsize * sizeof(char), TP_BSIZE) + 1);
tapesize += etapes + ntrec; /* headers + trailer blks */
tapesize += (etapes - 1) *
(howmany(mapsize * sizeof(char), TP_BSIZE) + 1);
tapesize += etapes + ntrec; /* headers + trailer blks */
- msg("estimated %ld blocks on %3.2f tape(s).\n",
+ msg("estimated %l
l
d blocks on %3.2f tape(s).\n",
tapesize, fetapes);
}
tapesize, fetapes);
}