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

[Xen-changelog] [xen master] common/vsprintf: special-case DOMID_IDLE handling for %pv



commit 319e431e40139e27d871cbe53976b423301a6af0
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Thu Jun 25 14:56:26 2015 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jun 25 14:56:26 2015 +0200

    common/vsprintf: special-case DOMID_IDLE handling for %pv
    
    Prints IDLEv0 as opposed to d32767v0
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/common/vsprintf.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/xen/common/vsprintf.c b/xen/common/vsprintf.c
index 065cc42..51b5e4e 100644
--- a/xen/common/vsprintf.c
+++ b/xen/common/vsprintf.c
@@ -336,9 +336,14 @@ static char *pointer(char *str, char *end, const char 
**fmt_ptr,
         const struct vcpu *v = arg;
 
         ++*fmt_ptr;
-        if ( str < end )
-            *str = 'd';
-        str = number(str + 1, end, v->domain->domain_id, 10, -1, -1, 0);
+        if ( unlikely(v->domain->domain_id == DOMID_IDLE) )
+            str = string(str, end, "IDLE", -1, -1, 0);
+        else
+        {
+            if ( str < end )
+                *str = 'd';
+            str = number(str + 1, end, v->domain->domain_id, 10, -1, -1, 0);
+        }
         if ( str < end )
             *str = 'v';
         return number(str + 1, end, v->vcpu_id, 10, -1, -1, 0);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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


 


Rackspace

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