Hello community,

here is the log from the commit of package xen for openSUSE:Factory
checked in at Mon May 16 10:45:27 CEST 2011.



--------
--- xen/xen.changes     2011-05-10 18:44:07.000000000 +0200
+++ /mounts/work_src_done/STABLE/xen/xen.changes        2011-05-13 
05:23:17.000000000 +0200
@@ -1,0 +2,13 @@
+Thu May 12 21:10:21 MDT 2011 - [email protected]
+
+- Numerous cleanups when compiling with the unused-but-set-variable
+  flag enabled and warnings equal to errors. 
+  xen-warnings-unused.diff
+
+-------------------------------------------------------------------
+Thu May 12 08:30:48 MDT 2011 - [email protected]
+
+- Add a 'long' option to xen-list utility
+  Updated xen-utils-0.1.tar.bz2
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
  xen-warnings-unused.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xen.spec ++++++
--- /var/tmp/diff_new_pack.BSjNQz/_old  2011-05-16 10:43:54.000000000 +0200
+++ /var/tmp/diff_new_pack.BSjNQz/_new  2011-05-16 10:43:54.000000000 +0200
@@ -80,7 +80,7 @@
 BuildRequires:  kernel-source kernel-syms module-init-tools xorg-x11
 %endif
 Version:        4.1.0_01
-Release:        11
+Release:        13
 License:        GPLv2+
 Group:          System/Kernel
 AutoReqProv:    on
@@ -140,16 +140,17 @@
 Patch302:       xen-destdir.diff
 Patch303:       xen-rpmoptflags.diff
 Patch304:       xen-warnings.diff
-Patch305:       xen-changeset.diff
-Patch306:       xen-paths.diff
-Patch307:       xen-xmexample.diff
-Patch308:       xen-xmexample-vti.diff
-Patch309:       xen-fixme-doc.diff
-Patch310:       xen-domUloader.diff
-Patch311:       xen-no-dummy-nfs-ip.diff
-Patch312:       serial-split.patch
-Patch313:       xen-xm-top-needs-root.diff
-Patch314:       xen-max-free-mem.diff
+Patch305:       xen-warnings-unused.diff
+Patch306:       xen-changeset.diff
+Patch307:       xen-paths.diff
+Patch308:       xen-xmexample.diff
+Patch309:       xen-xmexample-vti.diff
+Patch310:       xen-fixme-doc.diff
+Patch311:       xen-domUloader.diff
+Patch312:       xen-no-dummy-nfs-ip.diff
+Patch313:       serial-split.patch
+Patch314:       xen-xm-top-needs-root.diff
+Patch315:       xen-max-free-mem.diff
 Patch322:       bridge-opensuse.patch
 Patch323:       bridge-vlan.diff
 Patch324:       bridge-bonding.diff
@@ -635,6 +636,7 @@
 %patch312 -p1
 %patch313 -p1
 %patch314 -p1
+%patch315 -p1
 %patch322 -p1
 %patch323 -p1
 %patch324 -p1

++++++ x86-ioapic-ack-default.patch ++++++
--- /var/tmp/diff_new_pack.BSjNQz/_old  2011-05-16 10:43:55.000000000 +0200
+++ /var/tmp/diff_new_pack.BSjNQz/_new  2011-05-16 10:43:55.000000000 +0200
@@ -4,7 +4,7 @@
 ===================================================================
 --- xen-4.1.0-testing.orig/xen/arch/x86/io_apic.c
 +++ xen-4.1.0-testing/xen/arch/x86/io_apic.c
-@@ -1546,7 +1546,7 @@ static unsigned int startup_level_ioapic
+@@ -1547,7 +1547,7 @@ static unsigned int startup_level_ioapic
      return 0; /* don't check for pending */
  }
  
