xencommons: write domain 0's domid to xenstore
authorMatthew Daley <mattjd@gmail.com>
Thu, 31 Oct 2013 06:03:55 +0000 (19:03 +1300)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 31 Oct 2013 20:59:34 +0000 (20:59 +0000)
libvchan's init_xs_srv (server-side xenstore-related initialization)
expects to find the current domain's domid at this xenstore key. libxl
(and xend) write this for domains they create. Do the same for domain 0,
allowing the use of libvchan in dom0.

Signed-off-by: Matthew Daley <mattjd@gmail.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/hotplug/Linux/init.d/xencommons
tools/hotplug/NetBSD/rc.d/xencommons

index a2e633b27a4450d45af51bffc650620570cccb48..4ebd636cc0814d6bd9321f9bec0672d4621772db 100644 (file)
@@ -108,8 +108,9 @@ do_start () {
                    exit 1
                fi
 
-               echo Setting domain 0 name...
+               echo Setting domain 0 name and domid...
                ${BINDIR}/xenstore-write "/local/domain/0/name" "Domain-0"
+               ${BINDIR}/xenstore-write "/local/domain/0/domid" 0
        fi
 
        echo Starting xenconsoled...
index fe4c9acec359eeff3c7e0a0aef33a13755af1031..b1c353100dab49fcff0a693695865f030907029c 100644 (file)
@@ -68,8 +68,9 @@ xen_startcmd()
 
        printf "\n"
 
-       printf "Setting domain 0 name.\n"
+       printf "Setting domain 0 name and domid.\n"
        ${BINDIR}/xenstore-write "/local/domain/0/name" "Domain-0"
+       ${BINDIR}/xenstore-write "/local/domain/0/domid" 0
 }
 
 xen_stop()