Date: Mon, 5 Oct 2015 08:45:57 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288722 - stable/10/sys/cam/ctl Message-ID: <201510050845.t958jvfV014105@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Mon Oct 5 08:45:56 2015 New Revision: 288722 URL: https://svnweb.freebsd.org/changeset/base/288722 Log: MFC r287221: Fix type bug introduced at r286811. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:44:39 2015 (r288721) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:45:56 2015 (r288722) @@ -1864,8 +1864,8 @@ ctl_be_block_open_dev(struct ctl_be_bloc struct cdev *dev; struct cdevsw *devsw; char *value; - int error, atomic, maxio, unmap; - off_t ps, pss, po, pos, us, uss, uo, uos, tmp; + int error, atomic, maxio, unmap, tmp; + off_t ps, pss, po, pos, us, uss, uo, uos, otmp; params = &be_lun->params; @@ -1931,21 +1931,19 @@ ctl_be_block_open_dev(struct ctl_be_bloc snprintf(req->error_str, sizeof(req->error_str), "requested blocksize %u is not an even " "multiple of backing device blocksize %u", - params->blocksize_bytes, - be_lun->blocksize); + params->blocksize_bytes, tmp); return (EINVAL); } } else if (params->blocksize_bytes != 0) { snprintf(req->error_str, sizeof(req->error_str), "requested blocksize %u < backing device " - "blocksize %u", params->blocksize_bytes, - be_lun->blocksize); + "blocksize %u", params->blocksize_bytes, tmp); return (EINVAL); } else be_lun->blocksize = tmp; - error = devsw->d_ioctl(dev, DIOCGMEDIASIZE, (caddr_t)&tmp, FREAD, + error = devsw->d_ioctl(dev, DIOCGMEDIASIZE, (caddr_t)&otmp, FREAD, curthread); if (error) { snprintf(req->error_str, sizeof(req->error_str), @@ -1956,18 +1954,18 @@ ctl_be_block_open_dev(struct ctl_be_bloc } if (params->lun_size_bytes != 0) { - if (params->lun_size_bytes > tmp) { + if (params->lun_size_bytes > otmp) { snprintf(req->error_str, sizeof(req->error_str), "requested LUN size %ju > backing device " "size %ju", (uintmax_t)params->lun_size_bytes, - (uintmax_t)be_lun->size_bytes); + (uintmax_t)otmp); return (EINVAL); } be_lun->size_bytes = params->lun_size_bytes; } else - be_lun->size_bytes = tmp; + be_lun->size_bytes = otmp; error = devsw->d_ioctl(dev, DIOCGSTRIPESIZE, (caddr_t)&ps, FREAD, curthread);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510050845.t958jvfV014105>