All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Fehlig <jfehlig@novell.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH][libxen] Fix 'contents' field of set structures in libxen iinterface
Date: Fri, 03 Nov 2006 17:41:31 -0700	[thread overview]
Message-ID: <454BE1BB.7050000@novell.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 491 bytes --]

Many of the set structures in the libxen interface contain a 'contents' 
field with too many dimensions, particularly when 'contents' stores 
references.  References are defined in the various xen_*_decl.h headers 
as 'void *'.  Sets of the various classes are defined for example as

  typedef void *xen_vm;

  typedef struct xen_vm_set
  {
     size_t size;
     xen_vm *contents[];
  } xen_vm_set;

The additional dimension on 'contents' for sets of references is not 
required.

- Jim



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libxen_set_struct.patch --]
[-- Type: text/x-patch; name="libxen_set_struct.patch", Size: 4187 bytes --]

# HG changeset patch
# User jfehlig@jfehlig2.provo.novell.com
# Date 1162600035 25200
# Node ID 1db6537014fea7042b5b5be0031d1a74ec0f6581
# Parent  20204db0891b0b7c10959822e3283656c3600500
Many of the xen_*_set structures in the libxen interface contain a 'contents' field with too many dimensions, particularly when 'contents' stores references.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>

diff -r 20204db0891b -r 1db6537014fe tools/libxen/include/xen_host_cpu.h
--- a/tools/libxen/include/xen_host_cpu.h	Thu Nov 02 18:52:04 2006 +0000
+++ b/tools/libxen/include/xen_host_cpu.h	Fri Nov 03 17:27:15 2006 -0700
@@ -43,7 +43,7 @@ typedef struct xen_host_cpu_set
 typedef struct xen_host_cpu_set
 {
     size_t size;
-    xen_host_cpu *contents[];
+    xen_host_cpu contents[];
 } xen_host_cpu_set;
 
 /**
diff -r 20204db0891b -r 1db6537014fe tools/libxen/include/xen_network.h
--- a/tools/libxen/include/xen_network.h	Thu Nov 02 18:52:04 2006 +0000
+++ b/tools/libxen/include/xen_network.h	Fri Nov 03 17:27:15 2006 -0700
@@ -43,7 +43,7 @@ typedef struct xen_network_set
 typedef struct xen_network_set
 {
     size_t size;
-    xen_network *contents[];
+    xen_network contents[];
 } xen_network_set;
 
 /**
diff -r 20204db0891b -r 1db6537014fe tools/libxen/include/xen_pif.h
--- a/tools/libxen/include/xen_pif.h	Thu Nov 02 18:52:04 2006 +0000
+++ b/tools/libxen/include/xen_pif.h	Fri Nov 03 17:27:15 2006 -0700
@@ -44,7 +44,7 @@ typedef struct xen_pif_set
 typedef struct xen_pif_set
 {
     size_t size;
-    xen_pif *contents[];
+    xen_pif contents[];
 } xen_pif_set;
 
 /**
diff -r 20204db0891b -r 1db6537014fe tools/libxen/include/xen_sr.h
--- a/tools/libxen/include/xen_sr.h	Thu Nov 02 18:52:04 2006 +0000
+++ b/tools/libxen/include/xen_sr.h	Fri Nov 03 17:27:15 2006 -0700
@@ -42,7 +42,7 @@ typedef struct xen_sr_set
 typedef struct xen_sr_set
 {
     size_t size;
-    xen_sr *contents[];
+    xen_sr contents[];
 } xen_sr_set;
 
 /**
diff -r 20204db0891b -r 1db6537014fe tools/libxen/include/xen_user.h
--- a/tools/libxen/include/xen_user.h	Thu Nov 02 18:52:04 2006 +0000
+++ b/tools/libxen/include/xen_user.h	Fri Nov 03 17:27:15 2006 -0700
@@ -41,7 +41,7 @@ typedef struct xen_user_set
 typedef struct xen_user_set
 {
     size_t size;
-    xen_user *contents[];
+    xen_user contents[];
 } xen_user_set;
 
 /**
diff -r 20204db0891b -r 1db6537014fe tools/libxen/include/xen_vbd.h
--- a/tools/libxen/include/xen_vbd.h	Thu Nov 02 18:52:04 2006 +0000
+++ b/tools/libxen/include/xen_vbd.h	Fri Nov 03 17:27:15 2006 -0700
@@ -45,7 +45,7 @@ typedef struct xen_vbd_set
 typedef struct xen_vbd_set
 {
     size_t size;
-    xen_vbd *contents[];
+    xen_vbd contents[];
 } xen_vbd_set;
 
 /**
diff -r 20204db0891b -r 1db6537014fe tools/libxen/include/xen_vdi.h
--- a/tools/libxen/include/xen_vdi.h	Thu Nov 02 18:52:04 2006 +0000
+++ b/tools/libxen/include/xen_vdi.h	Fri Nov 03 17:27:15 2006 -0700
@@ -44,7 +44,7 @@ typedef struct xen_vdi_set
 typedef struct xen_vdi_set
 {
     size_t size;
-    xen_vdi *contents[];
+    xen_vdi contents[];
 } xen_vdi_set;
 
 /**
diff -r 20204db0891b -r 1db6537014fe tools/libxen/include/xen_vif.h
--- a/tools/libxen/include/xen_vif.h	Thu Nov 02 18:52:04 2006 +0000
+++ b/tools/libxen/include/xen_vif.h	Fri Nov 03 17:27:15 2006 -0700
@@ -44,7 +44,7 @@ typedef struct xen_vif_set
 typedef struct xen_vif_set
 {
     size_t size;
-    xen_vif *contents[];
+    xen_vif contents[];
 } xen_vif_set;
 
 /**
diff -r 20204db0891b -r 1db6537014fe tools/libxen/include/xen_vm.h
--- a/tools/libxen/include/xen_vm.h	Thu Nov 02 18:52:04 2006 +0000
+++ b/tools/libxen/include/xen_vm.h	Fri Nov 03 17:27:15 2006 -0700
@@ -52,7 +52,7 @@ typedef struct xen_vm_set
 typedef struct xen_vm_set
 {
     size_t size;
-    xen_vm *contents[];
+    xen_vm contents[];
 } xen_vm_set;
 
 /**
diff -r 20204db0891b -r 1db6537014fe tools/libxen/include/xen_vtpm.h
--- a/tools/libxen/include/xen_vtpm.h	Thu Nov 02 18:52:04 2006 +0000
+++ b/tools/libxen/include/xen_vtpm.h	Fri Nov 03 17:27:15 2006 -0700
@@ -44,7 +44,7 @@ typedef struct xen_vtpm_set
 typedef struct xen_vtpm_set
 {
     size_t size;
-    xen_vtpm *contents[];
+    xen_vtpm contents[];
 } xen_vtpm_set;
 
 /**

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

             reply	other threads:[~2006-11-04  0:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-04  0:41 Jim Fehlig [this message]
2006-11-08 15:09 ` [PATCH][libxen] Fix 'contents' field of set structures in libxen iinterface Ewan Mellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=454BE1BB.7050000@novell.com \
    --to=jfehlig@novell.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.