From: Alex Sharp Subject: [PATCH] Fix stubdom build failure for RELEASE-4.3.1 Date: Thu, 31 Oct 2013 14:44:21 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8111182691315479113==" Return-path: Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --===============8111182691315479113== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_A4D3962C02EE81408CC4341DF532AAC3364466Exchange2orionvmc_" --_000_A4D3962C02EE81408CC4341DF532AAC3364466Exchange2orionvmc_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hey, I noticed that RELEASE-4.3.1 (commit 4e8e0bdef96859e6f428af74be6f4a3bc7fd11= f3) was failing to make stubdom, complaining of various forms of format str= ing mismatch. The following patch at least gets things to compile, but I'm = not sure if there's a deeper underlying issue. I'm using gcc version 4.8.1 = (Ubuntu/Linaro 4.8.1-10ubuntu8) on x86_64. My .config contains the line "PY= THON_PREFIX_ARG=3D--install-layout=3Ddeb" and I'm ./configuring with --pref= ix=3D Hope this helps. diff --git a/extras/mini-os/fbfront.c b/extras/mini-os/fbfront.c index 54a5e67..b6aaa6b 100644 --- a/extras/mini-os/fbfront.c +++ b/extras/mini-os/fbfront.c @@ -105,7 +105,7 @@ again: free(err); } - err =3D xenbus_printf(xbt, nodename, "page-ref","%u", virt_to_mfn(s)); + err =3D xenbus_printf(xbt, nodename, "page-ref","%lu", virt_to_mfn(s))= ; if (err) { message =3D "writing page-ref"; goto abort_transaction; @@ -463,7 +463,7 @@ again: free(err); } - err =3D xenbus_printf(xbt, nodename, "page-ref","%u", virt_to_mfn(s)); + err =3D xenbus_printf(xbt, nodename, "page-ref","%lu", virt_to_mfn(s))= ; if (err) { message =3D "writing page-ref"; goto abort_transaction; diff --git a/extras/mini-os/pcifront.c b/extras/mini-os/pcifront.c index bbe21e0..9d0cb17 100644 --- a/extras/mini-os/pcifront.c +++ b/extras/mini-os/pcifront.c @@ -413,7 +413,7 @@ int pcifront_physical_to_virtual (struct pcifront_dev *= dev, continue; } - if (sscanf(s, "%x:%x:%x.%x", dom, bus, slot, fun) !=3D 4) { + if (sscanf(s, "%x:%x:%x.%lx", dom, bus, slot, fun) !=3D 4) { printk("\"%s\" does not look like a PCI device address\n",= s); free(s); continue; diff --git a/extras/mini-os/xenbus/xenbus.c b/extras/mini-os/xenbus/xenbus.= c index ee1691b..fa2e872 100644 --- a/extras/mini-os/xenbus/xenbus.c +++ b/extras/mini-os/xenbus/xenbus.c @@ -672,7 +672,7 @@ char *xenbus_transaction_start(xenbus_transaction_t *xb= t) err =3D errmsg(rep); if (err) return err; - sscanf((char *)(rep + 1), "%u", xbt); + sscanf((char *)(rep + 1), "%lu", xbt); free(rep); return NULL; } @@ -769,7 +769,7 @@ domid_t xenbus_get_self_id(void) domid_t ret; BUG_ON(xenbus_read(XBT_NIL, "domid", &dom_id)); - sscanf(dom_id, "%d", &ret); + sscanf(dom_id, "%u", (unsigned int*)&ret); return ret; } --_000_A4D3962C02EE81408CC4341DF532AAC3364466Exchange2orionvmc_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hey,

I noticed that RELEASE-4.3.1 (commit 4e8e0bdef96859e6f428af74be6f4a3bc7fd11= f3) was failing to make stubdom, complaining of various forms of format str= ing mismatch. The following patch at least gets things to compile, but I'm = not sure if there's a deeper underlying issue. I'm using gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu8) on x86_= 64. My .config contains the line "PYTHON_PREFIX_ARG=3D--install-layout= =3Ddeb" and I'm ./configuring with --prefix=3D

Hope this helps.

diff --git a/extras/mini-os/fbfront.c b/extras/mini-os/fbfront.c
index 54a5e67..b6aaa6b 100644
--- a/extras/mini-os/fbfront.c
+++ b/extras/mini-os/fbfront.c
@@ -105,7 +105,7 @@ again:
         free(err);
     }
 
-    err =3D xenbus_printf(xbt, nodename, "page-ref&quo= t;,"%u", virt_to_mfn(s));
+    err =3D xenbus_printf(xbt, nodename, "page-ref= ","%lu", virt_to_mfn(s));
     if (err) {
         message =3D "writing = page-ref";
         goto abort_transaction; @@ -463,7 +463,7 @@ again:
         free(err);
     }
 
-    err =3D xenbus_printf(xbt, nodename, "page-ref&quo= t;,"%u", virt_to_mfn(s));
+    err =3D xenbus_printf(xbt, nodename, "page-ref= ","%lu", virt_to_mfn(s));
     if (err) {
         message =3D "writing = page-ref";
         goto abort_transaction; diff --git a/extras/mini-os/pcifront.c b/extras/mini-os/pcifront.c
index bbe21e0..9d0cb17 100644
--- a/extras/mini-os/pcifront.c
+++ b/extras/mini-os/pcifront.c
@@ -413,7 +413,7 @@ int pcifront_physical_to_virtual (struct pcifront_d= ev *dev,
            &nb= sp;    continue;
             }<= br>  
-            if (ssc= anf(s, "%x:%x:%x.%x", dom, bus, slot, fun) !=3D 4) {
+            if = (sscanf(s, "%x:%x:%x.%lx", dom, bus, slot, fun) !=3D 4) {
            &nb= sp;    printk("\"%s\" does not look like a PC= I device address\n", s);
            &nb= sp;    free(s);
            &nb= sp;    continue;
diff --git a/extras/mini-os/xenbus/xenbus.c b/extras/mini-os/xenbus/xenbus.= c
index ee1691b..fa2e872 100644
--- a/extras/mini-os/xenbus/xenbus.c
+++ b/extras/mini-os/xenbus/xenbus.c
@@ -672,7 +672,7 @@ char *xenbus_transaction_start(xenbus_transaction_t= *xbt)
     err =3D errmsg(rep);
     if (err)
        return err;
-    sscanf((char *)(rep + 1), "%u", xbt);
+    sscanf((char *)(rep + 1), "%lu", xbt)= ;
     free(rep);
     return NULL;
 }
@@ -769,7 +769,7 @@ domid_t xenbus_get_self_id(void)
     domid_t ret;
 
     BUG_ON(xenbus_read(XBT_NIL, "domid", &am= p;dom_id));
-    sscanf(dom_id, "%d", &ret);
+    sscanf(dom_id, "%u", (unsigned int*)&= ret);
 
     return ret;
 }

--_000_A4D3962C02EE81408CC4341DF532AAC3364466Exchange2orionvmc_-- --===============8111182691315479113== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============8111182691315479113==--