From owner-svn-src-head@freebsd.org Thu Jul 27 05:31:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00C54DC21BC; Thu, 27 Jul 2017 05:31:50 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2843679D1; Thu, 27 Jul 2017 05:31:49 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6R5Vmcv095835; Thu, 27 Jul 2017 05:31:48 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6R5Vmg2095834; Thu, 27 Jul 2017 05:31:48 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201707270531.v6R5Vmg2095834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Thu, 27 Jul 2017 05:31:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321604 - head/usr.sbin/mpsutil X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/usr.sbin/mpsutil X-SVN-Commit-Revision: 321604 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jul 2017 05:31:50 -0000 Author: scottl Date: Thu Jul 27 05:31:48 2017 New Revision: 321604 URL: https://svnweb.freebsd.org/changeset/base/321604 Log: Fix some broken logic used in obtaining the certain config pages. I'm surprised that this even pretended to work. PR: 215793 Submitted by: longwitz@incore.de Modified: head/usr.sbin/mpsutil/mps_cmd.c Modified: head/usr.sbin/mpsutil/mps_cmd.c ============================================================================== --- head/usr.sbin/mpsutil/mps_cmd.c Thu Jul 27 02:53:18 2017 (r321603) +++ head/usr.sbin/mpsutil/mps_cmd.c Thu Jul 27 05:31:48 2017 (r321604) @@ -365,8 +365,7 @@ mps_read_config_page(int fd, U8 PageType, U8 PageNumbe req.Action = MPI2_CONFIG_ACTION_PAGE_READ_CURRENT; req.PageAddress = PageAddress; req.Header = header; - req.Header.PageLength = reply.Header.PageLength; - if (reply.Header.PageLength == 0) + if (req.Header.PageLength == 0) req.Header.PageLength = 4; len = req.Header.PageLength * 4;