WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Formatting fixes for xenstat and xentop.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Formatting fixes for xenstat and xentop.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 26 Aug 2005 08:52:10 +0000
Delivery-date: Fri, 26 Aug 2005 08:50:37 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID af7251014caf505b58d470480fce04854d05e11e
# Parent  f850ac27a8d2a99c73c48f65c29d679f90f92d58
Formatting fixes for xenstat and xentop.
Signed-off-by: Josh Triplett <josht@xxxxxxxxxx>
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r f850ac27a8d2 -r af7251014caf 
tools/xenstat/libxenstat/src/xen-interface.c
--- a/tools/xenstat/libxenstat/src/xen-interface.c      Fri Aug 26 08:46:28 2005
+++ b/tools/xenstat/libxenstat/src/xen-interface.c      Fri Aug 26 08:47:49 2005
@@ -59,14 +59,15 @@
 }
 
 /* Make simple xen version hypervisor calls */
-static int xi_make_xen_version_hypercall(xi_handle *handle, long *vnum, 
xen_extraversion_t *ver)
+static int xi_make_xen_version_hypercall(xi_handle *handle, long *vnum,
+                                        xen_extraversion_t *ver)
 {
        privcmd_hypercall_t privcmd;
        multicall_entry_t multicall[2];
        int ret = 0;
 
        /* set up for doing hypercall */
-       privcmd.op = __HYPERVISOR_multicall; 
+       privcmd.op = __HYPERVISOR_multicall;
        privcmd.arg[0] = (unsigned long)multicall;
        privcmd.arg[1] = 2;
 
@@ -75,7 +76,7 @@
        multicall[0].args[0] = (unsigned long)XENVER_version;
 
        /* second to get xen version flag */
-       multicall[1].op = __HYPERVISOR_xen_version; 
+       multicall[1].op = __HYPERVISOR_xen_version;
        multicall[1].args[0] = (unsigned long)XENVER_extraversion;
        multicall[1].args[1] = (unsigned long)ver;
 
@@ -104,7 +105,8 @@
 }
 
 /* Make Xen Dom0 op hypervisor call */
-static int xi_make_dom0_op(xi_handle *handle, dom0_op_t *dom_op, int 
dom_opcode)
+static int xi_make_dom0_op(xi_handle *handle, dom0_op_t *dom_op,
+                          int dom_opcode)
 {
        privcmd_hypercall_t privcmd;
        int ret = 0;
@@ -191,11 +193,10 @@
 }
 
 /* gets xen version information from hypervisor */
