From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH for-4.6] libxl: format fd flags with 0x since they are hex. Date: Fri, 11 Sep 2015 15:30:07 +0100 Message-ID: <1441981807.3549.58.camel@citrix.com> References: <1441981194-32720-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1441981194-32720-1-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.jackson@eu.citrix.com, wei.liu2@citrix.com, xen-devel@lists.xen.org Cc: andrew.cooper3@citrix.com List-Id: xen-devel@lists.xenproject.org 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 > --- 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; > }