From: Wei Liu <wei.liu2@citrix.com>
To: Juergen Gross <jgross@suse.com>
Cc: xen-devel@lists.xenproject.org, ian.jackson@eu.citrix.com,
wei.liu2@citrix.com
Subject: Re: [PATCH v3 1/7] xenstore: correct test for opened logfile in reopen_log()
Date: Thu, 23 Feb 2017 10:36:30 +0000 [thread overview]
Message-ID: <20170223103630.pqethtdihfllpfzo@citrix.com> (raw)
In-Reply-To: <20170222152851.20099-2-jgross@suse.com>
On Wed, Feb 22, 2017 at 04:28:45PM +0100, Juergen Gross wrote:
> As 0 is a valid file descriptor testing a descriptor to be valid
> should be done via >= 0 instead of > 0.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
Acked-by: Wei Liu <wei.liu2@citrix.com>
Ian, this should be backported.
> tools/xenstore/xenstored_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c
> index 1e9b622..7b16338 100644
> --- a/tools/xenstore/xenstored_core.c
> +++ b/tools/xenstore/xenstored_core.c
> @@ -209,7 +209,7 @@ static void trigger_reopen_log(int signal __attribute__((unused)))
> static void reopen_log(void)
> {
> if (tracefile) {
> - if (tracefd > 0)
> + if (tracefd >= 0)
> close(tracefd);
>
> tracefd = open(tracefile, O_WRONLY|O_CREAT|O_APPEND, 0600);
> --
> 2.10.2
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-02-23 10:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-22 15:28 [PATCH v3 0/7] xenstore: enhance runtime debug capabilities Juergen Gross
2017-02-22 15:28 ` [PATCH v3 1/7] xenstore: correct test for opened logfile in reopen_log() Juergen Gross
2017-02-23 10:36 ` Wei Liu [this message]
2017-02-22 15:28 ` [PATCH v3 2/7] xenstore: rename XS_DEBUG wire command Juergen Gross
2017-02-23 11:06 ` Wei Liu
2017-02-22 15:28 ` [PATCH v3 3/7] xenstore: Split out XS_CONTROL action to dedicated source file Juergen Gross
2017-02-23 11:06 ` Wei Liu
2017-02-22 15:28 ` [PATCH v3 4/7] xenstore: enhance control command support Juergen Gross
2017-02-23 11:06 ` Wei Liu
2017-02-24 5:50 ` Juergen Gross
2017-02-22 15:28 ` [PATCH v3 5/7] xenstore: add support for changing log functionality dynamically Juergen Gross
2017-02-23 11:06 ` Wei Liu
2017-02-22 15:28 ` [PATCH v3 6/7] xenstore: make memory report available via XS_CONTROL Juergen Gross
2017-02-23 11:06 ` Wei Liu
2017-02-22 15:28 ` [PATCH v3 7/7] xenstore: remove memory report command line support Juergen Gross
2017-02-23 11:06 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170223103630.pqethtdihfllpfzo@citrix.com \
--to=wei.liu2@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jgross@suse.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).