tools: misc fixes
cover tools: misc fixes
Two fixes for the tools, one is a typo fix and the other one is a fix for configure.
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH 1/2 lib/gnttab: fix build of gnttab_unimp.c
Fix the definition of the xengnttab_grant_copy function so it's inline with the prototypes in xengnttab.h.
This unbreaks the tools build on systems that don't have a gnttab device.
--- tools/libs/gnttab/gnttab_unimp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/libs/gnttab/gnttab_unimp.c +2 -2
@@ -78,9 +78,9 @@ int xengnttab_unmap(xengnttab_handle *xgt, void *start_address, uint32_t count)abort (); } -int xengnttab_copy_grant (xengnttab_handle *xgt, +int xengnttab_grant_copy (xengnttab_handle *xgt,uint32_t count, -xengnttab_copy_grant_segment_t *segs) +xengnttab_grant_copy_segment_t *segs) {abort (); }
Signature · 7 lines
2.7.4 (Apple Git-66) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH 1/2] lib/gnttab: fix build of gnttab_unimp.c
I will change lib to libs in subject line while committing
Quoted 1 line · Roger Pau Monne
Fix the definition of the
xengnttab_grant_copyfunction so it's inline with
in line with
Quoted 7 lines
the prototypes in
xengnttab.h.This unbreaks the tools build on systems that don't have a gnttab device.
Signed-off-by Roger Pau Monné <[email protected]>Cc Ian Jackson <[email protected]>Cc Wei Liu <[email protected]>
Quoted 23 lines
--- tools/libs/gnttab/gnttab_unimp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tools/libs/gnttab/gnttab_unimp.c +2
-2@@ -78,9 +78,9 @@ int xengnttab_unmap(xengnttab_handle *xgt, void *start_address, uint32_t count)abort (); } -int xengnttab_copy_grant (xengnttab_handle *xgt, +int xengnttab_grant_copy (xengnttab_handle *xgt,uint32_t count, -xengnttab_copy_grant_segment_t *segs) +xengnttab_grant_copy_segment_t *segs) {abort (); }Signature · 1 line
2.7.4 (Apple Git-66)
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH 2/2 tools/configure: fix --with-system-{ovmf/seabios}
In reply to Roger Pau MonneCurrent configure code doesn't define {SEABIOS/OVMF}_PATH when --with-system-{ovmf/seabios} is used. Fix this by making sure those defines are always set if the internal {ovmf/seabios}_path variables are also set.
---
Please re-run autogen.sh before committing.
--- tools/configure.ac | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
tools/configure.ac +6 -8
@@ -222,10 +222,9 @@ AC_ARG_WITH([system-seabios], *) seabios_path=$withval ;; esac ],[]) -AS_IF([test "x$seabios" = "xy"], [ - AC_DEFINE_UNQUOTED([SEABIOS_PATH], - ["${seabios_path:-$XENFIRMWAREDIR/seabios.bin}"], - [SeaBIOS path]) +AS_IF([test "x$seabios" = "xy"], [seabios_path=$XENFIRMWAREDIR/seabios.bin]) +AS_IF([test -n "$seabios_path"], [ + AC_DEFINE_UNQUOTED([SEABIOS_PATH],["$seabios_path"],[SeaBIOS path]) ]) AC_ARG_WITH([system-ovmf],
@@ -239,10 +238,9 @@ AC_ARG_WITH([system-ovmf], *) ovmf_path=$withval ;; esac ],[]) -AS_IF([test "x$ovmf" = "xy"], [ - AC_DEFINE_UNQUOTED([OVMF_PATH], - ["${ovmf_path:-$XENFIRMWAREDIR/ovmf.bin}"], - [OVMF path]) +AS_IF([test "x$ovmf" = "xy"], [ovmf_path=$XENFIRMWAREDIR/ovmf.bin]) +AS_IF([test -n "$ovmf_path"], [ + AC_DEFINE_UNQUOTED([OVMF_PATH],["$ovmf_path"],[OVMF path]) ]) AC_ARG_WITH([extra-qemuu-configure-args],
Signature · 7 lines
2.7.4 (Apple Git-66) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH 2/2] tools/configure: fix --with-system-{ovmf/seabios}
Quoted 19 lines · Roger Pau Monne
Current configure code doesn't define {SEABIOS/OVMF}_PATH when --with-system-{ovmf/seabios} is used. Fix this by making sure those defines are always set if the internal {ovmf/seabios}_path variables are also set.
Signed-off-by Roger Pau Monné <[email protected]>Cc Wei Liu <[email protected]>Cc Ian Jackson <[email protected]>---
Please re-runautogen.shbefore committing.--- tools/configure.ac | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)tools/configure.ac +0
-0@@ -222,10 +222,9 @@ AC_ARG_WITH([system-seabios], *) seabios_path=$withval ;;
tools/configure.ac AC_ARG_WITH([system-seabios], · line 228
Quoted 10 lines
tools/configure.ac +3
-4esac ],[]) -AS_IF([test "x$seabios" = "xy"], [ - AC_DEFINE_UNQUOTED([SEABIOS_PATH], - ["${seabios_path:-$XENFIRMWAREDIR/seabios.bin}"], - [SeaBIOS path]) +AS_IF([test "x$seabios" = "xy"], [seabios_path=$XENFIRMWAREDIR/seabios.bin]) +AS_IF([test -n "$seabios_path"], [ + AC_DEFINE_UNQUOTED([SEABIOS_PATH],["$seabios_path"],[SeaBIOS path]) ])
What about just change the test condition in the original code to
test "x$seabios" = "xy" || -n "$seabios_path"
?
That should result in the same thing, right?
Quoted 19 lines
tools/configure.ac +3
-4AC_ARG_WITH([system-ovmf],@@ -239,10 +238,9 @@ AC_ARG_WITH([system-ovmf], *) ovmf_path=$withval ;; esac ],[]) -AS_IF([test "x$ovmf" = "xy"], [ - AC_DEFINE_UNQUOTED([OVMF_PATH], - ["${ovmf_path:-$XENFIRMWAREDIR/ovmf.bin}"], - [OVMF path]) +AS_IF([test "x$ovmf" = "xy"], [ovmf_path=$XENFIRMWAREDIR/ovmf.bin]) +AS_IF([test -n "$ovmf_path"], [ + AC_DEFINE_UNQUOTED([OVMF_PATH],["$ovmf_path"],[OVMF path]) ]) AC_ARG_WITH([extra-qemuu-configure-args],Signature · 1 line
2.7.4 (Apple Git-66)
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 2/2] tools/configure: fix --with-system-{ovmf/seabios}
Quoted 33 lines · Wei Liu
Quoted 19 lines · Roger Pau Monne
Current configure code doesn't define {SEABIOS/OVMF}_PATH when --with-system-{ovmf/seabios} is used. Fix this by making sure those defines are always set if the internal {ovmf/seabios}_path variables are also set.
Signed-off-by Roger Pau Monné <[email protected]>Cc Wei Liu <[email protected]>Cc Ian Jackson <[email protected]>---
Please re-runautogen.shbefore committing.--- tools/configure.ac | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)tools/configure.ac +0
-0@@ -222,10 +222,9 @@ AC_ARG_WITH([system-seabios], *) seabios_path=$withval ;;tools/configure.ac AC_ARG_WITH([system-seabios], · line 228
Quoted 10 lines
tools/configure.ac +3
-4esac ],[]) -AS_IF([test "x$seabios" = "xy"], [ - AC_DEFINE_UNQUOTED([SEABIOS_PATH], - ["${seabios_path:-$XENFIRMWAREDIR/seabios.bin}"], - [SeaBIOS path]) +AS_IF([test "x$seabios" = "xy"], [seabios_path=$XENFIRMWAREDIR/seabios.bin]) +AS_IF([test -n "$seabios_path"], [ + AC_DEFINE_UNQUOTED([SEABIOS_PATH],["$seabios_path"],[SeaBIOS path]) ])What about just change the test condition in the original code to
Quoted 5 lines
test "x$seabios" = "xy" || -n "$seabios_path"?
That should result in the same thing, right?
Yes, that's right. Should I do it, or are you going to send it? TBH, it's just a one line change, and the idea is yours.
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel