From: Stefan Berger Subject: [PATCH] [qemu-dm] Fix debugging output in tpm tis model Date: Thu, 20 Dec 2007 10:28:41 -0500 Message-ID: <1198164522.13931.6.camel@gsal-3.watson.ibm.com> Reply-To: stefanb@us.ibm.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-hsUrOdJAeRT1vJsgruuh" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: keir@xensource.com List-Id: xen-devel@lists.xenproject.org --=-hsUrOdJAeRT1vJsgruuh Content-Type: text/plain Content-Transfer-Encoding: 7bit This fixes the debugging output. Also I am tweaking on the code trying to establish a connection with the external vTPM. Signed-off-by: Stefan Berger --=-hsUrOdJAeRT1vJsgruuh Content-Disposition: attachment; filename=qemu_dm_tpm_tis_error_msgs_fix.diff Content-Type: text/x-patch; name=qemu_dm_tpm_tis_error_msgs_fix.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit diff -r 741ecee8ccc0 tools/ioemu/hw/tpm_tis.c --- a/tools/ioemu/hw/tpm_tis.c Thu Dec 20 13:48:27 2007 +0000 +++ b/tools/ioemu/hw/tpm_tis.c Thu Dec 20 10:12:11 2007 -0500 @@ -270,11 +270,11 @@ static int create_local_socket(tpmState } #ifdef DEBUG_TPM if (success) - fprintf(logfile,"Successfully connected using local socket " - LOCAL_SOCKET_PATH ".\n"); + fprintf(logfile," Successfully connected using local socket" + "%s.\n",addr.sun_path); else - fprintf(logfile,"Could not connect to local socket " - LOCAL_SOCKET_PATH ".\n"); + fprintf(logfile," Could not connect to local socket " + "%s.\n",addr.sun_path); #endif } else { success = 0; @@ -905,9 +905,10 @@ void tpm_tis_init(SetIRQFunc *set_irq, v register_savevm("tpm-tis", 0, 1, tpm_save, tpm_load, s); + open_vtpm_channel(s); for (c = 0; !IS_COMM_WITH_VTPM(s) && (c < 5); c++) { + sleep(1); open_vtpm_channel(s); - sleep(1); } } --=-hsUrOdJAeRT1vJsgruuh Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-hsUrOdJAeRT1vJsgruuh--