From: Dario Faggioli <dario.faggioli@citrix.com>
To: Harmandeep Kaur <write.harmandeep@gmail.com>
Cc: xen-devel@lists.xenproject.org, wei.liu2@citrix.com,
ian.jackson@eu.citrix.com, Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH] libxl: fix handling returns in libxl_get_version_info()
Date: Fri, 12 Feb 2016 12:12:45 +0100 [thread overview]
Message-ID: <1455275565.3148.349.camel@citrix.com> (raw)
In-Reply-To: <CAPtdW14We1exZ8Lp=d5c2VH9SH7apUeSQoPXH1Fyf2MNZwRn+Q@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1301 bytes --]
On Fri, 2016-02-12 at 16:34 +0530, Harmandeep Kaur wrote:
> On Fri, Feb 12, 2016 at 4:30 PM, Dario Faggioli
> <dario.faggioli@citrix.com> wrote:
> >
> Sorry I actually meant,
> tools/libxl/xl_cmdimpl.c: vinfo = libxl_get_version_info(ctx);
>
> vinfo = libxl_get_version_info(ctx);
> if (vinfo) {
>
Which again checks for vinfo to not be NULL before using it, so this
also seems ok to me.
> i = (1 << 20) / vinfo->pagesize;
> printf("total_memory : %"PRIu64"\n",
> info.total_pages / i);
> printf("free_memory : %"PRIu64"\n",
> (info.free_pages - info.outstanding_pages) / i);
> printf("sharing_freed_memory : %"PRIu64"\n",
> info.sharing_freed_pages / i);
> printf("sharing_used_memory : %"PRIu64"\n",
> info.sharing_used_frames / i);
> printf("outstanding_claims : %"PRIu64"\n",
> info.outstanding_pages / i);
> }
>
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2016-02-12 11:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 8:30 [PATCH] libxl: fix handling returns in libxl_get_version_info() Harmandeep Kaur
2016-02-11 9:48 ` Dario Faggioli
2016-02-11 10:21 ` Ian Campbell
2016-02-12 10:52 ` Harmandeep Kaur
2016-02-12 11:00 ` Dario Faggioli
2016-02-12 11:04 ` Harmandeep Kaur
2016-02-12 11:12 ` Dario Faggioli [this message]
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=1455275565.3148.349.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=write.harmandeep@gmail.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 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.