[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 3/4] xsm: use # printk format modifier



Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/xsm/flask/avc.c
+++ b/xen/xsm/flask/avc.c
@@ -197,7 +197,7 @@ static void avc_dump_av(struct avc_dump_
     }
 
     if ( av )
-        avc_printk(buf, " 0x%x", av);
+        avc_printk(buf, " %#x", av);
 
     avc_printk(buf, " }");
 }
@@ -591,16 +591,16 @@ void avc_audit(u32 ssid, u32 tsid, u16 t
         avc_printk(&buf, "domid=%d ", cdom->domain_id);
     switch ( a ? a->type : 0 ) {
     case AVC_AUDIT_DATA_DEV:
-        avc_printk(&buf, "device=0x%lx ", a->device);
+        avc_printk(&buf, "device=%#lx ", a->device);
         break;
     case AVC_AUDIT_DATA_IRQ:
         avc_printk(&buf, "irq=%d ", a->irq);
         break;
     case AVC_AUDIT_DATA_RANGE:
-        avc_printk(&buf, "range=0x%lx-0x%lx ", a->range.start, a->range.end);
+        avc_printk(&buf, "range=%#lx-%#lx ", a->range.start, a->range.end);
         break;
     case AVC_AUDIT_DATA_MEMORY:
-        avc_printk(&buf, "pte=0x%lx mfn=0x%lx ", a->memory.pte, a->memory.mfn);
+        avc_printk(&buf, "pte=%#lx mfn=%#lx ", a->memory.pte, a->memory.mfn);
         break;
     }
 
--- a/xen/xsm/flask/ss/policydb.c
+++ b/xen/xsm/flask/ss/policydb.c
@@ -1716,8 +1716,8 @@ int policydb_read(struct policydb *p, vo
 
     if ( le32_to_cpu(buf[0]) != POLICYDB_MAGIC )
     {
-        printk(KERN_ERR "Flask:  policydb magic number 0x%x does "
-               "not match expected magic number 0x%x\n",
+        printk(KERN_ERR "Flask:  policydb magic number %#x does "
+               "not match expected magic number %#x\n",
                le32_to_cpu(buf[0]), POLICYDB_MAGIC);
         goto bad;
     }
--- a/xen/xsm/flask/ss/services.c
+++ b/xen/xsm/flask/ss/services.c
@@ -2111,7 +2111,7 @@ int security_ocontext_add( u32 ocon, uns
                 c->u.ioport.high_ioport == high && c->sid[0] == sid)
                 break;
 
-            printk("%s: IO Port overlap with entry 0x%x - 0x%x\n",
+            printk("%s: IO Port overlap with entry %#x - %#x\n",
                    __FUNCTION__, c->u.ioport.low_ioport,
                    c->u.ioport.high_ioport);
             ret = -EEXIST;
@@ -2145,7 +2145,7 @@ int security_ocontext_add( u32 ocon, uns
                 c->u.iomem.high_iomem == high && c->sid[0] == sid)
                 break;
 
-            printk("%s: IO Memory overlap with entry 0x%x - 0x%x\n",
+            printk("%s: IO Memory overlap with entry %#x - %#x\n",
                    __FUNCTION__, c->u.iomem.low_iomem,
                    c->u.iomem.high_iomem);
             ret = -EEXIST;
@@ -2177,7 +2177,7 @@ int security_ocontext_add( u32 ocon, uns
                 if ( c->sid[0] == sid )
                     break;
 
-                printk("%s: Duplicate PCI Device 0x%x\n", __FUNCTION__,
+                printk("%s: Duplicate PCI Device %#x\n", __FUNCTION__,
                         add->u.device);
                 ret = -EEXIST;
                 break;
@@ -2257,7 +2257,7 @@ int security_ocontext_del( u32 ocon, uns
             }
         }
 
-        printk("%s: ocontext not found: ioport 0x%x - 0x%x\n", __FUNCTION__,
+        printk("%s: ocontext not found: ioport %#x - %#x\n", __FUNCTION__,
                 low, high);
         ret = -ENOENT;
         break;
@@ -2284,7 +2284,7 @@ int security_ocontext_del( u32 ocon, uns
             }
         }
 
-        printk("%s: ocontext not found: iomem 0x%x - 0x%x\n", __FUNCTION__,
+        printk("%s: ocontext not found: iomem %#x - %#x\n", __FUNCTION__,
                 low, high);
         ret = -ENOENT;
         break;
@@ -2310,7 +2310,7 @@ int security_ocontext_del( u32 ocon, uns
             }
         }
 
-        printk("%s: ocontext not found: pcidevice 0x%x\n", __FUNCTION__, low);
+        printk("%s: ocontext not found: pcidevice %#x\n", __FUNCTION__, low);
         ret = -ENOENT;
         break;
 
--- a/xen/xsm/xsm_policy.c
+++ b/xen/xsm/xsm_policy.c
@@ -52,7 +52,7 @@ int __init xsm_policy_init(unsigned long
             policy_buffer = (char *)_policy_start;
             policy_size = _policy_len;
 
-            printk("Policy len  0x%lx, start at %p.\n",
+            printk("Policy len %#lx, start at %p.\n",
                    _policy_len,_policy_start);
 
             __clear_bit(i, module_map);


Attachment: xsm-printk-hash.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.