Skip to contentSkip to conversation

tools: misc fixes

PATCH In review Roger Pau Monne 2 participants 6 messages Sep 26, 2016

lore
Share & tools
lore
#1 lore raw

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
index 829eced..26e4ee1 100644
@@ -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
Acked-by on v1 1/2
#2 lore raw

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_copy function 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.

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
index 829eced..26e4ee1 100644
@@ -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

#3 lore raw

PATCH 2/2 tools/configure: fix --with-system-{ovmf/seabios}

In reply to 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.

---
Please re-run autogen.sh before committing.

---
 tools/configure.ac | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
tools/configure.ac +6 -8
index f010d72..6788ea2 100644
@@ -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
#4 lore raw

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.

---
Please re-run autogen.sh before committing.

---
 tools/configure.ac | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
tools/configure.ac +0 -0
index f010d72..6788ea2 100644
@@ -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 -4
     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])
 ])

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 -4
 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 · 1 line
2.7.4 (Apple Git-66)

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#5 lore raw

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.

---
Please re-run autogen.sh before committing.

---
 tools/configure.ac | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
tools/configure.ac +0 -0
index f010d72..6788ea2 100644
@@ -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 -4
     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])
 ])

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