Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Nov 2019 03:39:14 +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-11@freebsd.org
Subject:   svn commit: r355079 - stable/11/sbin/camcontrol
Message-ID:  <201911250339.xAP3dEgt088925@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Nov 25 03:39:13 2019
New Revision: 355079
URL: https://svnweb.freebsd.org/changeset/base/355079

Log:
  MFC r354999: 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.

Modified:
  stable/11/sbin/camcontrol/camcontrol.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/camcontrol/camcontrol.c
==============================================================================
--- stable/11/sbin/camcontrol/camcontrol.c	Mon Nov 25 03:38:49 2019	(r355078)
+++ stable/11/sbin/camcontrol/camcontrol.c	Mon Nov 25 03:39:13 2019	(r355079)
@@ -1813,7 +1813,7 @@ atahpa_proc_resp(struct cam_device *device, union ccb 
 	if (hpasize != NULL) {
 		if (retval == 2 || retval == 6)
 			return (1);
-		*hpasize = lba;
+		*hpasize = lba + 1;
 	}
 
 	return (0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911250339.xAP3dEgt088925>