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

[Xen-changelog] [xen master] libxl: format fd flags with 0x since they are hex.



commit c4b717808f4bead160008ba653ed4e6b05831a71
Author:     Ian Campbell <ian.campbell@xxxxxxxxxx>
AuthorDate: Fri Sep 11 15:19:54 2015 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Fri Sep 11 15:57:45 2015 +0100

    libxl: format fd flags with 0x since they are hex.
    
    Commit 93f5194e7270 "libxl: clear O_NONBLOCK|O_NDELAY on migration fd
    and reinstate afterwards" added some logging of fcntl.F_GETFL at all
    as %x without a 0x prefix to make it clear they numbers are hex. Fix
    this alongwith an inadvertent logging of the fd itself as hex.
    
    Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/libxl/libxl.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 6ebb96e..4d27891 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -6530,7 +6530,7 @@ int libxl__fd_flags_modify_save(libxl__gc *gc, int fd,
         goto out_err;
     }
 
-    LOG(DEBUG, "fnctl F_GETFL flags for fd %d are %x", fd, fdfl);
+    LOG(DEBUG, "fnctl F_GETFL flags for fd %d are 0x%x", fd, fdfl);
 
     if (r_oldflags)
         *r_oldflags = fdfl;
@@ -6538,7 +6538,7 @@ int libxl__fd_flags_modify_save(libxl__gc *gc, int fd,
     fdfl &= mask;
     fdfl |= val;
 
-    LOG(DEBUG, "fnctl F_SETFL of fd %d to %x", fd, fdfl);
+    LOG(DEBUG, "fnctl F_SETFL of fd %d to 0x%x", fd, fdfl);
 
     ret = fcntl(fd, F_SETFL, fdfl);
     if (ret < 0) {
@@ -6557,11 +6557,11 @@ int libxl__fd_flags_restore(libxl__gc *gc, int fd, int 
fdfl)
 {
     int ret, rc;
 
-    LOG(DEBUG, "fnctl F_SETFL of fd %d to %x", fd, fdfl);
+    LOG(DEBUG, "fnctl F_SETFL of fd %d to 0x%x", fd, fdfl);
 
     ret = fcntl(fd, F_SETFL, fdfl);
     if (ret < 0) {
-        LOGE(ERROR, "failed to fcntl.F_SETFL for fd %x", fd);
+        LOGE(ERROR, "failed to fcntl.F_SETFL for fd %d", fd);
         rc = ERROR_FAIL;
         goto out_err;
     }
--
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®.