]> git.pld-linux.org Git - packages/xen.git/commitdiff
Fix xen scripts locking
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Fri, 9 Nov 2012 13:57:27 +0000 (14:57 +0100)
committerJacek Konieczny <jajcus@jajcus.net>
Fri, 9 Nov 2012 13:57:27 +0000 (14:57 +0100)
xen-scripts-locking.patch [new file with mode: 0644]
xen.spec

diff --git a/xen-scripts-locking.patch b/xen-scripts-locking.patch
new file mode 100644 (file)
index 0000000..9dd0f4f
--- /dev/null
@@ -0,0 +1,28 @@
+commit a4ef9c9753467ae2eaeff858bcb63a5ba5337d18
+Author: Jacek Konieczny <jajcus@jajcus.net>
+Date:   Fri Nov 9 14:47:40 2012 +0100
+
+    Fix locking in tools/hotplug/Linux/locking.sh
+    
+    The claim_lock() function would fail in the perl code with:
+    
+      Invalid argument at -e line 2.
+    
+    because the Perl snippet opens for reading the file descriptor, which
+    was earlier opened for write (append).
+    
+    Signed-off-by: Jacek Konieczny <jajcus@jajcus.net>
+
+diff --git a/tools/hotplug/Linux/locking.sh b/tools/hotplug/Linux/locking.sh
+index 0e2a531..5c4f365 100644
+--- a/tools/hotplug/Linux/locking.sh
++++ b/tools/hotplug/Linux/locking.sh
+@@ -44,7 +44,7 @@ claim_lock()
+     # See below for a correctness proof.
+     local rightfile
+     while true; do
+-        eval "exec $_lockfd>>$_lockfile"
++        eval "exec $_lockfd<>$_lockfile"
+         flock -x $_lockfd || return $?
+         # We can't just stat /dev/stdin or /proc/self/fd/$_lockfd or
+         # use bash's test -ef because those all go through what is
index 108dd1ff4b1761a44b407daee25277283d6f6262..c0cf753f2c2d51998128f96cbcb5420c536eb4f5 100644 (file)
--- a/xen.spec
+++ b/xen.spec
@@ -85,6 +85,7 @@ Patch8:               xen-configure-xend.patch
 Patch9:                xen-initscript.patch
 Patch10:       xen-quemu-softloat-c99.patch
 Patch11:       xen-qemu.patch
+Patch12:       xen-scripts-locking.patch
 URL:           http://www.xen.org/products/xenhyp.html
 %{?with_opengl:BuildRequires:  OpenGL-devel}
 %{?with_sdl:BuildRequires:     SDL-devel >= 1.2.1}
@@ -369,6 +370,7 @@ Nadzorca Xen w postaci, która może być uruchomiona wprost z firmware
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
+%patch12 -p1
 
 # stubdom sources
 ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom
This page took 0.179464 seconds and 4 git commands to generate.