All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-4.6] libxl: format fd flags with 0x since they are hex.
@ 2015-09-11 14:19 Ian Campbell
  2015-09-11 14:30 ` Ian Campbell
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ian Campbell @ 2015-09-11 14:19 UTC (permalink / raw)
  To: ian.jackson, wei.liu2, xen-devel; +Cc: andrew.cooper3, Ian Campbell

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@citrix.com>
---
 tools/libxl/libxl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index d6efdd8..0ea7d9c 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;
     }
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH for-4.6] libxl: format fd flags with 0x since they are hex.
  2015-09-11 14:19 [PATCH for-4.6] libxl: format fd flags with 0x since they are hex Ian Campbell
@ 2015-09-11 14:30 ` Ian Campbell
  2015-09-11 14:32 ` Wei Liu
  2015-09-11 14:45 ` Ian Jackson
  2 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2015-09-11 14:30 UTC (permalink / raw)
  To: ian.jackson, wei.liu2, xen-devel; +Cc: andrew.cooper3

On Fri, 2015-09-11 at 15:19 +0100, Ian Campbell wrote:
> 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@citrix.com>
> ---

Forgot: for 4.6 because the patch which added the incorrect formatting was.

>  tools/libxl/libxl.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> index d6efdd8..0ea7d9c 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;
>      }

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH for-4.6] libxl: format fd flags with 0x since they are hex.
  2015-09-11 14:19 [PATCH for-4.6] libxl: format fd flags with 0x since they are hex Ian Campbell
  2015-09-11 14:30 ` Ian Campbell
@ 2015-09-11 14:32 ` Wei Liu
  2015-09-11 15:06   ` Ian Campbell
  2015-09-11 14:45 ` Ian Jackson
  2 siblings, 1 reply; 5+ messages in thread
From: Wei Liu @ 2015-09-11 14:32 UTC (permalink / raw)
  To: Ian Campbell; +Cc: wei.liu2, andrew.cooper3, ian.jackson, xen-devel

On Fri, Sep 11, 2015 at 03:19:54PM +0100, Ian Campbell wrote:
> 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@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

> ---
>  tools/libxl/libxl.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> index d6efdd8..0ea7d9c 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;
>      }
> -- 
> 2.1.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH for-4.6] libxl: format fd flags with 0x since they are hex.
  2015-09-11 14:19 [PATCH for-4.6] libxl: format fd flags with 0x since they are hex Ian Campbell
  2015-09-11 14:30 ` Ian Campbell
  2015-09-11 14:32 ` Wei Liu
@ 2015-09-11 14:45 ` Ian Jackson
  2 siblings, 0 replies; 5+ messages in thread
From: Ian Jackson @ 2015-09-11 14:45 UTC (permalink / raw)
  To: Ian Campbell; +Cc: andrew.cooper3, wei.liu2, xen-devel

Ian Campbell writes ("[PATCH for-4.6] 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.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Thanks to Andrew Cooper for spotting this and sorry that I didn't.

Ian.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH for-4.6] libxl: format fd flags with 0x since they are hex.
  2015-09-11 14:32 ` Wei Liu
@ 2015-09-11 15:06   ` Ian Campbell
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2015-09-11 15:06 UTC (permalink / raw)
  To: Wei Liu; +Cc: andrew.cooper3, ian.jackson, xen-devel

On Fri, 2015-09-11 at 15:32 +0100, Wei Liu wrote:
> On Fri, Sep 11, 2015 at 03:19:54PM +0100, Ian Campbell wrote:
> > 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@citrix.com>
> 
> Acked-by: Wei Liu <wei.liu2@citrix.com>

Applied to staging and 4.6.

Thankis
Ian.
> 
> > ---
> >  tools/libxl/libxl.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> > index d6efdd8..0ea7d9c 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;
> >      }

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-11 15:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-11 14:19 [PATCH for-4.6] libxl: format fd flags with 0x since they are hex Ian Campbell
2015-09-11 14:30 ` Ian Campbell
2015-09-11 14:32 ` Wei Liu
2015-09-11 15:06   ` Ian Campbell
2015-09-11 14:45 ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.