summaryrefslogtreecommitdiffstats
path: root/sbin/savecore
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-04-01 18:23:58 +0000
committerjhb <jhb@FreeBSD.org>2002-04-01 18:23:58 +0000
commit5f7d7d779b9e24845bfdf23fb05c5697a7db0356 (patch)
treef4db5a2b5366057fbb9876a0e769a5327bc6291d /sbin/savecore
parentf5fe87fccd6f5d246574ef0cf5e55a5ce7eab615 (diff)
downloadFreeBSD-src-5f7d7d779b9e24845bfdf23fb05c5697a7db0356.zip
FreeBSD-src-5f7d7d779b9e24845bfdf23fb05c5697a7db0356.tar.gz
Add long long casts so that this compiles on archs with 64-bit longs.
Pointy-hat to: phk
Diffstat (limited to 'sbin/savecore')
-rw-r--r--sbin/savecore/savecore.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c
index 5196024..846aaac 100644
--- a/sbin/savecore/savecore.c
+++ b/sbin/savecore/savecore.c
@@ -56,7 +56,7 @@ printheader(FILE *f, const struct kerneldumpheader *h, const char *devname, cons
fprintf(f, " Architecture: %s\n", h->architecture);
fprintf(f, " Architecture version: %d\n", h->architectureversion);
fprintf(f, " Dump length: %lldB (%lld MB)\n",
- h->dumplength, h->dumplength / (1024 * 1024));
+ (long long)h->dumplength, (long long)h->dumplength / (1024 * 1024));
fprintf(f, " Blocksize: %d\n", h->blocksize);
t = h->dumptime;
fprintf(f, " Dumptime: %s", ctime(&t));
@@ -91,14 +91,14 @@ DoFile(const char *devname)
warn("Couldn't find media and/or sector size of %s)", devname);
return;
}
- printf("Mediasize = %lld\n", mediasize);
+ printf("Mediasize = %lld\n", (long long)mediasize);
printf("Sectorsize = %u\n", sectorsize);
lasthd = mediasize - sectorsize;
lseek(fd, lasthd, SEEK_SET);
error = read(fd, &kdhl, sizeof kdhl);
if (error != sizeof kdhl) {
warn("Error Reading last dump header at offset %lld in %s",
- lasthd, devname);
+ (long long)lasthd, devname);
return;
}
if (kerneldump_parity(&kdhl)) {
@@ -119,7 +119,7 @@ DoFile(const char *devname)
error = read(fd, &kdhf, sizeof kdhf);
if (error != sizeof kdhf) {
warn("Error Reading first dump header at offset %lld in %s",
- firsthd, devname);
+ (long long)firsthd, devname);
return;
}
if (memcmp(&kdhl, &kdhf, sizeof kdhl)) {
OpenPOWER on IntegriCloud