All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Egger <Christoph.Egger@amd.com>
To: Gianni Tedesco <gianni.tedesco@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [PATCH, v3]: xl: randomly generate UUID's
Date: Fri, 27 Aug 2010 17:13:17 +0200	[thread overview]
Message-ID: <201008271713.18575.Christoph.Egger@amd.com> (raw)
In-Reply-To: <1282917395.3731.107.camel@qabil.uk.xensource.com>

On Friday 27 August 2010 15:56:35 Gianni Tedesco wrote:
> On Thu, 2010-08-26 at 16:41 +0100, Christoph Egger wrote:
> > @@ -2219,8 +2224,11 @@ static void list_domains(int verbose, co
> >                  info[i].dying ? 'd' : '-',
> >                  ((float)info[i].cpu_time / 1e9));
> >          free(domname);
> > -        if (verbose)
> > -            printf(" " LIBXL_UUID_FMT,
> > LIBXL_UUID_BYTES(info[i].uuid));
> > +        if (verbose) {
> > +            char buf[LIBXL_UUID_LEN];
> > +            libxl_uuido_string(&info[i].uuid, buf, sizeof(buf));
> > +            printf(" %s", buf);
> > +        }
> >          putchar('\n');
> >      }
> >  }
>
> Really? There's no way to keep the macro approach and get at the thing
> like an array of bytes?

Yes. gcc complains about 'subscripted value is neither array nor pointer'.

> If that's the case then how can libxl_uuid_bytearray() that I introduced
> work correctly? 

I removed it because its redundant to libxl_uuido_string().
A bytearray and a string is the same in C unless you use unicode.

> I cannot tell because your patch does not include libxl_uuid.h ...

Then it does implicit. gcc would have complained otherwise.
We should use -Wmissing-declaration to be sure.

> Also I am not sure about the ocaml wrapper stuff but I will look in to
> it for next time. I have to re-spin the patch to detect UUID parse
> errors anyway.

Thanks.

Christoph


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

  reply	other threads:[~2010-08-27 15:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-20 15:15 [PATCH, v3]: xl: randomly generate UUID's Gianni Tedesco
2010-08-20 15:50 ` Christoph Egger
2010-08-20 16:14   ` Ian Jackson
2010-08-25 18:38   ` Gianni Tedesco
2010-08-26 12:02     ` Christoph Egger
2010-08-26 15:41       ` Christoph Egger
2010-08-27 13:56         ` Gianni Tedesco
2010-08-27 15:13           ` Christoph Egger [this message]
2010-08-27 15:28             ` Gianni Tedesco

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=201008271713.18575.Christoph.Egger@amd.com \
    --to=christoph.egger@amd.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=gianni.tedesco@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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.