diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-05-07 16:39:36 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-05-07 16:39:36 +0000 |
commit | c16d381f9fa78f4c3fd43daa8a33cddf6e422fed (patch) | |
tree | f0df2b4416a64fdb839c48a9ecba0ab0d73b948c /sbin | |
parent | e223554c2914e7fdebab8dcb99925a312e23cd93 (diff) |
In -v mode print label offset in addition to the block number.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/disklabel/disklabel.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index 9e7fe609530..220ff432e04 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.c,v 1.51 1998/04/25 07:17:12 deraadt Exp $ */ +/* $OpenBSD: disklabel.c,v 1.52 1998/05/07 16:39:35 millert 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.51 1998/04/25 07:17:12 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: disklabel.c,v 1.52 1998/05/07 16:39:35 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -670,9 +670,10 @@ readlabel(f) sectoffset = get_le(&dosdp->dp_start) * DEV_BSIZE; #endif if (verbose) - printf("reading label from block %d (0x%x)\n", + printf("reading label from block %d, offset %d\n", (int)sectoffset/DEV_BSIZE, - (int)sectoffset/DEV_BSIZE); + (int)sectoffset/DEV_BSIZE + + (LABELSECTOR * DEV_BSIZE) + LABELOFFSET); if (lseek(f, sectoffset, SEEK_SET) < 0 || read(f, bootarea, BBSIZE) < BBSIZE) err(4, "%s", specname); |