From: Jarkko Sakkinen Subject: Re: [PATCH] tpm: Add sysfs interface to show TPM family version Date: Mon, 13 Mar 2017 20:35:46 +0200 Message-ID: <20170313183546.fvsyaq2l52hd3coq@intel.com> References: <1489396817-24855-1-git-send-email-Meng.Li@windriver.com> <20170313115415.2czyr4woaq4h3ncr@intel.com> <529F9A9100AE8045A7A5B5A00A39FBB83DE9325F@ALA-MBC.corp.ad.wrs.com> <20170313145958.zoh2fdxnh3ytyr2z@intel.com> <20170313165547.GB25664@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20170313165547.GB25664-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Jason Gunthorpe Cc: "Li, Meng" , "tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: tpmdd-devel@lists.sourceforge.net On Mon, Mar 13, 2017 at 10:55:47AM -0600, Jason Gunthorpe wrote: > On Mon, Mar 13, 2017 at 04:59:58PM +0200, Jarkko Sakkinen wrote: > > if (chip->flags & TPM_CHIP_FLAG_TPM2) > > ret = sprintf(buf, "TPM 2.0"); > > else > > ret = sprintf(buf, "TPM 1.x"); > > And 1.x should be 1.2 or 1.1 > > Jason Or maybe just create a patch that adds "family_major", which prints 1 or 2. That is sufficient to pick the right daemon in the user space for example. /Jarkko ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot