aboutsummaryrefslogtreecommitdiffstats
path: root/xen/tools
diff options
context:
space:
mode:
Diffstat (limited to 'xen/tools')
-rw-r--r--xen/tools/get-fields.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/xen/tools/get-fields.sh b/xen/tools/get-fields.sh
index ccf5675c02..0936bb8fe3 100644
--- a/xen/tools/get-fields.sh
+++ b/xen/tools/get-fields.sh
@@ -227,7 +227,7 @@ handle_array() {
build_body() {
echo
- echo -n "#define XLAT_$1(_d_, _s_)"
+ echo -n "#define XLAT_$1(_d_, _s_) do {"
local level=1 fields= id= array= arrlvl=1 array_type= type= token
for token in $2
do
@@ -303,6 +303,8 @@ build_body() {
esac
test -z "$fields" || fields="$fields $token"
done
+ echo " \\"
+ echo "} while (0)"
echo ""
}