# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1236856125 0
# Node ID b3b6aee082d604a980e50ee10d638b712028bf55
# Parent 1ad8216abda5487c2d53c1a713f2ff68b95c06cd
xend: Skip tap pipe creation on Solaris
Signed-off-by: John Levon <john.levon@xxxxxxx>
---
tools/python/xen/xend/image.py | 31 ++++++++++++++-----------------
1 files changed, 14 insertions(+), 17 deletions(-)
diff -r 1ad8216abda5 -r b3b6aee082d6 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py Thu Mar 12 11:07:34 2009 +0000
+++ b/tools/python/xen/xend/image.py Thu Mar 12 11:08:45 2009 +0000
@@ -28,6 +28,7 @@ import errno
import errno
import glob
import traceback
+import platform
import xen.lowlevel.xc
from xen.xend.XendConstants import *
@@ -227,23 +228,19 @@ class ImageHandler:
if self.device_model is None:
return
- # If we use a device model, the pipes for communication between
- # blktapctrl and ioemu must be present before the devices are
- # created (blktapctrl must access them for new block devices)
-
- # mkdir throws an exception if the path already exists
- try:
- os.mkdir('/var/run/tap', 0755)
- except:
- pass
-
- try:
- os.mkfifo('/var/run/tap/qemu-read-%d' % domid, 0600)
- os.mkfifo('/var/run/tap/qemu-write-%d' % domid, 0600)
- except OSError, e:
- log.warn('Could not create blktap pipes for domain %d' % domid)
- log.exception(e)
- pass
+ if platform.system() != 'SunOS':
+ # If we use a device model, the pipes for communication between
+ # blktapctrl and ioemu must be present before the devices are
+ # created (blktapctrl must access them for new block devices)
+ os.makedirs('/var/run/tap', 0755)
+
+ try:
+ os.mkfifo('/var/run/tap/qemu-read-%d' % domid, 0600)
+ os.mkfifo('/var/run/tap/qemu-write-%d' % domid, 0600)
+ except OSError, e:
+ log.warn('Could not create blktap pipes for domain %d' % domid)
+ log.exception(e)
+ pass
# Return a list of cmd line args to the device models based on the
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|