xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH 10 of 26] libxl: tweak formatting/whitespace of _libxl_types.h
Date: Mon, 16 Aug 2010 15:33:34 +0100	[thread overview]
Message-ID: <01f64d048f0fef53e638.1281969214@localhost.localdomain> (raw)
In-Reply-To: <patchbomb.1281969204@localhost.localdomain>

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1281969065 -3600
# Node ID 01f64d048f0fef53e638169a204fa0649a9245d1
# Parent  9812d883f7085b9029982fa8e03f5cd5394c1b8b
libxl: tweak formatting/whitespace of _libxl_types.h
to better suit autogeneration

This makes it easier to do a before/after comparison when the file
becomes autogenerated.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

diff -r 9812d883f708 -r 01f64d048f0f tools/libxl/_libxl_types.h
--- a/tools/libxl/_libxl_types.h	Mon Aug 16 15:31:05 2010 +0100
+++ b/tools/libxl/_libxl_types.h	Mon Aug 16 15:31:05 2010 +0100
@@ -9,7 +9,6 @@ typedef struct {
     uint8_t paused:1;
     uint8_t shutdown:1;
     uint8_t dying:1;
-
     /*
      * Valid SHUTDOWN_* value from xen/sched.h iff (shutdown||dying).
      *
@@ -17,7 +16,6 @@ typedef struct {
      * SHUTDOWN_* constant.
      */
     unsigned int shutdown_reason;
-
     uint64_t max_memkb;
     uint64_t cpu_time;
     uint32_t vcpu_max_id;
@@ -36,16 +34,16 @@ typedef struct {
 typedef struct {
     int xen_version_major;
     int xen_version_minor;
-    char *xen_version_extra;
-    char *compiler;
-    char *compile_by;
-    char *compile_domain;
-    char *compile_date;
-    char *capabilities;
-    char *changeset;
+    char * xen_version_extra;
+    char * compiler;
+    char * compile_by;
+    char * compile_domain;
+    char * compile_date;
+    char * capabilities;
+    char * changeset;
     unsigned long virt_start;
     unsigned long pagesize;
-    char *commandline;
+    char * commandline;
 } libxl_version_info;
 
 typedef struct {
@@ -53,22 +51,22 @@ typedef struct {
     bool hap;
     bool oos;
     int ssidref;
-    char *name;
+    char * name;
     libxl_uuid uuid;
     libxl_key_value_list xsdata;
     libxl_key_value_list platformdata;
     uint32_t poolid;
-    char *poolname;
+    char * poolname;
 } libxl_domain_create_info;
 
 typedef struct {
     /*
-     * Path is always set if the file refernece is valid. However if
+     * Path is always set if the file reference is valid. However if
      * mapped is true then the actual file may already be unlinked.
      */
-    char *path;
+    char * path;
     int mapped;
-    void *data;
+    void * data;
     size_t size;
 } libxl_file_reference;
 
@@ -97,18 +95,18 @@ typedef struct {
             bool acpi;
             bool nx;
             bool viridian;
-            char *timeoffset;
+            char * timeoffset;
             bool hpet;
             bool vpt_align;
             int timer_mode;
         } hvm;
         struct {
-            uint32_t   slack_memkb;
-            const char *bootloader;
-            const char *bootloader_args;
-            char *cmdline;
+            uint32_t slack_memkb;
+            const char * bootloader;
+            const char * bootloader_args;
+            char * cmdline;
             libxl_file_reference ramdisk;
-            const char *features;
+            const char * features;
         } pv;
     } u;
 } libxl_domain_build_info;
@@ -120,51 +118,145 @@ typedef struct {
     unsigned long console_mfn;
 } libxl_domain_build_state;
 
+/*
+ * Device Model information.
+ *
+ * Network is missing
+ */
 typedef struct {
     int domid;
-    libxl_uuid uuid; /* this is use only with stubdom, and must be different from the domain uuid */
-    char *dom_name;
-    char *device_model;
-    char *saved_state;
+    /*
+     * this is use only with stubdom, and must be different from the domain uuid
+     */
+    libxl_uuid uuid;
+    char * dom_name;
+    char * device_model;
+    char * saved_state;
     libxl_qemu_machine_type type;
-    int videoram; /* size of the videoram in MB */
-    bool stdvga; /* stdvga enabled or disabled */
-    bool vnc; /* vnc enabled or disabled */
-    char *vnclisten; /* address:port that should be listened on for the VNC server if vnc is set */
-    char *vncpasswd; /* the VNC password */
-    int vncdisplay; /* set VNC display number */
-    bool vncunused; /* try to find an unused port for the VNC server */
-    char *keymap; /* set keyboard layout, default is en-us keyboard */
-    bool sdl; /* sdl enabled or disabled */
-    bool opengl; /* opengl enabled or disabled (if enabled requires sdl enabled) */
-    bool nographic; /* no graphics, use serial port */
-    char *serial; /* serial port re-direct to pty deivce */
-    char *boot; /* boot order, for example dca */
-    bool usb; /* usb support enabled or disabled */
-    char *usbdevice; /* enable usb mouse: tablet for absolute mouse, mouse for PS/2 protocol relative mouse */
-    char *soundhw; /* enable sound hardware */
-    bool apic; /* apic enabled or disabled */
-    int vcpus; /* max number of vcpus */
-    int vcpu_avail; /* vcpus actually available */
-    int xen_platform_pci; /* enable/disable the xen platform pci device */
-    libxl_string_list extra; /* extra parameters pass directly to qemu, NULL terminated */
-    /* Network is missing */
+    /*
+     * size of the videoram in MB
+     */
+    int videoram;
+    /*
+     * stdvga enabled or disabled
+     */
+    bool stdvga;
+    /*
+     * vnc enabled or disabled
+     */
+    bool vnc;
+    /*
+     * address:port that should be listened on for the VNC server if vnc is set
+     */
+    char * vnclisten;
+    /*
+     * the VNC password
+     */
+    char * vncpasswd;
+    /*
+     * set VNC display number
+     */
+    int vncdisplay;
+    /*
+     * try to find an unused port for the VNC server
+     */
+    bool vncunused;
+    /*
+     * set keyboard layout, default is en-us keyboard
+     */
+    char * keymap;
+    /*
+     * sdl enabled or disabled
+     */
+    bool sdl;
+    /*
+     * opengl enabled or disabled (if enabled requires sdl enabled)
+     */
+    bool opengl;
+    /*
+     * no graphics, use serial port
+     */
+    bool nographic;
+    /*
+     * serial port re-direct to pty deivce
+     */
+    char * serial;
+    /*
+     * boot order, for example dca
+     */
+    char * boot;
+    /*
+     * usb support enabled or disabled
+     */
+    bool usb;
+    /*
+     * enable usb mouse: tablet for absolute mouse, mouse for PS/2 protocol relative mouse
+     */
+    char * usbdevice;
+    /*
+     * enable sound hardware
+     */
+    char * soundhw;
+    /*
+     * apic enabled or disabled
+     */
+    bool apic;
+    /*
+     * max number of vcpus
+     */
+    int vcpus;
+    /*
+     * vcpus actually available
+     */
+    int vcpu_avail;
+    /*
+     * enable/disable the xen platform pci device
+     */
+    int xen_platform_pci;
+    /*
+     * extra parameters pass directly to qemu, NULL terminated
+     */
+    libxl_string_list extra;
 } libxl_device_model_info;
 
 typedef struct {
     uint32_t backend_domid;
     uint32_t domid;
     int devid;
-    bool vnc; /* vnc enabled or disabled */
-    char *vnclisten; /* address:port that should be listened on for the VNC server if vnc is set */
-    char *vncpasswd; /* the VNC password */
-    int vncdisplay; /* set VNC display number */
-    bool vncunused; /* try to find an unused port for the VNC server */
-    char *keymap; /* set keyboard layout, default is en-us keyboard */
-    bool sdl; /* sdl enabled or disabled */
-    bool opengl; /* opengl enabled or disabled (if enabled requires sdl enabled) */
-    char *display;
-    char *xauthority;
+    /*
+     * vnc enabled or disabled
+     */
+    bool vnc;
+    /*
+     * address:port that should be listened on for the VNC server if vnc is set
+     */
+    char * vnclisten;
+    /*
+     * the VNC password
+     */
+    char * vncpasswd;
+    /*
+     * set VNC display number
+     */
+    int vncdisplay;
+    /*
+     * try to find an unused port for the VNC server
+     */
+    bool vncunused;
+    /*
+     * set keyboard layout, default is en-us keyboard
+     */
+    char * keymap;
+    /*
+     * sdl enabled or disabled
+     */
+    bool sdl;
+    /*
+     * opengl enabled or disabled (if enabled requires sdl enabled)
+     */
+    bool opengl;
+    char * display;
+    char * xauthority;
 } libxl_device_vfb;
 
 typedef struct {
@@ -178,16 +270,16 @@ typedef struct {
     uint32_t domid;
     int devid;
     libxl_console_consback consback;
-    libxl_domain_build_state *build_state;
-    char *output;
+    libxl_domain_build_state * build_state;
+    char * output;
 } libxl_device_console;
 
 typedef struct {
     uint32_t backend_domid;
     uint32_t domid;
-    char *physpath;
+    char * physpath;
     libxl_disk_phystype phystype;
-    char *virtpath;
+    char * virtpath;
     int unpluggable;
     int readwrite;
     int is_cdrom;
@@ -198,12 +290,12 @@ typedef struct {
     uint32_t domid;
     int devid;
     int mtu;
-    char *model;
+    char * model;
     libxl_mac mac;
     struct in_addr ip;
-    char *bridge;
-    char *ifname;
-    char *script;
+    char * bridge;
+    char * ifname;
+    char * script;
     libxl_nic_type nictype;
 } libxl_device_nic;
 
@@ -219,7 +311,7 @@ typedef struct {
     uint32_t front_filter_mac:1;
     uint32_t pdev;
     uint32_t max_bypasses;
-    char *bridge;
+    char * bridge;
 } libxl_device_net2;
 
 typedef struct {
@@ -243,9 +335,9 @@ typedef struct {
 } libxl_device_pci;
 
 typedef struct {
-    char *backend;
+    char * backend;
     uint32_t backend_id;
-    char *frontend;
+    char * frontend;
     uint32_t frontend_id;
     int devid;
     int state;
@@ -254,13 +346,13 @@ typedef struct {
 } libxl_diskinfo;
 
 typedef struct {
-    char *backend;
+    char * backend;
     uint32_t backend_id;
-    char *frontend;
+    char * frontend;
     uint32_t frontend_id;
     int devid;
     int state;
-    char *script;
+    char * script;
     libxl_mac mac;
     int evtch;
     int rref_tx;
@@ -268,31 +360,49 @@ typedef struct {
 } libxl_nicinfo;
 
 typedef struct {
-    uint32_t vcpuid; /* vcpu's id */
-    uint32_t cpu; /* current mapping */
-    uint8_t online:1; /* currently online (not hotplugged)? */
-    uint8_t blocked:1; /* blocked waiting for an event? */
-    uint8_t running:1; /* currently scheduled on its CPU? */
-    uint64_t vcpu_time; /* total vcpu time ran (ns) */
-    libxl_cpumap cpumap; /* current cpu's affinities */
+    /*
+     * vcpu's id
+     */
+    uint32_t vcpuid;
+    /*
+     * current mapping
+     */
+    uint32_t cpu;
+    /*
+     * currently online (not hotplugged)?
+     */
+    uint8_t online:1;
+    /*
+     * blocked waiting for an event?
+     */
+    uint8_t blocked:1;
+    /*
+     * currently scheduled on its CPU?
+     */
+    uint8_t running:1;
+    /*
+     * total vcpu time ran (ns)
+     */
+    uint64_t vcpu_time;
+    /*
+     * current cpu's affinities
+     */
+    libxl_cpumap cpumap;
 } libxl_vcpuinfo;
 
 typedef struct {
     uint32_t threads_per_core;
     uint32_t cores_per_socket;
-
     uint32_t max_cpu_id;
     uint32_t nr_cpus;
     uint32_t cpu_khz;
-
     uint64_t total_pages;
     uint64_t free_pages;
     uint64_t scrub_pages;
-
     uint32_t nr_nodes;
     libxl_hwcap hw_cap;
     uint32_t phys_cap;
-}  libxl_physinfo;
+} libxl_physinfo;
 
 typedef struct {
     int weight;
@@ -300,9 +410,9 @@ typedef struct {
 } libxl_sched_credit;
 
 typedef struct {
-    char *backend;
+    char * backend;
     uint32_t backend_id;
-    char *frontend;
+    char * frontend;
     uint32_t frontend_id;
     int devid;
     int state;

  parent reply	other threads:[~2010-08-16 14:33 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-16 14:33 [PATCH 00 of 26] libxl: autogenerate type definitions and destructor functions Ian Campbell
2010-08-16 14:33 ` [PATCH 01 of 26] xl: use the regular implicit rules to build the xl .o files Ian Campbell
2010-08-16 14:33 ` [PATCH 02 of 26] libxl: define specific types for string list and key, value list Ian Campbell
2010-08-16 14:33 ` [PATCH 03 of 26] libxl: move various enum and #defines above datastructure definitions Ian Campbell
2010-08-16 14:33 ` [PATCH 04 of 26] libxl: add specific type for cpumap Ian Campbell
2010-08-16 14:33 ` [PATCH 05 of 26] libxl: add specific type for hwcaps Ian Campbell
2010-08-16 14:33 ` [PATCH 06 of 26] libxl: make libxl_console_reader type opaque to users of libxl Ian Campbell
2010-08-16 14:33 ` [PATCH 07 of 26] lbixl: make libxl_device_model_starting " Ian Campbell
2010-08-16 14:33 ` [PATCH 08 of 26] libxl: ensure result of libxl_poolid_to_name is always dynamically allocated Ian Campbell
2010-08-16 14:33 ` [PATCH 09 of 26] libxl: move type definitions into _libxl_types.h Ian Campbell
2010-08-16 14:33 ` Ian Campbell [this message]
2010-08-16 14:33 ` [PATCH 11 of 26] libxl: autogenerate _libxl_types.h Ian Campbell
2010-08-17 11:53   ` Stefano Stabellini
2010-08-17 12:20     ` Ian Campbell
2010-08-16 14:33 ` [PATCH 12 of 26] libxl: generate destructors for each libxl defined type Ian Campbell
2010-08-16 14:33 ` [PATCH 13 of 26] libxl: libxl_device_console.build_state is const Ian Campbell
2010-08-16 14:33 ` [PATCH 14 of 26] libxl: build info bootloader{, _args} are not const Ian Campbell
2010-08-16 14:33 ` [PATCH 15 of 26] libxl: do not generate a destructor for data types which do not require one Ian Campbell
2010-08-16 14:33 ` [PATCH 16 of 26] libxl: implement destroy for libxl_file_reference builtin type Ian Campbell
2010-08-16 14:33 ` [PATCH 17 of 26] xl: free the libxl types contained in struct domain_config Ian Campbell
2010-08-16 14:33 ` [PATCH 18 of 26] libxl: use libxl_version_info_destroy instead of hand-coded do_free_version_info Ian Campbell
2010-08-16 14:33 ` [PATCH 19 of 26] xl: destroy device model info after creation Ian Campbell
2010-08-16 14:33 ` [PATCH 20 of 26] xl: free all data on exit from the domain monitor daemon Ian Campbell
2010-08-17 12:27   ` Stefano Stabellini
2010-08-17 12:33     ` Ian Campbell
2010-08-17 15:11       ` Ian Jackson
2010-08-17 15:12         ` Ian Campbell
2010-08-16 14:33 ` [PATCH 21 of 26] libxl/xl: use libxl_diskinfo_destroy and libxl_device_disk_destroy Ian Campbell
2010-08-16 14:33 ` [PATCH 22 of 26] libxl/xl: Use libxl_device_nic_destroy and libxl_nicinfo_destroy Ian Campbell
2010-08-16 14:33 ` [PATCH 23 of 26] libxl/xl: Use libxl_vcpuinfo_destroy Ian Campbell
2010-08-16 14:33 ` [PATCH 24 of 26] xl: use libxl_device_pci_destroy Ian Campbell
2010-08-16 14:33 ` [PATCH 25 of 26] libxl: do not GC data returned to the caller by libxl_device_disk_getinfo Ian Campbell
2010-08-16 14:33 ` [PATCH 26 of 26] libxl: xs_read accepts NULL for *len parameter Ian Campbell
2010-08-17 12:14 ` [PATCH 00 of 26] libxl: autogenerate type definitions and destructor functions Gianni Tedesco
2010-08-17 12:25   ` Ian Campbell
2010-08-17 12:24     ` Gianni Tedesco
2010-08-17 12:34   ` Stefano Stabellini
2010-08-17 12:37     ` Ian Campbell

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=01f64d048f0fef53e638.1281969214@localhost.localdomain \
    --to=ian.campbell@citrix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).