@@ -13,7 +13,7 @@
  static void setup_ioapic_ack(char *s)
  {
      if ( !strcmp(s, "old") )
-@@ -2053,6 +2053,8 @@ void __init setup_IO_APIC(void)
+@@ -2054,6 +2054,8 @@ void __init setup_IO_APIC(void)
      else
          io_apic_irqs = ~PIC_IRQS;
  

++++++ x86-show-page-walk-early.patch ++++++
--- /var/tmp/diff_new_pack.BSjNQz/_old  2011-05-16 10:43:55.000000000 +0200
+++ /var/tmp/diff_new_pack.BSjNQz/_new  2011-05-16 10:43:55.000000000 +0200
@@ -74,7 +74,7 @@
 ===================================================================
 --- xen-4.1.0-testing.orig/xen/arch/x86/x86_64/mm.c
 +++ xen-4.1.0-testing/xen/arch/x86/x86_64/mm.c
-@@ -749,6 +749,8 @@ void __init paging_init(void)
+@@ -750,6 +750,8 @@ void __init paging_init(void)
  #undef CNT
  #undef MFN
  

++++++ xen-utils-0.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xen-utils-0.1/Makefile new/xen-utils-0.1/Makefile
--- old/xen-utils-0.1/Makefile  2011-03-21 18:25:15.000000000 +0100
+++ new/xen-utils-0.1/Makefile  2011-05-12 23:17:45.000000000 +0200
@@ -22,7 +22,7 @@
 CFLAGS += -Werror -Wall
 endif
 
-LIBS += -L../xenstore -L../libxc -lxenstore -lxenctrl -lxenguest 
+LIBS += -L../libxc -L../xenstore -lxenstore -lxenctrl -lxenguest 
 
 PROGRAMS = xen-list xen-destroy
 SRCS = xen-list.c xen-destroy.c xen-utils.c 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xen-utils-0.1/xen-destroy.c 
new/xen-utils-0.1/xen-destroy.c
--- old/xen-utils-0.1/xen-destroy.c     2011-03-15 16:56:20.000000000 +0100
+++ new/xen-utils-0.1/xen-destroy.c     2011-05-12 23:59:05.000000000 +0200
@@ -43,7 +43,7 @@
 //Shutdown a domain by signalling this via xenstored
 void shutdown_domain(char *domname)
 {
-       int domid, rcode;
+       int domid;
        char *vm_uuid = NULL;
        char vmpath[64];
        struct xs_handle *xsh = NULL;
@@ -51,14 +51,12 @@
        domid = atoi(domname);
        if (domid == 0) {
                perror("Error, dom 0 could not be shutdown\n");
-               rcode = 1;
                return; 
        }
 
        xsh = xs_daemon_open();
        if (!xsh) {
                perror("Couldn't get xsh handle.");
-               rcode = 1;
                return;
        }
 
@@ -137,6 +135,7 @@
 int getDomidByName(struct xs_handle *xsh, char *domname)
 {
     int domid = 0, i;
+       int __attribute__((__unused__)) ret;
     unsigned int len;
     char path[256];
     char str[256];
@@ -145,7 +144,7 @@
     if( xsh == NULL || domname == NULL)
         return domid;
     sprintf(path, "xenstore-ls /local/domain > /var/tmp/xdestroy_dom_info.%s", 
domname);
-    system(path);
+    ret = system(path);
     sprintf(path, "/var/tmp/xdestroy_dom_info.%s", domname);
     f = fopen(path, "r");
     if (f == NULL)
@@ -179,7 +178,7 @@
     }
     fclose(f);
     sprintf(path, "rm /var/tmp/xdestroy_dom_info.%s", domname);
-    system(path);
+    ret = system(path);
     DEBUG("domid:%d\n", domid);
     return domid;
 }
@@ -189,6 +188,7 @@
     char logpath[256], buf[256],cmd[256];
     FILE *f;
     int path_len, exec_len, i;
+       int __attribute__((__unused__)) ret;
     
     f = fopen("/etc/xen/xend-config.sxp", "r");
     if (f == NULL)
@@ -216,7 +216,7 @@
                 sprintf(cmd, "echo %s stop %d `hostname` `date` >> %s", 
                         domname, DeviceModel_id, (char *)(logpath + i));
                 DEBUG("%s\n",cmd);
-                system(cmd);
+                ret = system(cmd);
             }
             continue;
         }
@@ -232,7 +232,7 @@
                 sprintf(cmd, "%s %s stop %d `hostname` `date`", 
                         (char *)(logpath + i), domname, DeviceModel_id);
                 DEBUG("--cmd:%s\n",cmd);
-                system(cmd);
+                ret = system(cmd);
             }
              
             continue; 
