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

Re: [Xen-devel] [Qemu-devel] [PATCH 1/2] xen_backend: introduce xenstore_read_uint64 and xenstore_read_fe_uint64



On 17 December 2013 17:30, Stefano Stabellini
<stefano.stabellini@xxxxxxxxxxxxx> wrote:
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> ---
>  hw/xen/xen_backend.c         |   18 ++++++++++++++++++
>  include/hw/xen/xen_backend.h |    2 ++
>  2 files changed, 20 insertions(+)
>
> diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c
> index 197795f..5f9be5a 100644
> --- a/hw/xen/xen_backend.c
> +++ b/hw/xen/xen_backend.c
> @@ -112,6 +112,19 @@ int xenstore_read_int(const char *base, const char 
> *node, int *ival)
>      return rc;
>  }
>
> +int xenstore_read_uint64(const char *base, const char *node, uint64_t *uval)
> +{
> +    char *val;
> +    int rc = -1;
> +
> +    val = xenstore_read_str(base, node);
> +    if (val && 1 == sscanf(val, "%"PRIu64, uval)) {

PRIxxx are printf format macros, not scanf format ones. You want
SCNu64

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/inttypes.h.html

thanks
-- PMM

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.