aboutsummaryrefslogtreecommitdiff
path: root/sbin/camcontrol/camcontrol.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2019-11-22 15:41:47 +0000
committerAlexander Motin <mav@FreeBSD.org>2019-11-22 15:41:47 +0000
commitf97cf1a168d012b8642f6296a824c687e4b3bfb2 (patch)
tree373eb1bd515be2a3fd80a8488c5e47069774631e /sbin/camcontrol/camcontrol.c
parent86d0c432a6cf281711887f115fe8b62cc840c157 (diff)
downloadsrc-f97cf1a168d012b8642f6296a824c687e4b3bfb2.tar.gz
src-f97cf1a168d012b8642f6296a824c687e4b3bfb2.zip
Fix off-by-one error in HPA/AMA maximum reporting.
Before my refactoring the code reported value as maximum number of sectors, adding one to the maximum sector number returned by respective command. While this difference is somewhat confusing, restore previous behavior. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=354999
Diffstat (limited to 'sbin/camcontrol/camcontrol.c')
-rw-r--r--sbin/camcontrol/camcontrol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c
index ca9fa6aacac3..a3763e1ee352 100644
--- a/sbin/camcontrol/camcontrol.c
+++ b/sbin/camcontrol/camcontrol.c
@@ -1961,7 +1961,7 @@ atahpa_proc_resp(struct cam_device *device, union ccb *ccb, u_int64_t *hpasize)
if (hpasize != NULL) {
if (retval == 2 || retval == 6)
return (1);
- *hpasize = lba;
+ *hpasize = lba + 1;
}
return (0);