summaryrefslogtreecommitdiff
path: root/sbin/restore
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2013-04-25 06:43:21 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2013-04-25 06:43:21 +0000
commit22fa7a0d6b1bf16508f64e347bf54adda43bf21c (patch)
treedc33991e99b823eb6b1a6a3a660fbdc1a9b6ea6b /sbin/restore
parent4178f6843ad1f6377b10c1fe96b0a0a4ab4f2cd3 (diff)
big int_t/time_t fixes; ok deraadt@ krw@
Diffstat (limited to 'sbin/restore')
-rw-r--r--sbin/restore/dirs.c14
-rw-r--r--sbin/restore/interactive.c5
2 files changed, 10 insertions, 9 deletions
diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c
index 20498438fd7..1ac0d939fd8 100644
--- a/sbin/restore/dirs.c
+++ b/sbin/restore/dirs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dirs.c,v 1.34 2013/04/24 13:46:29 deraadt Exp $ */
+/* $OpenBSD: dirs.c,v 1.35 2013/04/25 06:43:20 otto Exp $ */
/* $NetBSD: dirs.c,v 1.26 1997/07/01 05:37:49 lukem Exp $ */
/*
@@ -140,8 +140,8 @@ extractdirs(int genmode)
int fd;
Vprintf(stdout, "Extract directories from tape\n");
- (void)snprintf(dirfile, sizeof(dirfile), "%s/rstdir%d", tmpdir,
- dumpdate);
+ (void)snprintf(dirfile, sizeof(dirfile), "%s/rstdir%lld", tmpdir,
+ (long long)dumpdate);
if (command != 'r' && command != 'R') {
strlcat(dirfile, "-XXXXXXXXXX", sizeof(dirfile));
fd = mkstemp(dirfile);
@@ -153,8 +153,8 @@ extractdirs(int genmode)
err(1, "cannot create directory temporary %s", dirfile);
}
if (genmode != 0) {
- (void)snprintf(modefile, sizeof(modefile), "%s/rstmode%d",
- tmpdir, dumpdate);
+ (void)snprintf(modefile, sizeof(modefile), "%s/rstmode%lld",
+ tmpdir, (long long)dumpdate);
if (command != 'r' && command != 'R') {
strlcat(modefile, "-XXXXXXXXXX", sizeof(modefile));
fd = mkstemp(modefile);
@@ -574,8 +574,8 @@ setdirmodes(int flags)
Vprintf(stdout, "Set directory mode, owner, and times.\n");
if (command == 'r' || command == 'R')
- (void)snprintf(modefile, sizeof(modefile), "%s/rstmode%d",
- tmpdir, dumpdate);
+ (void)snprintf(modefile, sizeof(modefile), "%s/rstmode%lld",
+ tmpdir, (long long)dumpdate);
if (modefile[0] == '#') {
panic("modefile not defined\n");
fputs("directory mode, owner, and times not set\n", stderr);
diff --git a/sbin/restore/interactive.c b/sbin/restore/interactive.c
index 376a4996b20..9e0ef7521d6 100644
--- a/sbin/restore/interactive.c
+++ b/sbin/restore/interactive.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interactive.c,v 1.27 2011/06/27 23:40:57 tedu Exp $ */
+/* $OpenBSD: interactive.c,v 1.28 2013/04/25 06:43:20 otto Exp $ */
/* $NetBSD: interactive.c,v 1.10 1997/03/19 08:42:52 lukem Exp $ */
/*
@@ -677,7 +677,8 @@ formatf(struct afile *list, int nentry)
for (j = 0; j < columns; j++) {
fp = &list[j * lines + i];
if (vflag) {
- fprintf(stderr, "%*d ", precision, fp->fnum);
+ fprintf(stderr, "%*llu ", precision,
+ (unsigned long long)fp->fnum);
fp->len += precision + 1;
}
if (haveprefix) {