diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-06-07 05:00:24 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-06-07 05:00:24 +0000 |
commit | a13a4b22d9f8a54490b77788dba5cef2a5e1337e (patch) | |
tree | 33cfbb87f337430ca3c5ec69f4beff712125831f /sbin/disklabel | |
parent | f3edbcb469d377898bb38c461596f7cbac959370 (diff) |
off_t cleanup
Diffstat (limited to 'sbin/disklabel')
-rw-r--r-- | sbin/disklabel/disklabel.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index 220ff432e04..f4209806e7d 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.c,v 1.52 1998/05/07 16:39:35 millert Exp $ */ +/* $OpenBSD: disklabel.c,v 1.53 1998/06/07 05:00:23 deraadt Exp $ */ /* $NetBSD: disklabel.c,v 1.30 1996/03/14 19:49:24 ghudson Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #endif /* not lint */ #ifndef lint -static char rcsid[] = "$OpenBSD: disklabel.c,v 1.52 1998/05/07 16:39:35 millert Exp $"; +static char rcsid[] = "$OpenBSD: disklabel.c,v 1.53 1998/06/07 05:00:23 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -413,7 +413,8 @@ writelabel(f, boot, lp) (dosdp->dp_typ == DOSPTYP_OPENBSD || dosdp->dp_typ == DOSPTYP_FREEBSD || dosdp->dp_typ == DOSPTYP_NETBSD)) { - sectoffset = get_le(&dosdp->dp_start) * lp->d_secsize; + sectoffset = (off_t)get_le(&dosdp->dp_start) * + lp->d_secsize; } else { if (dosdp) { int first, ch; @@ -468,9 +469,9 @@ writelabel(f, boot, lp) } } if (verbose) - printf("writing label to block %d (0x%x)\n", - (int)sectoffset/DEV_BSIZE, - (int)sectoffset/DEV_BSIZE); + printf("writing label to block %qd (0x%qx)\n", + sectoffset/DEV_BSIZE, + sectoffset/DEV_BSIZE); if (!donothing) { if (lseek(f, sectoffset, SEEK_SET) < 0) { perror("lseek"); @@ -667,12 +668,13 @@ readlabel(f) (dosdp->dp_typ == DOSPTYP_OPENBSD || dosdp->dp_typ == DOSPTYP_FREEBSD || dosdp->dp_typ == DOSPTYP_NETBSD)) - sectoffset = get_le(&dosdp->dp_start) * DEV_BSIZE; + sectoffset = (off_t)get_le(&dosdp->dp_start) * + DEV_BSIZE; #endif if (verbose) - printf("reading label from block %d, offset %d\n", - (int)sectoffset/DEV_BSIZE, - (int)sectoffset/DEV_BSIZE + + printf("reading label from block %qd, offset %qd\n", + sectoffset/DEV_BSIZE, + sectoffset/DEV_BSIZE + (LABELSECTOR * DEV_BSIZE) + LABELOFFSET); if (lseek(f, sectoffset, SEEK_SET) < 0 || read(f, bootarea, BBSIZE) < BBSIZE) |