aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Swälas <linus.swalas@borderless.se>2016-10-05 23:09:45 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2016-10-21 14:22:29 +0200
commitb282e4fbccb2759d3d0306e35fae749419713410 (patch)
tree760bca1e38582c7437cc307de0da04c224b3e4a8
parent3c169888cd240b30f8bef7da37c504131e66c540 (diff)
downloadalpine_aports-b282e4fbccb2759d3d0306e35fae749419713410.tar.bz2
alpine_aports-b282e4fbccb2759d3d0306e35fae749419713410.tar.xz
alpine_aports-b282e4fbccb2759d3d0306e35fae749419713410.zip
main/xen: Fixes for missing transaction in xenstore_client.c.
Recent kernel updates makes xenstore-read return ESRCH due to not having a transaction in progress when talking to xenbus, this makes sure that a transaction is always in place.
-rw-r--r--main/xen/APKBUILD7
-rw-r--r--main/xen/APKBUILD.orig456
-rw-r--r--main/xen/xenstore_client_transaction_fix.patch144
3 files changed, 605 insertions, 2 deletions
diff --git a/main/xen/APKBUILD b/main/xen/APKBUILD
index 22fe19a8c5..ad36b07a6c 100644
--- a/main/xen/APKBUILD
+++ b/main/xen/APKBUILD
@@ -3,7 +3,7 @@
3# Maintainer: William Pitcock <nenolod@dereferenced.org> 3# Maintainer: William Pitcock <nenolod@dereferenced.org>
4pkgname=xen 4pkgname=xen
5pkgver=4.6.3 5pkgver=4.6.3
6pkgrel=2 6pkgrel=3
7pkgdesc="Xen hypervisor" 7pkgdesc="Xen hypervisor"
8url="http://www.xen.org/" 8url="http://www.xen.org/"
9arch="x86_64" 9arch="x86_64"
@@ -62,7 +62,7 @@ source="http://bits.xensource.com/oss-xen/release/$pkgver/$pkgname-$pkgver.tar.g
62 xsa187-4.7-0001-x86-shadow-Avoid-overflowing-sh_ctxt-seg.patch 62 xsa187-4.7-0001-x86-shadow-Avoid-overflowing-sh_ctxt-seg.patch
63 xsa187-4.6-0002-x86-segment-Bounds-check-accesses-to-emulation-ctx.patch 63 xsa187-4.6-0002-x86-segment-Bounds-check-accesses-to-emulation-ctx.patch
64 64
65 65 xenstore_client_transaction_fix.patch
66 qemu-coroutine-gthread.patch 66 qemu-coroutine-gthread.patch
67 qemu-xen_paths.patch 67 qemu-xen_paths.patch
68 68
@@ -266,6 +266,7 @@ cc0904605d03a9e4f6f21d16824e41c9 xsa184-qemuu-master.patch
2663d812cf9ccc8443874b36e061392d388 xsa186-4.6-0002-hvm-fep-Allow-testing-of-instructions-crossing-the.patch 2663d812cf9ccc8443874b36e061392d388 xsa186-4.6-0002-hvm-fep-Allow-testing-of-instructions-crossing-the.patch
267c426383254acdcbb9466bbec2d6f8d9b xsa187-4.7-0001-x86-shadow-Avoid-overflowing-sh_ctxt-seg.patch 267c426383254acdcbb9466bbec2d6f8d9b xsa187-4.7-0001-x86-shadow-Avoid-overflowing-sh_ctxt-seg.patch
268a98c0fa2579965d72272f381f193195d xsa187-4.6-0002-x86-segment-Bounds-check-accesses-to-emulation-ctx.patch 268a98c0fa2579965d72272f381f193195d xsa187-4.6-0002-x86-segment-Bounds-check-accesses-to-emulation-ctx.patch
269b05500e9fdcec5a076ab8817fc313ac3 xenstore_client_transaction_fix.patch
269de1a3db370b87cfb0bddb51796b50315 qemu-coroutine-gthread.patch 270de1a3db370b87cfb0bddb51796b50315 qemu-coroutine-gthread.patch
27008bfdf8caff5d631f53660bf3fd4edaf qemu-xen_paths.patch 27108bfdf8caff5d631f53660bf3fd4edaf qemu-xen_paths.patch
271e449bb3359b490804ffc7b0ae08d62a0 hotplug-vif-vtrill.patch 272e449bb3359b490804ffc7b0ae08d62a0 hotplug-vif-vtrill.patch
@@ -306,6 +307,7 @@ f2082a36d968a47e477bb5082d0e0aaa58e6cb3dc20b26389f043a9b7b595fa6 xsa186-0001-x8
3067482a823c3443e26dee1111c4904162845eaa9f826aa7bf8348007406d91bddd xsa186-4.6-0002-hvm-fep-Allow-testing-of-instructions-crossing-the.patch 3077482a823c3443e26dee1111c4904162845eaa9f826aa7bf8348007406d91bddd xsa186-4.6-0002-hvm-fep-Allow-testing-of-instructions-crossing-the.patch
307be9fe85d36c2c1fbca246c1f4d834c3ef11b6ab3d5467da0ac8c079aa5a68de9 xsa187-4.7-0001-x86-shadow-Avoid-overflowing-sh_ctxt-seg.patch 308be9fe85d36c2c1fbca246c1f4d834c3ef11b6ab3d5467da0ac8c079aa5a68de9 xsa187-4.7-0001-x86-shadow-Avoid-overflowing-sh_ctxt-seg.patch
308b96731379ea77d49ffff31d969f4742dde985ef7a86af9422dcac8327c2a1916 xsa187-4.6-0002-x86-segment-Bounds-check-accesses-to-emulation-ctx.patch 309b96731379ea77d49ffff31d969f4742dde985ef7a86af9422dcac8327c2a1916 xsa187-4.6-0002-x86-segment-Bounds-check-accesses-to-emulation-ctx.patch
310c9691bd43a87a939d9a883279813c405eb5ac428a4f4f89e8eef01fbb4d2d6d1 xenstore_client_transaction_fix.patch
3093941f99b49c7e8dafc9fae8aad2136a14c6d84533cd542cc5f1040a41ef7c6fe qemu-coroutine-gthread.patch 3113941f99b49c7e8dafc9fae8aad2136a14c6d84533cd542cc5f1040a41ef7c6fe qemu-coroutine-gthread.patch
310e4e5e838e259a3116978aabbcebc1865a895179a7fcbf4bad195c83e9b4c0f98 qemu-xen_paths.patch 312e4e5e838e259a3116978aabbcebc1865a895179a7fcbf4bad195c83e9b4c0f98 qemu-xen_paths.patch
311dd1e784bc455eb62cb85b3fa24bfc34f575ceaab9597ef6a2f1ee7ff7b3cae0a hotplug-vif-vtrill.patch 313dd1e784bc455eb62cb85b3fa24bfc34f575ceaab9597ef6a2f1ee7ff7b3cae0a hotplug-vif-vtrill.patch
@@ -346,6 +348,7 @@ bf899dde20cee730598b90e0a07941155b20e0ea17b9a3017a53bd0e1495fb6e5dc251934e01d029
3466583c843855d300b3d40321d909b64ab0df6b03da62b3400cb7e58a9249077112e5951e14449880cfc8d593dabd9afcffc15ff77555f745b478f7af939b3219e xsa186-4.6-0002-hvm-fep-Allow-testing-of-instructions-crossing-the.patch 3486583c843855d300b3d40321d909b64ab0df6b03da62b3400cb7e58a9249077112e5951e14449880cfc8d593dabd9afcffc15ff77555f745b478f7af939b3219e xsa186-4.6-0002-hvm-fep-Allow-testing-of-instructions-crossing-the.patch
347d85bc3c56805ff5b3df6b85b2b34ff97d15fe254fc5a873b5c43c2c15564eea42753723a6296292a543e7b7dc83ad71f0fafe01fa6a6ebf82fa0a7268fc67486 xsa187-4.7-0001-x86-shadow-Avoid-overflowing-sh_ctxt-seg.patch 349d85bc3c56805ff5b3df6b85b2b34ff97d15fe254fc5a873b5c43c2c15564eea42753723a6296292a543e7b7dc83ad71f0fafe01fa6a6ebf82fa0a7268fc67486 xsa187-4.7-0001-x86-shadow-Avoid-overflowing-sh_ctxt-seg.patch
34863f30d4a6842fc516d33334b25806e10a89228fec32315df27c9c271303d02619be4a88e638e41920ad808215280c3fce697574d05c5fb3f184844069383a201 xsa187-4.6-0002-x86-segment-Bounds-check-accesses-to-emulation-ctx.patch 35063f30d4a6842fc516d33334b25806e10a89228fec32315df27c9c271303d02619be4a88e638e41920ad808215280c3fce697574d05c5fb3f184844069383a201 xsa187-4.6-0002-x86-segment-Bounds-check-accesses-to-emulation-ctx.patch
35169dfa60628ca838678862383528654ecbdf4269cbb5c9cfb6b84d976202a8dea85d711aa65a52fa1b477fb0b30604ca70cf1337192d6fb9388a08bbe7fe56077 xenstore_client_transaction_fix.patch
349c3c46f232f0bd9f767b232af7e8ce910a6166b126bd5427bb8dc325aeb2c634b956de3fc225cab5af72649070c8205cc8e1cab7689fc266c204f525086f1a562 qemu-coroutine-gthread.patch 352c3c46f232f0bd9f767b232af7e8ce910a6166b126bd5427bb8dc325aeb2c634b956de3fc225cab5af72649070c8205cc8e1cab7689fc266c204f525086f1a562 qemu-coroutine-gthread.patch
3501936ab39a1867957fa640eb81c4070214ca4856a2743ba7e49c0cd017917071a9680d015f002c57fa7b9600dbadd29dcea5887f50e6c133305df2669a7a933f3 qemu-xen_paths.patch 3531936ab39a1867957fa640eb81c4070214ca4856a2743ba7e49c0cd017917071a9680d015f002c57fa7b9600dbadd29dcea5887f50e6c133305df2669a7a933f3 qemu-xen_paths.patch
351f095ea373f36381491ad36f0662fb4f53665031973721256b23166e596318581da7cbb0146d0beb2446729adfdb321e01468e377793f6563a67d68b8b0f7ffe3 hotplug-vif-vtrill.patch 354f095ea373f36381491ad36f0662fb4f53665031973721256b23166e596318581da7cbb0146d0beb2446729adfdb321e01468e377793f6563a67d68b8b0f7ffe3 hotplug-vif-vtrill.patch
diff --git a/main/xen/APKBUILD.orig b/main/xen/APKBUILD.orig
new file mode 100644
index 0000000000..a6733fa978
--- /dev/null
+++ b/main/xen/APKBUILD.orig
@@ -0,0 +1,456 @@
1# Contributor: William Pitcock <nenolod@dereferenced.org>
2# Contributor: Roger Pau Monne <roger.pau@entel.upc.edu>
3# Maintainer: William Pitcock <nenolod@dereferenced.org>
4pkgname=xen
5pkgver=4.7.0
6pkgrel=4
7pkgdesc="Xen hypervisor"
8url="http://www.xen.org/"
9arch="x86_64 armhf"
10license="GPL"
11depends="bash iproute2 logrotate"
12depends_dev="libressl-dev python-dev e2fsprogs-dev gettext zlib-dev ncurses-dev
13 dev86 texinfo perl pciutils-dev glib-dev yajl-dev libnl3-dev
14 spice-dev gnutls-dev curl-dev libaio-dev lzo-dev xz-dev util-linux-dev
15 e2fsprogs-dev linux-headers argp-standalone"
16makedepends="$depends_dev autoconf automake libtool "
17
18# secfixes:
19# 4.7.0-r0:
20# - CVE-2016-6258 XSA-182
21# - CVE-2016-6259 XSA-183
22# - CVE-2016-5403 XSA-184
23# 4.7.0-r1:
24# - CVE-2016-7092 XSA-185
25# - CVE-2016-7093 XSA-186
26# - CVE-2016-7094 XSA-187
27
28case "$CARCH" in
29x86*)
30 depends="$depends syslinux"
31 makedepends="$makedepends iasl seabios-bin"
32 ;;
33arm*)
34 makedepends="$makedepends dtc-dev"
35 ;;
36esac
37
38install=""
39
40if [ "$CARCH" != "armhf" ]; then
41 subpackages="$pkgname-dbg"
42fi
43subpackages="$subpackages $pkgname-doc $pkgname-dev $pkgname-libs $pkgname-hypervisor"
44
45# grep _VERSION= stubdom/configure
46_ZLIB_VERSION="1.2.3"
47_LIBPCI_VERSION="2.2.9"
48_NEWLIB_VERSION="1.16.0"
49_LWIP_VERSION="1.3.0"
50_GRUB_VERSION="0.97"
51_OCAML_VERSION="3.11.0"
52_GMP_VERSION="4.3.2"
53_POLARSSL_VERSION="1.1.4"
54_TPMEMU_VERSION="0.7.4"
55
56# grep ^IPXE_GIT_TAG tools/firmware/etherboot/Makefile
57_IPXE_GIT_TAG=9a93db3f0947484e30e753bbd61a10b17336e20e
58
59source="http://bits.xensource.com/oss-xen/release/$pkgver/$pkgname-$pkgver.tar.gz
60 http://xenbits.xen.org/xen-extfiles/gmp-$_GMP_VERSION.tar.bz2
61 http://xenbits.xen.org/xen-extfiles/grub-$_GRUB_VERSION.tar.gz
62 http://xenbits.xen.org/xen-extfiles/lwip-$_LWIP_VERSION.tar.gz
63 http://xenbits.xen.org/xen-extfiles/newlib-$_NEWLIB_VERSION.tar.gz
64 http://xenbits.xen.org/xen-extfiles/pciutils-$_LIBPCI_VERSION.tar.bz2
65 http://xenbits.xen.org/xen-extfiles/polarssl-$_POLARSSL_VERSION-gpl.tgz
66 http://xenbits.xen.org/xen-extfiles/tpm_emulator-$_TPMEMU_VERSION.tar.gz
67 http://xenbits.xen.org/xen-extfiles/zlib-$_ZLIB_VERSION.tar.gz
68 http://xenbits.xen.org/xen-extfiles/ipxe-git-$_IPXE_GIT_TAG.tar.gz
69
70 xsa182-unstable.patch
71 xsa183-unstable.patch
72 xsa184-qemut-master.patch
73 xsa184-qemuu-master.patch
74 xsa185.patch
75 xsa186-0001-x86-emulate-Correct-boundary-interactions-of-emulate.patch
76 xsa186-4.7-0002-hvm-fep-Allow-testing-of-instructions-crossing-the.patch
77 xsa187-4.7-0001-x86-shadow-Avoid-overflowing-sh_ctxt-seg.patch
78 xsa187-4.7-0002-x86-segment-Bounds-check-accesses-to-emulation-ctx.patch
79
80 qemu-coroutine-gthread.patch
81 qemu-xen_paths.patch
82
83 hotplug-vif-vtrill.patch
84 rombios-no-pie.patch
85 0001-ipxe-dont-clobber-ebp.patch
86
87 musl-support.patch
88 musl-hvmloader-fix-stdint.patch
89 stdint_local.h
90 elf_local.h
91
92 xen-hotplug-lockfd.patch
93 xen-fd-is-file.c
94
95 patch-gcc6-etherboot-nonnull-compare.patch::https://git.ipxe.org/ipxe.git/patch/e2f14c2f8c10674dbbd4f1228d79dc4c9be213b5
96 patch-gcc6-etherboot-rm-unused-string-functions.patch
97 patch-gcc6-etherboot-nic.c.patch::https://git.ipxe.org/ipxe.git/patch/a5885fbc19c4b60dc1a21624d1a9d1b77a93504e
98 patch-gcc6-etherboot-ath.patch::https://git.ipxe.org/ipxe.git/patch/63037bdce4a325e5e1da85ffcdf27b77ac670c01
99 patch-gcc6-etherboot-sis190.patch::https://git.ipxe.org/ipxe.git/patch/65b32a0b7000f70a5bb1d33190d40f9b04c93172
100 patch-gcc6-etherboot-skge.patch::https://git.ipxe.org/ipxe.git/patch/76ec2a0540b25dbd183b9ce185583a4b24278cf1
101 patch-gcc6-etherboot-via-velocity.c.patch
102 patch-gcc6-etherboot-via-rhine.c.patch
103 patch-gcc6-etherboot-e1000_phy.c.patch
104 patch-gcc6-etherboot-igb_phy.c.patch
105 patch-gcc6-etherboot-ath9k-9287-array.patch
106 patch-gcc6-etherboot-no-pie.patch
107 patch-gcc6-etherboot-link-header.patch::https://git.ipxe.org/ipxe.git/patch/6324bd9389521c7e86384591f41eb78a81e9af47
108 patch-gcc6-etherboot-eth_broadcast.patch::https://git.ipxe.org/ipxe.git/patch/1cbb1581f16e235fafc963c906ad02b38d5457bd
109
110 xenstored.initd
111 xenstored.confd
112 xenconsoled.initd
113 xenconsoled.confd
114 xendomains.initd
115 xendomains.confd
116 xen-consoles.logrotate
117 xenqemu.confd
118 xenqemu.initd
119 "
120
121_builddir="$srcdir"/$pkgname-$pkgver
122_seabios=/usr/share/seabios/bios-256k.bin
123
124# Override wrong arch detection from xen-$pkgver/Config.mk.
125case "$CARCH" in
126armhf) export XEN_TARGET_ARCH="arm32";;
127esac
128
129prepare() {
130 local i _failed= _series=
131 cd "$_builddir"
132
133 for i in $source; do
134 case $i in
135 *-etherboot-*)
136 p=${i%%::*}
137 p=${p##*/}
138 msg "adding to ipxe: $p"
139 cp "$srcdir"/$p tools/firmware/etherboot/patches/
140 echo "$p" >> tools/firmware/etherboot/patches/series
141 ;;
142 *.patch) msg $i; patch -s -N -p1 -i "$srcdir"/$i \
143 || _failed="$_failed $i"
144 ;;
145 */ipxe-git-*)
146 ln -s "$srcdir"/${i##*/} \
147 tools/firmware/etherboot/ipxe.tar.gz || return 1
148 ;;
149 */xen-extfiles/*)
150 ln -s "$srcdir"/${i##*/} stubdom/ || return 1
151 ;;
152 esac
153 done
154 if [ -n "$_failed" ]; then
155 error "Patches failed:"
156 for i in $_failed; do
157 echo $i
158 done
159 return 1
160 fi
161
162 # install our stdint_local.h and elf_local.h
163 install "$srcdir"/stdint_local.h "$srcdir"/elf_local.h \
164 "$_builddir"/tools/firmware/ || return 1
165
166 # remove all -Werror
167 msg "Eradicating -Werror..."
168 find . -name '*.mk' -o -name 'Make*' | xargs sed -i -e 's/-Werror//g' \
169 || return 1
170
171 msg "Updating config.sub..."
172 update_config_sub || return 1
173
174 msg "Autoreconf..."
175 autoreconf || return 1
176
177 unset CFLAGS
178 unset LDFLAGS
179}
180
181# Unset CFLAGS and LDFLAGS because the xen build system
182# doesn't support them. Instead use .config in xen root
183# folder if necessary.
184munge_cflags() {
185 msg "Munging CFLAGS..."
186
187 unset CFLAGS
188 unset LDFLAGS
189 unset LANG
190 unset LC_ALL
191
192 case "$CARCH" in
193 armhf) export CFLAGS="-mcpu=cortex-a15";;
194 esac
195}
196
197# These tasks are added as separate tasks to enable a packager
198# to invoke specific tasks like building the hypervisor. i.e.
199# $ abuild configure build_tools
200configure() {
201 cd "$_builddir"
202
203 msg "Running configure..."
204 ./configure --prefix=/usr \
205 --build=$CBUILD \
206 --host=$CHOST \
207 --with-system-seabios=$_seabios \
208 || return 1
209}
210
211build_hypervisor() {
212 munge_cflags
213
214 msg "Building hypervisor..."
215 make xen || return 1
216}
217
218build_tools() {
219 munge_cflags
220
221 msg "Building tools..."
222 make tools || return 1
223}
224
225build_docs() {
226 munge_cflags
227
228 msg "Building documentation..."
229 make docs || return 1
230}
231
232build_stubdom() {
233 munge_cflags
234
235 msg "Building stub domains..."
236 make stubdom || return 1
237}
238
239build() {
240 cd "$_builddir"
241 configure || return 1
242 build_hypervisor || return 1
243 build_tools || return 1
244 build_docs || return 1
245 case "$CARCH" in
246 x86*) build_stubdom || return 1;;
247 esac
248
249 ${CC:-gcc} -o xen-fd-is-file "$srcdir"/xen-fd-is-file.c
250}
251
252package() {
253 cd "$_builddir"
254
255 unset CFLAGS
256 unset LDFLAGS
257
258 make -j1 DESTDIR="$pkgdir" install-xen install-tools install-docs \
259 || return 1
260 case "$CARCH" in
261 x86*) make -j1 DESTDIR="$pkgdir" install-stubdom || return 1;;
262 esac
263
264 # remove default xencommons
265 rm -rf "$pkgdir"/etc/init.d/xencommons
266
267 for i in $source; do
268 case $i in
269 *.initd) install -Dm755 "$srcdir"/$i \
270 "$pkgdir"/etc/init.d/${i%.*};;
271 *.confd) install -Dm644 "$srcdir"/$i \
272 "$pkgdir"/etc/conf.d/${i%.*};;
273 esac
274 done
275 install -Dm644 "$srcdir"/xen-consoles.logrotate \
276 "$pkgdir"/etc/xen/xen-consoles.logrotate
277
278 install -m755 xen-fd-is-file "$pkgdir"/usr/lib/xen/bin/xen-fd-is-file
279}
280
281libs() {
282 pkgdesc="Libraries for Xen tools"
283 replaces="xen"
284 depends=
285 mkdir -p "$subpkgdir"/usr/lib
286 mv "$pkgdir"/usr/lib/*.so.* \
287 "$pkgdir"/usr/lib/fs \
288 "$subpkgdir"/usr/lib/
289}
290
291hypervisor() {
292 pkgdesc="Xen hypervisor"
293 depends=
294 mkdir -p "$subpkgdir"
295 mv "$pkgdir"/boot "$subpkgdir"/
296}
297
298md5sums="3aa4e01bf37a3a5bc8572907cb88e649 xen-4.7.0.tar.gz
299dd60683d7057917e34630b4a787932e8 gmp-4.3.2.tar.bz2
300cd3f3eb54446be6003156158d51f4884 grub-0.97.tar.gz
30136cc57650cffda9a0269493be2a169bb lwip-1.3.0.tar.gz
302bf8f1f9e3ca83d732c00a79a6ef29bc4 newlib-1.16.0.tar.gz
303cec05e7785497c5e19da2f114b934ffd pciutils-2.2.9.tar.bz2
3047b72caf22b01464ee7d6165f2fd85f44 polarssl-1.1.4-gpl.tgz
305e26becb8a6a2b6695f6b3e8097593db8 tpm_emulator-0.7.4.tar.gz
306debc62758716a169df9f62e6ab2bc634 zlib-1.2.3.tar.gz
3077496268cebf47d5c9ccb0696e3b26065 ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz
308d162fdb5a2def649a18e377dfb8c618e xsa182-unstable.patch
3094e89035687d1fcdabe34610f947871ae xsa183-unstable.patch
31095bc220677fc2bb9a3df4dc14a0b31f6 xsa184-qemut-master.patch
311cc0904605d03a9e4f6f21d16824e41c9 xsa184-qemuu-master.patch
3128ae22c70681f3daf97ee7ef8ad947e76 xsa185.patch
3139a2b74f2079ba0b7a6e2420e6887cc3a xsa186-0001-x86-emulate-Correct-boundary-interactions-of-emulate.patch
3147849473e564a01b348d9f60a53fefe65 xsa186-4.7-0002-hvm-fep-Allow-testing-of-instructions-crossing-the.patch
315c426383254acdcbb9466bbec2d6f8d9b xsa187-4.7-0001-x86-shadow-Avoid-overflowing-sh_ctxt-seg.patch
316ed2ad5eaaa275dd64f9fdca3ef8a5ca7 xsa187-4.7-0002-x86-segment-Bounds-check-accesses-to-emulation-ctx.patch
317de1a3db370b87cfb0bddb51796b50315 qemu-coroutine-gthread.patch
31808bfdf8caff5d631f53660bf3fd4edaf qemu-xen_paths.patch
319e449bb3359b490804ffc7b0ae08d62a0 hotplug-vif-vtrill.patch
3205fab5487fe92fa29302db9ccb04af564 rombios-no-pie.patch
3213a04998db5cc3c5c86f3b46e97e9cd82 0001-ipxe-dont-clobber-ebp.patch
3220984e3000de17a6d14b8014a3ced46a4 musl-support.patch
323513456607a2adfaa0baf1e3ae5124b23 musl-hvmloader-fix-stdint.patch
324c9313a790faa727205627a1657b9bf06 stdint_local.h
325c13f954d041a6fa78d0d241ad1780c0b elf_local.h
326750138c31ec96d1a11fe0c665ac07e9e xen-hotplug-lockfd.patch
327649f77b90978cd2b6d506ac44ec6c393 xen-fd-is-file.c
328ea983c48b69eea3885627b2c8da8afec patch-gcc6-etherboot-nonnull-compare.patch
329c1b73e5b708002b77b50827742c3af09 patch-gcc6-etherboot-rm-unused-string-functions.patch
330e10ec3a62e8dc47052b8d8be77520af7 patch-gcc6-etherboot-nic.c.patch
33178433fdb5ed0d9f71a1d2b8103a886c9 patch-gcc6-etherboot-ath.patch
33283b0416745dffdfedec8caab7d20b758 patch-gcc6-etherboot-sis190.patch
33324ece1158115e508e6a5db0a086f065c patch-gcc6-etherboot-skge.patch
334465ca7d4841fe34b7b4d9d99257cd092 patch-gcc6-etherboot-via-velocity.c.patch
335b136a8d31272eec48c766065bba260ca patch-gcc6-etherboot-via-rhine.c.patch
336ef2d246f23e5ca152a4057617041bac6 patch-gcc6-etherboot-e1000_phy.c.patch
33705b86753c6e6ca90af038b499fd564f0 patch-gcc6-etherboot-igb_phy.c.patch
33874a5f930491bbc4333c84fff36029a1c patch-gcc6-etherboot-ath9k-9287-array.patch
339567de70c3355c9724ebfdb02d7806435 patch-gcc6-etherboot-no-pie.patch
3404ae9e861dc0a9b1873236399ba8cff6d patch-gcc6-etherboot-link-header.patch
341ce606e447bc4884dffc59080cd10acfd patch-gcc6-etherboot-eth_broadcast.patch
3424aeda68bf5b168019762fcf6edb661d3 xenstored.initd
343d86504e12f05deca6b3eeeb90157160e xenstored.confd
344d1dd5fc9a8b00f7373d789f9b5a605b9 xenconsoled.initd
345ec2252c72050d7d5870a3a629b873ba6 xenconsoled.confd
346e155d7992ddbb5b0df6148f4cc21c7c6 xendomains.initd
347dcdd1de2c29e469e834a02ede4f47806 xendomains.confd
3489df68ac65dc3f372f5d61183abdc83ff xen-consoles.logrotate
3496a2f777c16678d84039acf670d86fff6 xenqemu.confd
350e1c9e1c83a5cc49224608a48060bd677 xenqemu.initd"
351sha256sums="be5876144d49729572ae06142e0bb93f1c1f2695578141eff2931995add24623 xen-4.7.0.tar.gz
352936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775 gmp-4.3.2.tar.bz2
3534e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b grub-0.97.tar.gz
354772e4d550e07826665ed0528c071dd5404ef7dbe1825a38c8adbc2a00bca948f lwip-1.3.0.tar.gz
355db426394965c48c1d29023e1cc6d965ea6b9a9035d8a849be2750ca4659a3d07 newlib-1.16.0.tar.gz
356f60ae61cfbd5da1d849d0beaa21f593c38dac9359f0b3ddc612f447408265b24 pciutils-2.2.9.tar.bz2
3572d29fd04a0d0ba29dae6bd29fb418944c08d3916665dcca74afb297ef37584b6 polarssl-1.1.4-gpl.tgz
3584e48ea0d83dd9441cc1af04ab18cd6c961b9fa54d5cbf2c2feee038988dea459 tpm_emulator-0.7.4.tar.gz
3591795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e zlib-1.2.3.tar.gz
360632ce8c193ccacc3012bd354bdb733a4be126f7c098e111930aa41dad537405c ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz
361303400b9a832a3c1d423cc2cc97c2f00482793722f9ef7dd246783a049ac2792 xsa182-unstable.patch
362ea0ea4b294332814330f222e6d78eea3b19c394eac8ae22feb4a5bd21e90331f xsa183-unstable.patch
36388c939c64b8f9fc9f86d0a30517d5455462d1ff837aa4285a9cb189b54c0cf20 xsa184-qemut-master.patch
3643877e19992c4532b8b2a37e151fe6a6187a1bbee2b54c1718b995260bb0fcf65 xsa184-qemuu-master.patch
3653328a1953ecdf4de35462ea8396b0927171d718e95f73a87a7f651427bd8f8b4 xsa185.patch
366f2082a36d968a47e477bb5082d0e0aaa58e6cb3dc20b26389f043a9b7b595fa6 xsa186-0001-x86-emulate-Correct-boundary-interactions-of-emulate.patch
3675a826a32763d82ac83c924f8c89d12aae5f069a4cbc7d5193aa8413a02b6dc05 xsa186-4.7-0002-hvm-fep-Allow-testing-of-instructions-crossing-the.patch
368be9fe85d36c2c1fbca246c1f4d834c3ef11b6ab3d5467da0ac8c079aa5a68de9 xsa187-4.7-0001-x86-shadow-Avoid-overflowing-sh_ctxt-seg.patch
36936b22d6a168be39f31a1c1304f708269a2a10fe5105f7da4a06877d6059f1cd6 xsa187-4.7-0002-x86-segment-Bounds-check-accesses-to-emulation-ctx.patch
3703941f99b49c7e8dafc9fae8aad2136a14c6d84533cd542cc5f1040a41ef7c6fe qemu-coroutine-gthread.patch
371e4e5e838e259a3116978aabbcebc1865a895179a7fcbf4bad195c83e9b4c0f98 qemu-xen_paths.patch
372dd1e784bc455eb62cb85b3fa24bfc34f575ceaab9597ef6a2f1ee7ff7b3cae0a hotplug-vif-vtrill.patch
37374cb62a4614dd042ea9169112fb677bfef751a760aae34c7e73391fa857a8429 rombios-no-pie.patch
374ac8bbd0b864c7de278fd9b68392b71863581ec21622c2e9b87e501e492e414d3 0001-ipxe-dont-clobber-ebp.patch
3752fea4ceec8872f5560023fa135e3ff03d6deee4299e53d3a33ec59c31779b2c5 musl-support.patch
376479b9605e85c865be6117b6d1993124dbbb7da7f95d0e896e4c0fe5cdfeb74d3 musl-hvmloader-fix-stdint.patch
3776b4ad2a9fdb3e23b06c8c1961a46b06c15a46471fe6fb13cdc269da37466f334 stdint_local.h
3787f1ed2db24d8eba87a08eea0601a9ab339209906fdfa74c8c03564a1a6e6471e elf_local.h
379b183ed028a8c42a64e6fd3fb4b2b6dad832f52ed838fceb69bf681de4e7d794f xen-hotplug-lockfd.patch
380d0b3e5f282a07878341c38f40d01041ed37623757a99d6e0a420ca64d1f4ef2a xen-fd-is-file.c
38117bb27d95c86af8cc5e499b1b0db9b95bba3f45910d55b420f9f1f5452355fab patch-gcc6-etherboot-nonnull-compare.patch
3825d5fe7bf52cbae9da20cfd1fc798699b2355a1af907ebf7f764e227891a759bb patch-gcc6-etherboot-rm-unused-string-functions.patch
3839f34f8ecb9a44c688275b838c83efd233bb817f5e222629eac98e116168d704c patch-gcc6-etherboot-nic.c.patch
384cdf7c4a089fe1fe493aafaf669decc3c9e071a0950da77dce526c09088d1c931 patch-gcc6-etherboot-ath.patch
38532595581467772b9fa0fbb5384c99caefeb2cee3306b94b9bd2722084454f5a2 patch-gcc6-etherboot-sis190.patch
386c73d1653b9b1d97ddce717817dc74429cd94c7b22989a08604eaa60df63f75f8 patch-gcc6-etherboot-skge.patch
387448caed900ada2c030738218f5b82f5e29d9dc2e1beef9ebd49cbeb23734df0d patch-gcc6-etherboot-via-velocity.c.patch
38861b1518c8d41792ec3b36e0fbfc265adb6c9304945a6fa18d6cc5a197e34b94f patch-gcc6-etherboot-via-rhine.c.patch
389577f06e38a9ecbd3576907f2ba1c5040f4f1573fe92912635230702ad157b2e7 patch-gcc6-etherboot-e1000_phy.c.patch
39080a24e9504d3893e83dc60550ffe364a873aaf3dafb52dcdade13f61f2ec0ee5 patch-gcc6-etherboot-igb_phy.c.patch
391a15d73e0fb51fe3c1cf8b80a5ff17d532444016d14495d90d9e642ec60f320a6 patch-gcc6-etherboot-ath9k-9287-array.patch
3922269932e8645c11e7fe60eeb6e0720841c2b5ddac2e6965ead1527d3e5924ee9 patch-gcc6-etherboot-no-pie.patch
393cace870b6629003b55d9df9ef24f3445067239b913c006b6e23da511c1a21d78 patch-gcc6-etherboot-link-header.patch
394be05ccd8975af402dcba3a3dc78c173319b2edd636bac11ac11163091453b704 patch-gcc6-etherboot-eth_broadcast.patch
39590a8fc315bfe305581b3873890b1c1c8da6f62b5d06b73b79bac7a74671bbb07 xenstored.initd
396991bb7c9da02941556e29714bd96b26e39e57e0a5b514eadd78d9bfa3fa5a9dc xenstored.confd
397d13719093a2c3824525f36ac91ac3c9bd1154e5ba0974e5441e4a2ab5e883521 xenconsoled.initd
3982a74be03eb74f6013242a4a5d721df6cb9b959b43c405de1e32813f52d749060 xenconsoled.confd
3995fb0fc4a1ac8b139bb31b03f86b5c170050b93ea11a2f5b962d383d277ee815c xendomains.initd
400046540c36328809fc351ad209d2b40300f91581d6d46da0caf79f57f2c212285 xendomains.confd
4010da87a4b9094f934e3de937e8ef8d3afc752e76793aa3d730182d0241e118b19 xen-consoles.logrotate
4024cfcddcade5d055422ab4543e8caa6e5c5eee7625c41880a9000b7a87c7c424e xenqemu.confd
403c92bbb1166edd61141fdf678116974209c4422daf373cdd5bc438aa4adb25b8d xenqemu.initd"
404sha512sums="2c52c8ef145dfab7d069e79318d5d631e1106a0ddc79d88b3bacf36c7f15cea67dccb704a245e785d2a1e42c6fb6c0ad74832f564aaeec025ad7b864031f0921 xen-4.7.0.tar.gz
4052e0b0fd23e6f10742a5517981e5171c6e88b0a93c83da701b296f5c0861d72c19782daab589a7eac3f9032152a0fc7eff7f5362db8fccc4859564a9aa82329cf gmp-4.3.2.tar.bz2
406c2bc9ffc8583aeae71cee9ddcc4418969768d4e3764d47307da54f93981c0109fb07d84b061b3a3628bd00ba4d14a54742bc04848110eb3ae8ca25dbfbaabadb grub-0.97.tar.gz
4071465b58279af1647f909450e394fe002ca165f0ff4a0254bfa9fe0e64316f50facdde2729d79a4e632565b4500cf4d6c74192ac0dd3bc9fe09129bbd67ba089d lwip-1.3.0.tar.gz
40840eb96bbc6736a16b6399e0cdb73e853d0d90b685c967e77899183446664d64570277a633fdafdefc351b46ce210a99115769a1d9f47ac749d7e82837d4d1ac3 newlib-1.16.0.tar.gz
4092b3d98d027e46d8c08037366dde6f0781ca03c610ef2b380984639e4ef39899ed8d8b8e4cd9c9dc54df101279b95879bd66bfd4d04ad07fef41e847ea7ae32b5 pciutils-2.2.9.tar.bz2
41088da614e4d3f4409c4fd3bb3e44c7587ba051e3fed4e33d526069a67e8180212e1ea22da984656f50e290049f60ddca65383e5983c0f8884f648d71f698303ad polarssl-1.1.4-gpl.tgz
4114928b5b82f57645be9408362706ff2c4d9baa635b21b0d41b1c82930e8c60a759b1ea4fa74d7e6c7cae1b7692d006aa5cb72df0c3b88bf049779aa2b566f9d35 tpm_emulator-0.7.4.tar.gz
412021b958fcd0d346c4ba761bcf0cc40f3522de6186cf5a0a6ea34a70504ce9622b1c2626fce40675bc8282cf5f5ade18473656abc38050f72f5d6480507a2106e zlib-1.2.3.tar.gz
413c5cb1cdff40d2d71fd3e692a9d0efadf2aa17290daf5195391a1c81ddd9dfc913a8e44d5be2b12be85b2a5565ea31631c99c7053564f2fb2225c80ea0bb0e4a4 ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz
414e0a195ca377be7e4d584eff451d7b077406f54ca64c94b1515a4b23318fed33880da759144237de3be4abc92572037c8f5119b6b70ffc26a1872a771d769b8b2 xsa182-unstable.patch
415a5c23c5ecc6c01875da2c0791c3d62334f3709dff12cb6a1b7a486778da7604994b610a6fc1fb12a46aca409b833c1f37ca704006cd52a283f1ead66a4d9af2a xsa183-unstable.patch
41614c07d077a9d60a03859ca1b92347517c93faf88db06f8cb0515e486a3919afa8401203161ff671dda8fbdb64e6ca5e86120f1b8f65e6bfaa63a8c6a33211bad xsa184-qemut-master.patch
417862e00d9cd126f8323f9c9706bf6ce7896d97e68e647416c699d9f2e01b88083a5fea346b13403577311384946912123f64bf5a568f1a6f92077d28923df54c6 xsa184-qemuu-master.patch
4186b774cfef049d457d89149a973b5a5af674b995726c88ce09278f4a64cb94f5b3c2c2380a6273475a13eb9cdd972f5429f393247ecca6463f6068d606ea74886 xsa185.patch
419bf899dde20cee730598b90e0a07941155b20e0ea17b9a3017a53bd0e1495fb6e5dc251934e01d02937b56ad65faf3accecf695b4fd7f6dcc0bae91290bd87b19 xsa186-0001-x86-emulate-Correct-boundary-interactions-of-emulate.patch
4208e2a6c32aeb7cfb6ffa4395709ea849850d4c356dce139857a6783310b2efb47a01b1cf946b890264f7db543c5304830f64b5e40563c72318391569986146ab7 xsa186-4.7-0002-hvm-fep-Allow-testing-of-instructions-crossing-the.patch
421d85bc3c56805ff5b3df6b85b2b34ff97d15fe254fc5a873b5c43c2c15564eea42753723a6296292a543e7b7dc83ad71f0fafe01fa6a6ebf82fa0a7268fc67486 xsa187-4.7-0001-x86-shadow-Avoid-overflowing-sh_ctxt-seg.patch
422f60b51de992225ea6f48ad108c18717fb84a6f3c7cc3a3d567a1799403eefdc965c1ec4ccb9190affa58f81c48f13525a86144b04674b42732c8bdcad6084ff2 xsa187-4.7-0002-x86-segment-Bounds-check-accesses-to-emulation-ctx.patch
423c3c46f232f0bd9f767b232af7e8ce910a6166b126bd5427bb8dc325aeb2c634b956de3fc225cab5af72649070c8205cc8e1cab7689fc266c204f525086f1a562 qemu-coroutine-gthread.patch
4241936ab39a1867957fa640eb81c4070214ca4856a2743ba7e49c0cd017917071a9680d015f002c57fa7b9600dbadd29dcea5887f50e6c133305df2669a7a933f3 qemu-xen_paths.patch
425f095ea373f36381491ad36f0662fb4f53665031973721256b23166e596318581da7cbb0146d0beb2446729adfdb321e01468e377793f6563a67d68b8b0f7ffe3 hotplug-vif-vtrill.patch
42671d0ebcda62259a1bf056807363015f2370f12daa5774f16150da42cba66bb5b65ec82f1f806fe147346560aa4d0e78bc5b5d8ae9f7e82d0aabae9d63fc876f6 rombios-no-pie.patch
427a6455988477a29d856924651db5e14f96d835413b956278d2291cbb8e5877d7bf6f462890f607ecf1c7b4003997295d0ba7852e110fc20df3a3edf1845e778ba 0001-ipxe-dont-clobber-ebp.patch
42876bd60768b296752ca11195bb03a57584686461da45255cb540977111a73c42b5b92362fd46d97bfd20487c96971dd5aed7eae7d8bf1aad7d5199adb875d4962 musl-support.patch
42908cf7fac825dd3da5f33856abf6692da00d8928ab73050b3ae0a643ddb97c8ae323238a80152fd31595ac1c31678d559232264258c189e2c05ecaf33e295f13e musl-hvmloader-fix-stdint.patch
4309dcb481c5b83c7df23e87be717d8a9234014f26a0f80893e125fe8110e2923562d95162d18ff64c08b5782cd7c085f90378a9e0802b3995c077c8ba32bbb669f stdint_local.h
431853467a2d055c5bfbdc7bdca175a334241be44a7c5ac3c0a84a4bc5463b5c070b66d37e2a557429ef860727a6b7350683af758cc2494d85b6be4d883143a2c0d elf_local.h
43279cb1b6b81b17cb87a064dfe3548949dfb80f64f203cac11ef327102b7a25794549ce2d9c019ebf05f752214da8e05065e9219d069e679c0ae5bee3d090c685e xen-hotplug-lockfd.patch
433e76816c6ad0e91dc5f81947f266da3429b20e6d976c3e8c41202c6179532eec878a3f0913921ef3ac853c5dbad8082da3c9cd53b65081910516feb492577b7fc xen-fd-is-file.c
434be0f4d00d0952883f2e0f5cabff4bda9bbfc1ff728389065a7a820875b191cf37890a272d3f9a0398fa86bbad20f6a2c16d2b7f30f3e03d746ee1d72b8ae3614 patch-gcc6-etherboot-nonnull-compare.patch
43555cf5ced4ff02d7a94bcdddbfdd0f4894c07991fa0be1829787f9498401340f0da30d2f118f4798c87e6097b13f14e1829cdc8024227ad0a561d5d8e08fc14ac patch-gcc6-etherboot-rm-unused-string-functions.patch
436fac0d9c790aa49ded45ab46304dada4d3526e62594dc837e0578ebff6e75d9e87d0451447deb8bc0a82b898e1d414d759bff67b71f84ef20d23655496769c939 patch-gcc6-etherboot-nic.c.patch
4374a47a6b3f0fa1061aaa7a3cecd8bc39d7200eac1861189bcb3f9aa82eec68272bc9b7e861f787f0edb894edf0e17cafdc3a5e53924893fec48c7269a129aac5b patch-gcc6-etherboot-ath.patch
4383c5a8a05e73e688993438196c0d799f2a9d41d7f092722a42ddbb420c464f54cf870e071b71b0c1e0e96a0b934ae229bb7dff16ca0538c1ceebe7e44c51f374b patch-gcc6-etherboot-sis190.patch
439d4de0c94b850b886ceaa519d327fbfb80028147395694a31aed76de1a6f4ea001a356f11fb833c963b3934268313611193e21c615273cbc99c9911b847ca0233 patch-gcc6-etherboot-skge.patch
4404676979566c78d8f8dc46083dd2959bd871fdc5e790ec0846f47cd74f6740117e217a1b382d03302965769afcdf3f299ec9abd584b27430c4ed69e6776081194 patch-gcc6-etherboot-via-velocity.c.patch
441be4a3f48a7a3de745693ef1b8d1ab487ee3d8d7ed1b2e98ed94af7d52fb1db2fd724f8fada267a5ef9caa41721431e0e66d18d9cfc6557bfb8a1f95f44eeba68 patch-gcc6-etherboot-via-rhine.c.patch
4421bec93daf9c2df4904828f6473c64a46d2da1401b6aac5c33b1c411f8bfc0be119109db7c6582bb38aa178a28a3401072cac2636f1c631392fcffeed88bc0950 patch-gcc6-etherboot-e1000_phy.c.patch
44378093aa78c4711001adef6f29588535ca000931bcfca7c247d5ff4ef24eff2a553919ec5bae2f7d40236513d3bfa04e3baf20fdba5cd1ce8bd4957b8deebeb3c patch-gcc6-etherboot-igb_phy.c.patch
444cca8b3230d33261efffb30cfc42661a6ec09433e3aa80d50710112d73c6b45c81dc0fa259072dc42ca31c5cec8ceca84b0a4f44ed85716f2e2d3287ddc84b7ec patch-gcc6-etherboot-ath9k-9287-array.patch
445a87f907b193203d6710515d48fb88dfd1c22ec4ca4a710822f1327df9902e4d66552208bc6b1c7fbd1816946edeccb3ffb374397b3e5b629be1b130bb763315e patch-gcc6-etherboot-no-pie.patch
4463126cdc1338d14338b56defddb96e99a12aff0f847365386a89fd54469ed08e17abbb10827ce08ca515895c6b50c37d189b1f84712de938ce0db2f8817c1de6e patch-gcc6-etherboot-link-header.patch
44744561a76fa7abab4dd9c150d4b14c83432fea1813c5455f7321f71b28ece47f56002fae6bec25c5d63259a961136dfd29c4ac4d9649a0a7b3b5dbcd5b62fc111 patch-gcc6-etherboot-eth_broadcast.patch
44852c43beb2596d645934d0f909f2d21f7587b6898ed5e5e7046799a8ed6d58f7a09c5809e1634fa26152f3fd4f3e7cfa07da7076f01b4a20cc8f5df8b9cb77e50 xenstored.initd
449093f7fbd43faf0a16a226486a0776bade5dc1681d281c5946a3191c32d74f9699c6bf5d0ab8de9d1195a2461165d1660788e92a3156c9b3c7054d7b2d52d7ff0 xenstored.confd
4503c86ed48fbee0af4051c65c4a3893f131fa66e47bf083caf20c9b6aa4b63fdead8832f84a58d0e27964bc49ec8397251b34e5be5c212c139f556916dc8da9523 xenconsoled.initd
45130df69cc38d0bed26bc4d6e08a2b62cbdc654d5f663009a05cb3b83b3e3dc5e206362d3fd59abbb753ceb8d6d79eaa6e15d079bb8f4f35dc74667103faf4e85d xenconsoled.confd
452b1037fdf2fe477e153f7e9408e34943a8e8ca4e5518e6b0513137f95f3abbcbb20acb1de37c875825a1d4a30b2506290ec76b8c9fb183db6b4b0e1cffe329ca5 xendomains.initd
453a3dddcb841a22305cfe1780c4ef6cf1ee67227ca9fe6ca0d24a7cc8be2cff9e5f3fbd75c2faf85e5ce6dc3b73631879ce10e19b02afb4611c72db183e116123a xendomains.confd
454ab2105c75cfe01768aecd5bcbb56269d63666e8a44e42b6a83aee87df6c84ee2f9ab249171c21b2e09f8fec2cae8318f6e87d160989398a3e7dd68db8d52c426 xen-consoles.logrotate
455bdbe15c924071cdc2d0f23e53ba8e3f837d4b5369bfb218abd3405f9bef25d105269aaf0784baeb69c073a5786b8c82ffdfd414e86874da34293cfdc2c497928 xenqemu.confd
4568475119369409efb8ad930c7735cd3d782191d18fab4fc322a51120c395162ff88e381182876036d1078afd30079dbf3f94a3568689e9b52ba235adead4b97d3 xenqemu.initd"
diff --git a/main/xen/xenstore_client_transaction_fix.patch b/main/xen/xenstore_client_transaction_fix.patch
new file mode 100644
index 0000000000..134fc7fa66
--- /dev/null
+++ b/main/xen/xenstore_client_transaction_fix.patch
@@ -0,0 +1,144 @@
1--- xen-4.7.0-orig/tools/xenstore/xenstore_client.c 2016-06-20 12:38:15.000000000 +0200
2+++ xen-4.7.0/tools/xenstore/xenstore_client.c 2016-10-05 03:16:39.372927512 +0200
3@@ -126,7 +126,7 @@
4
5 #define MIN(a, b) (((a) < (b))? (a) : (b))
6
7-static void do_ls(struct xs_handle *h, char *path, int cur_depth, int show_perms)
8+static void do_ls(struct xs_handle *h, xs_transaction_t xth, char *path, int cur_depth, int show_perms)
9 {
10 char **e;
11 char *newpath, *val;
12@@ -135,12 +135,14 @@
13 unsigned int num, len;
14
15 newpath = malloc(STRING_MAX);
16- if (!newpath)
17+ if (!newpath) {
18 err(1, "malloc in do_ls");
19+ }
20
21- e = xs_directory(h, XBT_NULL, path, &num);
22- if (e == NULL)
23+ e = xs_directory(h, xth, path, &num);
24+ if (e == NULL) {
25 err(1, "xs_directory (%s)", path);
26+ }
27
28 for (i = 0; i<num; i++) {
29 char buf[MAX_STRLEN(unsigned int)+1];
30@@ -167,7 +169,7 @@
31
32 /* Fetch value */
33 if ( newpath_len < STRING_MAX ) {
34- val = xs_read(h, XBT_NULL, newpath, &len);
35+ val = xs_read(h, xth, newpath, &len);
36 }
37 else {
38 /* Path was truncated and thus invalid */
39@@ -200,7 +202,7 @@
40 free(val);
41
42 if (show_perms) {
43- perms = xs_get_permissions(h, XBT_NULL, newpath, &nperms);
44+ perms = xs_get_permissions(h, xth, newpath, &nperms);
45 if (perms == NULL) {
46 warn("\ncould not access permissions for %s", e[i]);
47 }
48@@ -219,7 +221,7 @@
49
50 putchar('\n');
51
52- do_ls(h, newpath, cur_depth+1, show_perms);
53+ do_ls(h, xth, newpath, cur_depth+1, show_perms);
54 }
55 free(e);
56 free(newpath);
57@@ -417,7 +419,7 @@
58 break;
59 }
60 case MODE_ls: {
61- do_ls(xsh, argv[optind], 0, prefix);
62+ do_ls(xsh, xth, argv[optind], 0, prefix);
63 optind++;
64 break;
65 }
66@@ -505,7 +507,6 @@
67 int upto = 0;
68 int recurse = 0;
69 int nr_watches = -1;
70- int transaction;
71 struct winsize ws;
72 enum mode mode;
73
74@@ -612,43 +613,28 @@
75 }
76 }
77
78- switch (mode) {
79- case MODE_read:
80- transaction = (argc - switch_argv - optind) > 1;
81- break;
82- case MODE_write:
83- transaction = (argc - switch_argv - optind) > 2;
84- break;
85- case MODE_ls:
86- case MODE_watch:
87- transaction = 0;
88- break;
89- default:
90- transaction = 1;
91- break;
92- }
93-
94- if ( mode == MODE_ls )
95- {
96+ if ( mode == MODE_ls ) {
97 memset(&ws, 0, sizeof(ws));
98 ret = ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws);
99- if (!ret)
100+ if (!ret) {
101 max_width = ws.ws_col - 2;
102 }
103+ }
104
105 xsh = xs_open(socket ? XS_OPEN_SOCKETONLY : 0);
106- if (xsh == NULL) err(1, "xs_open");
107+ if (xsh == NULL) {
108+ err(1, "xs_open");
109+ }
110
111 again:
112- if (transaction) {
113 xth = xs_transaction_start(xsh);
114- if (xth == XBT_NULL)
115+ if (xth == XBT_NULL) {
116 errx(1, "couldn't start transaction");
117 }
118
119 ret = perform(mode, optind, argc - switch_argv, argv + switch_argv, xsh, xth, prefix, tidy, upto, recurse, nr_watches);
120
121- if (transaction && !xs_transaction_end(xsh, xth, ret)) {
122+ if (!xs_transaction_end(xsh, xth, ret)) {
123 if (ret == 0 && errno == EAGAIN) {
124 output_pos = 0;
125 goto again;
126@@ -656,14 +642,16 @@
127 errx(1, "couldn't end transaction");
128 }
129
130- if (output_pos)
131+ if (output_pos) {
132 printf("%s", output_buf);
133+ }
134
135 free(output_buf);
136 free(ebuf.buf);
137
138- if (xsh)
139+ if (xsh) {
140 xs_close(xsh);
141+ }
142
143 return ret;
144 }