From 261bc801b171143bb61a337ce0e05c370bf4d91f Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sun, 25 Jan 2004 00:52:50 +0000 Subject: Use %lu to print u_long values, not %d or %ld. Fixes display of negative number of sectors for very large (i.e. RAID) disks. Noticed by Marco Peereboom. ok deraadt@. --- sys/scsi/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/scsi') diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 80232384f28..a19c955686e 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.63 2004/01/05 02:57:01 krw Exp $ */ +/* $OpenBSD: sd.c,v 1.64 2004/01/25 00:52:49 krw Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -239,7 +239,7 @@ sdattach(parent, self, aux) printf("%s: ", sd->sc_dev.dv_xname); switch (result) { case SDGP_RESULT_OK: - printf("%ldMB, %d cyl, %d head, %d sec, %d bytes/sec, %ld sec total", + printf("%luMB, %lu cyl, %lu head, %lu sec, %lu bytes/sec, %lu sec total", dp->disksize / (1048576 / dp->blksize), dp->cyls, dp->heads, dp->sectors, dp->blksize, dp->disksize); break; -- cgit v1.2.3