Skip to contentSkip to conversation

Fix debugging output in tpm tis model

PATCH New Stefan Berger 1 participant 1 message Dec 20, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix debugging output in tpm tis model

This fixes the debugging output.
Also I am tweaking on the code trying to establish a connection with the external vTPM.

tools/ioemu/hw/tpm_tis.c +6 -5
diff -r 741ecee8ccc0 tools/ioemu/hw/tpm_tis.c
@@ -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);
     }
 }
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel