WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [TPM] Adds a script for virtual TPM suppo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [TPM] Adds a script for virtual TPM support.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 30 Jun 2006 15:40:49 +0000
Delivery-date: Fri, 30 Jun 2006 08:46:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID d095e99392ac77f10449cb78a56f7d133bc0450f
# Parent  5d565bb1278301a27aa42278dcdb9093ab12bd1e
[TPM] Adds a script for virtual TPM support.

It also removes a consistency check from the vtpm-common script file.

Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
---
 tools/python/xen/util/dictio.py |   50 ----------------------------------------
 tools/examples/Makefile         |    2 -
 tools/examples/vtpm-addtodb     |   10 ++++++++
 tools/examples/vtpm-common.sh   |   13 ++--------
 4 files changed, 14 insertions(+), 61 deletions(-)

diff -r 5d565bb12783 -r d095e99392ac tools/examples/Makefile
--- a/tools/examples/Makefile   Fri Jun 30 10:14:36 2006 +0100
+++ b/tools/examples/Makefile   Fri Jun 30 10:16:12 2006 +0100
@@ -26,7 +26,7 @@ XEN_SCRIPTS += network-nat vif-nat
 XEN_SCRIPTS += network-nat vif-nat
 XEN_SCRIPTS += block
 XEN_SCRIPTS += block-enbd block-nbd
-XEN_SCRIPTS += vtpm vtpm-delete
+XEN_SCRIPTS += vtpm vtpm-delete vtpm-addtodb
 XEN_SCRIPTS += xen-hotplug-cleanup
 XEN_SCRIPTS += external-device-migrate
 XEN_SCRIPT_DATA = xen-script-common.sh locking.sh logging.sh
diff -r 5d565bb12783 -r d095e99392ac tools/examples/vtpm-common.sh
--- a/tools/examples/vtpm-common.sh     Fri Jun 30 10:14:36 2006 +0100
+++ b/tools/examples/vtpm-common.sh     Fri Jun 30 10:16:12 2006 +0100
@@ -347,16 +347,9 @@ function isLocalAddress() {
 # 2nd: name of the domain to migrate
 # 3rd: the migration step to perform
 function vtpm_migration_step() {
-       local instance res
-       instance=$(vtpmdb_find_instance $2)
-       if [ "$instance" == "" ]; then
-               echo "Error: Translation of domain name ($2) to instance 
failed. Check /etc/xen/vtpm.db"
-               log err "Error during translation of domain name"
-       else
-               res=$(isLocalAddress $1)
-               if [ "$res" == "0" ]; then
-                       vtpm_migrate $1 $2 $3
-               fi
+       local res=$(isLocalAddress $1)
+       if [ "$res" == "0" ]; then
+               vtpm_migrate $1 $2 $3
        fi
 }
 
diff -r 5d565bb12783 -r d095e99392ac tools/examples/vtpm-addtodb
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/examples/vtpm-addtodb       Fri Jun 30 10:16:12 2006 +0100
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# This script must be called with the following parameters to have
+# an entry added to the TPM-to-domain associations table in /etc/xen/vtpm.db
+# vtpm-addtodb <dom name> <instance number>
+
+dir=$(dirname "$0")
+. "$dir/vtpm-common.sh"
+
+vtpmdb_add_instance $1 $2
diff -r 5d565bb12783 -r d095e99392ac tools/python/xen/util/dictio.py
--- a/tools/python/xen/util/dictio.py   Fri Jun 30 10:14:36 2006 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-#===========================================================================
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of version 2.1 of the GNU Lesser General Public
-# License as published by the Free Software Foundation.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-#============================================================================
-# Copyright (C) 2006 International Business Machines Corp.
-# Author: Bryan D. Payne <bdpayne@xxxxxxxxxx>
-#============================================================================
-
-
-def dict_read(dictname, filename):
-    """Loads <filename> and returns the dictionary named <dictname> from
-       the file.
-    """
-    dict = {}
-
-    # read in the config file
-    globs = {}
-    locs = {}
-    execfile(filename, globs, locs)
-
-    for (k, v) in locs.items():
-        if k == dictname:
-            dict = v
-            break
-
-    return dict
-
-def dict_write(dict, dictname, filename):
-    """Writes <dict> to <filename> using the name <dictname>.  If the file
-       contains any other data, it will be overwritten.
-    """
-    prefix = dictname + " = {\n"
-    suffix = "}\n"
-    fd = open(filename, "wb")
-    fd.write(prefix)
-    for key in dict:
-        line = "    '" + str(key) + "': " + str(dict[key]) + ",\n"
-        fd.write(line)
-    fd.write(suffix)
-    fd.close()

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [TPM] Adds a script for virtual TPM support., Xen patchbot-unstable <=