diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-05-22 18:26:53 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-05-22 18:26:53 +0000 |
commit | 37c36500c83a171c585b576e2558334ca8c3879a (patch) | |
tree | 6b6e2e11ab3383af1a26dd82fca2e7dfdce1811c /sys | |
parent | 257d780fb1d028b2f3e3a1bf961370509bd4b1e2 (diff) |
Do not truncate intermediate results computing aiov.iov_len in vndsetcred();
print size_t as unsigned long long.
ok tedu@ miod@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/vnd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 591a52a7860..03739dad91a 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.45 2004/03/04 01:22:50 tedu Exp $ */ +/* $OpenBSD: vnd.c,v 1.46 2004/05/22 18:26:52 otto Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -840,8 +840,8 @@ vndioctl(dev, cmd, addr, flag, p) vnd->sc_flags |= VNF_INITED; #ifdef DEBUG if (vnddebug & VDB_INIT) - printf("vndioctl: SET vp %p size %x\n", - vnd->sc_vp, vnd->sc_size); + printf("vndioctl: SET vp %p size %llx\n", + vnd->sc_vp, (unsigned long long)vnd->sc_size); #endif /* Attach the disk. */ @@ -974,7 +974,7 @@ vndsetcred(vnd, cred) /* XXX: Horrible kludge to establish credentials for NFS */ aiov.iov_base = tmpbuf; - aiov.iov_len = min(DEV_BSIZE, dbtob(vnd->sc_size)); + aiov.iov_len = MIN(DEV_BSIZE, dbtob((off_t)vnd->sc_size)); auio.uio_iov = &aiov; auio.uio_iovcnt = 1; auio.uio_offset = 0; |