@@ -244,7 +244,8 @@
 
 int destroy_domain(char *domname)
 {
-       int domid, rcode, ret, i, DMid, status;
+       int domid, rcode, i, DMid, status;
+       int __attribute__((__unused__)) ret;
 #ifdef XENCTRL_HAS_XC_INTERFACE
     xc_interface *xc_handle = NULL;
 #else
@@ -336,7 +337,7 @@
 
         //notify backend to reap the source assigned to this VM
         sprintf(path, "xenstore-ls /local/domain/%d/device > 
/var/tmp/xdestroy_device.%d", domid, domid); 
-        system(path);
+        ret = system(path);
         sprintf(path, "/var/tmp/xdestroy_device.%d",  domid); 
         f = fopen(path, "r");
         if ( f == NULL)
@@ -365,7 +366,7 @@
        DEBUG("- end to reap\n");
        fclose(f);
        sprintf(path, "rm /var/tmp/xdestroy_device.%d",  domid); 
-       system(path);
+       ret = system(path);
        extra_call(domname, DMid);
 out:
        if (xsh)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xen-utils-0.1/xen-utils.c 
new/xen-utils-0.1/xen-utils.c
--- old/xen-utils-0.1/xen-utils.c       2011-03-15 16:55:10.000000000 +0100
+++ new/xen-utils-0.1/xen-utils.c       2011-05-12 23:42:27.000000000 +0200
@@ -25,11 +25,17 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <getopt.h>
 
 #include "xen-utils.h"
 
+#ifdef XENCTRL_HAS_XC_INTERFACE
+#define libxc_handle xc_interface*
+#else
+#define libxc_handle int
+#endif
 
-char *get_vncport(struct xs_handle *xsh, uint32_t domid)
+static char *get_vncport(struct xs_handle *xsh, uint32_t domid)
 {
        unsigned int len;
        char *path;
@@ -44,7 +50,7 @@
        return s;
 }
 
-char *domid_to_domname(struct xs_handle *xsh, uint32_t domid)
+static char *domid_to_domname(struct xs_handle *xsh, uint32_t domid)
 {
        unsigned int len;
        char *path;
@@ -68,30 +74,43 @@
        return s;
 }
 
-char *domid_to_vm_uuid(struct xs_handle *xsh, uint32_t domid)
+static void print_dom_expanded(struct xs_handle *xsh,
+                               xc_dominfo_t dominfo,
+                               const char *name,
+                               int show_long)
 {
-       unsigned int len;
-       char *path;
-       char *s;
-       
-    if (asprintf(&path, "/local/domain/%u/vm", domid) < 0)
-        return NULL;
-    
-       s = xs_read(xsh, XBT_NULL, path, &len);
-    free(path);
-    
-       return s;
+    unsigned long dommem = (dominfo.nr_pages * (XC_PAGE_SIZE / 1024UL)) / 
1024UL;
+    char *vncport = get_vncport(xsh, dominfo.domid);
+    char *uuid = domid_to_vm_uuid(xsh, dominfo.domid);
+
+    printf("Name:   %s\n", name);
+    printf("ID:     %d\n", dominfo.domid);
+    printf("Mem:    %lu\n", dommem);
+    printf("VCPUs:  %d\n", dominfo.nr_online_vcpus); 
+    printf("State:  %c%c%c%c%c\n",
+           dominfo.running ? 'r' : '-',
+           dominfo.blocked ? 'b' : '-',
+           dominfo.paused ? 'p' : '-',
+           dominfo.dying ? 'd' : '-',
+           dominfo.crashed ? 'c' : '-');
+    printf("Time:   %-8.1f\n", ((float)dominfo.cpu_time / 1e9));
+    if (show_long) {
+        printf("VPort: %s\n", vncport ? vncport : "Noport");
+        printf("UUID:   %s\n", uuid+4);
+    }
 }
 
-void print_dom(xc_dominfo_t dominfo,
-               const char *name,
-               const char *vncport,
-               int compact)
+static void print_dom(struct xs_handle *xsh,
+                      xc_dominfo_t dominfo,
+                      const char *name,
+                      int show_long)
 {
     unsigned long dommem = (dominfo.nr_pages * (XC_PAGE_SIZE / 1024UL)) / 
1024UL;
+    char *vncport = get_vncport(xsh, dominfo.domid);
+    char *uuid = domid_to_vm_uuid(xsh, dominfo.domid);
 
-    if (compact) {
-        printf("%-40s %5d %5lu %5d      %c%c%c%c%c  %8.1f  %s\n",
+    if (show_long)
+        printf("%-40s %5d %5lu %5d      %c%c%c%c%c  %8.1f  %s  %s\n",
                name,
                dominfo.domid,
                dommem,
@@ -102,21 +121,41 @@
                dominfo.dying ? 'd' : '-',
                dominfo.crashed ? 'c' : '-',
                ((float)dominfo.cpu_time / 1e9),
-               vncport ? vncport : "Noport");
-    } else {
-        printf("Name:  %s\n", name);
-        printf("ID:    %d\n", dominfo.domid);
-        printf("Mem:   %lu\n", dommem);
-        printf("VCPUs: %d\n", dominfo.nr_online_vcpus); 
-        printf("State: %c%c%c%c%c\n",
+               vncport ? vncport : "Noport",
+               uuid + 4);
+    else
+        printf("%-40s %5d %5lu %5d      %c%c%c%c%c  %8.1f\n",
+               name,
+               dominfo.domid,
+               dommem,
+               dominfo.nr_online_vcpus,
                dominfo.running ? 'r' : '-',
                dominfo.blocked ? 'b' : '-',
                dominfo.paused ? 'p' : '-',
                dominfo.dying ? 'd' : '-',
-               dominfo.crashed ? 'c' : '-');
-        printf("Time:  %8.1f\n", ((float)dominfo.cpu_time / 1e9));
-        printf("VPort: %s\n", vncport ? vncport : "Noport");
-    }
+               dominfo.crashed ? 'c' : '-',
+               ((float)dominfo.cpu_time / 1e9));
+}
+
+static void usage(const char *name)
+{
+    fprintf(stderr, "usage: %s [-l|--long] [domname]\n", name);
+
+}
+
+char *domid_to_vm_uuid(struct xs_handle *xsh, uint32_t domid)
+{
+       unsigned int len;
+       char *path;
+       char *s;
+       
+    if (asprintf(&path, "/local/domain/%u/vm", domid) < 0)
+        return NULL;
+    
+       s = xs_read(xsh, XBT_NULL, path, &len);
+    free(path);
+    
+       return s;
 }
 
 int xlist(int argc, char **argv)
@@ -126,18 +165,34 @@
        uint32_t first_dom = 0;
        int max_doms = 1024, nr_doms, i;
 #ifdef XENCTRL_HAS_XC_INTERFACE
-    xc_interface *xc_handle;
+    libxc_handle xc_handle = NULL;
 #else
-    int xc_handle;
+    libxc_handle xc_handle = 0;
 #endif
        struct xs_handle *xsh = NULL;
-       char *domname, *vncport;
-
-    if (argc > 2) {
-               fprintf(stderr, "usage: %s [domU-name]\n", argv[0]);
-               return 1;
+    char *domname;
+    char *req_domname = NULL;
+    int show_long = 0;
+    int c;
+    static struct option longopts[] = {
+        {"long", no_argument, NULL, 'l'},
+        {0, 0, 0, 0}
+    };
+    
+    while ((c = getopt_long(argc, argv, "l", longopts, NULL)) != -1) {
+               switch (c) {
+            case 'l':
+                show_long = 1;
+                break;
+            default:
+                usage(argv[0]);
+                goto out;
+               }
     }
-        
+
+    if (optind < argc)
+        req_domname = argv[optind];
+    
 #ifdef XENCTRL_HAS_XC_INTERFACE
        xc_handle = xc_interface_open(NULL, NULL, 0);
        if (xc_handle == NULL) {
@@ -167,36 +222,41 @@
                goto out;
        }
 
-       if (argc == 1) {
-               printf("Name                                        ID   Mem 
VCPUs\tState\tTime(s)\tVnc-port\n");
+    /* Find requested domain and print its info */
+    if (req_domname) {
                for (i = 0; i < nr_doms; i++) {
                        domname = domid_to_domname(xsh, info[i].domid);
             if (domname == NULL)
                 continue;
-                       vncport = get_vncport(xsh, info[i].domid);
-            print_dom(info[i], domname, vncport, 1);
-                       free(domname);
-                       free(vncport);
-               }
-        rcode = 0;
-       } else if (argc == 2) {
-               for (i = 0; i < nr_doms; i++) {
-                       domname = domid_to_domname(xsh, info[i].domid);
-                       if (domname && strncmp(argv[1], domname, 
strlen(argv[1])+1) == 0) {
-                               vncport = get_vncport(xsh, info[i].domid);
-                print_dom(info[i], domname, vncport, 0);
+            
+                       if (strncmp(req_domname, domname, 
strlen(req_domname)+1) == 0) {
+                print_dom_expanded(xsh, info[i], domname, show_long);
                                free(domname);
-                               free(vncport);
                                rcode = 0;
                                goto out;
                        }
             free(domname);
                }
-               if ( i == nr_doms ) {
-                       fprintf(stderr, "Unable to find domain named %s\n", 
argv[1]);
-                       goto out;
-               }
-       }
+        fprintf(stderr, "Unable to find domain '%s'\n", req_domname);
+        usage(argv[0]);
+        goto out;
+    }
+    
+    /* Not a specific domain requested so print info on all domains */
+    if (show_long)
+            printf("Name                                        ID   Mem 
VCPUs\tState\tTime(s)\tVnc-port\tUUID\n");
+        else
+            printf("Name                                        ID   Mem 
VCPUs\tState\tTime(s)\t\n");
+    
+    for (i = 0; i < nr_doms; i++) {
+        domname = domid_to_domname(xsh, info[i].domid);
+        if (domname == NULL)
+            continue;
+        print_dom(xsh, info[i], domname, show_long);
+        free(domname);
+    }
+
+    rcode = 0;
     
 out:
        if (xsh)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xen-utils-0.1/xen-utils.h 
new/xen-utils-0.1/xen-utils.h
--- old/xen-utils-0.1/xen-utils.h       2010-12-15 19:01:52.000000000 +0100
+++ new/xen-utils-0.1/xen-utils.h       2011-05-12 16:05:11.000000000 +0200
@@ -23,19 +23,10 @@
 #ifndef __XEN_UTIL_H__
 #define __XEN_UTIL_H__
 
-#include <xenctrl.h>
 #include <xs.h>
 
-char *get_vncport(struct xs_handle *xsh, uint32_t domid);
-
-char *domid_to_domname(struct xs_handle *xsh, uint32_t domid);
-
 char *domid_to_vm_uuid(struct xs_handle *xsh, uint32_t domid);
 
-void print_dom(xc_dominfo_t dominfo,
-               const char *name,
-               const char *vncport,
-               int compact);
 int xlist(int argc, char **argv);
 
 #endif /* __XEN_UTIL_H__ */

++++++ xen-warnings-unused.diff ++++++
++++ 758 lines (skipped)

++++++ xen-warnings.diff ++++++
--- /var/tmp/diff_new_pack.BSjNQz/_old  2011-05-16 10:43:56.000000000 +0200
+++ /var/tmp/diff_new_pack.BSjNQz/_new  2011-05-16 10:43:56.000000000 +0200
@@ -78,6 +78,24 @@
  
  TDB_CONTEXT *tdb_context(struct connection *conn)
  {
+@@ -130,7 +130,7 @@ void trace(const char *fmt, ...)
+       va_list arglist;
+       char *str;
+       char sbuf[1024];
+-      int ret, dummy;
++      int ret, __attribute__((__unused__)) dummy;
+ 
+       if (tracefd < 0)
+               return;
+@@ -200,7 +200,7 @@ void trace_destroy(const void *data, con
+ static void trigger_reopen_log(int signal __attribute__((unused)))
+ {
+       char c = 'A';
+-      int dummy;
++      int __attribute__((__unused__)) dummy;
+       dummy = write(reopen_log_pipe[1], &c, 1);
+ }
+ 
 @@ -1786,10 +1786,10 @@ int main(int argc, char *argv[])
                        remove_local = false;
                        break;
@@ -198,3 +216,22 @@
  #define WRITE 1
  
  /*Control Messages between manager and tapdev*/
+Index: xen-4.1.0-testing/xen/arch/x86/io_apic.c
+===================================================================
+--- xen-4.1.0-testing.orig/xen/arch/x86/io_apic.c
++++ xen-4.1.0-testing/xen/arch/x86/io_apic.c
+@@ -227,12 +227,13 @@ int restore_IO_APIC_setup(struct IO_APIC
+         if (!ioapic_entries[apic])
+             return -ENOMEM;
+ 
+-        for (pin = 0; pin < nr_ioapic_registers[apic]; pin++)
++        for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {
+             entry = ioapic_entries[apic][pin];
+             spin_lock_irqsave(&ioapic_lock, flags);
+             __io_apic_write(apic, 0x11+2*pin, *(((int *)&entry)+1));
+             __io_apic_write(apic, 0x10+2*pin, *(((int *)&entry)+0));
+             spin_unlock_irqrestore(&ioapic_lock, flags);
++        }
+     }
+ 
+     return 0;

++++++ xenalyze.gcc46.patch ++++++
--- /var/tmp/diff_new_pack.BSjNQz/_old  2011-05-16 10:43:56.000000000 +0200
+++ /var/tmp/diff_new_pack.BSjNQz/_new  2011-05-16 10:43:56.000000000 +0200
@@ -120,3 +120,21 @@
  
      /* Close vmexits when the putative reason for blocking / &c stops.
       * This way, we don't account cpu contention to some other overhead. */
+@@ -9284,7 +9263,7 @@ error_t cmd_parser(int key, char *arg, s
+ 
+     case OPT_TOLERANCE:
+     {
+-        char * inval, *p;
++        char * inval;
+ 
+         opt.tolerance = (int)strtol(arg, &inval, 0);
+ 
+@@ -9298,8 +9277,6 @@ error_t cmd_parser(int key, char *arg, s
+             exit(1);
+         }
+ 
+-        p = inval;
+-
+         printf("Tolerating errors at or below %d\n",
+                opt.tolerance);
+     }



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to