summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-04-18 20:27:16 +0000
committerphk <phk@FreeBSD.org>2003-04-18 20:27:16 +0000
commit543c59f2fd99a5268f613ada6b324420ebc3039e (patch)
tree140750c2495829f9195b923751c8bad8a2e2ff49 /sbin
parent625dc6b51aaf5929beb1e69b13463b77081d7355 (diff)
downloadFreeBSD-src-543c59f2fd99a5268f613ada6b324420ebc3039e.zip
FreeBSD-src-543c59f2fd99a5268f613ada6b324420ebc3039e.tar.gz
Solve printf/cast issues to make this compile in i386 as well.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/sunlabel/sunlabel.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/sunlabel/sunlabel.c b/sbin/sunlabel/sunlabel.c
index 99a2620..1bd2fa7 100644
--- a/sbin/sunlabel/sunlabel.c
+++ b/sbin/sunlabel/sunlabel.c
@@ -296,17 +296,17 @@ read_label(struct sun_disklabel *sl, const char *disk)
sl->sl_part[2].sdkp_cyloffset = 0;
sl->sl_part[2].sdkp_nsectors = sl->sl_ncylinders *
sl->sl_ntracks * sl->sl_nsectors;
- if (mediasize > 4999L * 1024L * 1024L) {
+ if (mediasize > (off_t)4999L * 1024L * 1024L) {
sprintf(sl->sl_text,
- "FreeBSD%luG cyl %u alt %u hd %u sec %u",
- (mediasize + 512 * 1024 * 1024) /
+ "FreeBSD%jdG cyl %u alt %u hd %u sec %u",
+ (intmax_t)(mediasize + 512 * 1024 * 1024) /
(1024 * 1024 * 1024),
sl->sl_ncylinders, sl->sl_acylinders,
sl->sl_ntracks, sl->sl_nsectors);
} else {
sprintf(sl->sl_text,
- "FreeBSD%luM cyl %u alt %u hd %u sec %u",
- (mediasize + 512 * 1024) / (1024 * 1024),
+ "FreeBSD%jdM cyl %u alt %u hd %u sec %u",
+ (intmax_t)(mediasize + 512 * 1024) / (1024 * 1024),
sl->sl_ncylinders, sl->sl_acylinders,
sl->sl_ntracks, sl->sl_nsectors);
}
OpenPOWER on IntegriCloud