-int xi_get_xen_version(xi_handle *handle, long *vnum, xen_extraversion_t *ver) 
-{
-
-        /* gets the XENVER_version and XENVER_extraversion */
-       if (xi_make_xen_version_hypercall( handle, vnum, ver) < 0) {; 
+int xi_get_xen_version(xi_handle *handle, long *vnum, xen_extraversion_t *ver)
+{
+       /* gets the XENVER_version and XENVER_extraversion */
+       if (xi_make_xen_version_hypercall( handle, vnum, ver) < 0) {
                perror("XEN VERSION Hypercall failed");
                return -1;
        }
diff -r f850ac27a8d2 -r af7251014caf tools/xenstat/libxenstat/src/xenstat.c
--- a/tools/xenstat/libxenstat/src/xenstat.c    Fri Aug 26 08:46:28 2005
+++ b/tools/xenstat/libxenstat/src/xenstat.c    Fri Aug 26 08:47:49 2005
@@ -33,7 +33,7 @@
        FILE *procnetdev;
 };
 
-#define SHORT_ASC_LEN 5                /* length of 65535 */
+#define SHORT_ASC_LEN 5                 /* length of 65535 */
 #define VERSION_SIZE (2 * SHORT_ASC_LEN + 1 + sizeof(xen_extraversion_t) + 1)
 
 struct xenstat_node {
@@ -170,7 +170,7 @@
        xenstat_node *node;
        dom0_physinfo_t physinfo;
        xen_extraversion_t version;
-       long vnum = 0; 
+       long vnum = 0;
        dom0_getdomaininfo_t domaininfo[DOMAIN_CHUNK_SIZE];
        unsigned int num_domains, new_domains;
        unsigned int i;
@@ -188,11 +188,11 @@
 
        /* Get the xen version number and xen version tag */
        if (xi_get_xen_version(handle->xihandle, &vnum, &version) < 0) {
-               free(node); 
+               free(node);
                return NULL;
-       } 
-       snprintf(node->xen_version, VERSION_SIZE,
-               "%ld.%ld%s\n", ((vnum >> 16) & 0xFFFF), vnum & 0xFFFF, (char 
*)version); 
+       }
+       snprintf(node->xen_version, VERSION_SIZE, "%ld.%ld%s\n",
+                ((vnum >> 16) & 0xFFFF), vnum & 0xFFFF, version);
 
        node->cpu_hz = ((unsigned long long)physinfo.cpu_khz) * 1000ULL;
        node->num_cpus =
diff -r f850ac27a8d2 -r af7251014caf tools/xenstat/libxenstat/src/xenstat.h
--- a/tools/xenstat/libxenstat/src/xenstat.h    Fri Aug 26 08:46:28 2005
+++ b/tools/xenstat/libxenstat/src/xenstat.h    Fri Aug 26 08:47:49 2005
@@ -51,6 +51,7 @@
 /* Get the domain with the given index; used to loop over all domains. */
 xenstat_domain *xenstat_node_domain_by_index(xenstat_node * node,
                                             unsigned index);
+
 /* Get xen version of the node */
 const char *xenstat_node_xen_ver(xenstat_node * node);
 
diff -r f850ac27a8d2 -r af7251014caf tools/xenstat/xentop/xentop.c
--- a/tools/xenstat/xentop/xentop.c     Fri Aug 26 08:46:28 2005
+++ b/tools/xenstat/xentop/xentop.c     Fri Aug 26 08:47:49 2005
@@ -519,8 +519,8 @@
        print("%4u", xenstat_domain_num_networks(domain));
 }
 
-/* Compares number of total network tx bytes of two domains, returning -1,0,1 
for
- * <,=,> */
+/* Compares number of total network tx bytes of two domains, returning -1,0,1
+ * for <,=,> */
 static int compare_net_tx(xenstat_domain *domain1, xenstat_domain *domain2)
 {
        return -compare(tot_net_bytes(domain1, FALSE),
@@ -533,8 +533,8 @@
        print("%8llu", tot_net_bytes(domain, FALSE)/1024);
 }
 
-/* Compares number of total network rx bytes of two domains, returning -1,0,1 
for
- * <,=,> */
+/* Compares number of total network rx bytes of two domains, returning -1,0,1
+ * for <,=,> */
 static int compare_net_rx(xenstat_domain *domain1, xenstat_domain *domain2)
 {
        return -compare(tot_net_bytes(domain1, TRUE),
@@ -555,7 +555,7 @@
        int i = 0;
        xenstat_network *network;
        unsigned num_networks = 0;
-        unsigned long long total = 0;
+       unsigned long long total = 0;
 
        /* How many networks? */
        num_networks = xenstat_domain_num_networks(domain);
@@ -564,12 +564,13 @@
        for (i=0; i < num_networks; i++) {
                /* Next get the network information */
                network = xenstat_domain_network(domain,i);
-                if (rx_flag) 
+               if (rx_flag)
                        total += xenstat_network_rbytes(network);
-                else 
+               else
                        total += xenstat_network_tbytes(network);
        }
-        return (total);
+
+       return total;
 }
 
 /* Compares security id (ssid) of two domains, returning -1,0,1 for <,=,> */

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Formatting fixes for xenstat and xentop., Xen patchbot -unstable <=