From: Anthony Liguori <aliguori@us.ibm.com>
To: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
xen-devel@lists.xensource.com, Ewan Mellor <ewan@xensource.com>
Subject: Re: xm list d flag?
Date: Mon, 03 Oct 2005 17:58:44 -0500 [thread overview]
Message-ID: <4341B7A4.3050808@us.ibm.com> (raw)
In-Reply-To: <20051002032936.GL10661@cl.cam.ac.uk>
Christian Limpach wrote:
>>Is changing the order of token and path really necessary? It's a
>>considerably simplier change if we maintain the same order. I've always
>>thought of the token as an argument so this order makes more sense to me
>>(and I reckon to Rusty since he did it this way to begin with :-)).
>>
>>
>
>It's not absolutely necessary, but makes the code simpler sinceat least
>within the kernel, we don't pass the token to the watch callback, only
>the path and as pointed out in a footnote, you can then get the additional
>arguments by adding strlen(path)+1 and so on.
>
>
So you want to just pass around the path pointer? And rely on people
jumping past the end of the string? Yikes :-)
>>The only adjustment to the userspace API would be that instead of
>>returning an char *[2] we would return a char *[] that was terminated by
>>a NULL. xenbus needs a little more but it's not too bad.
>>
>>
>
>Wasn't there a patch which got rid of that array?
>
I sent a patch that added a size to the array--Rusty didn't like it.
Rusty suggested changing the userspace interface to something similiar
to the kernel interface.
The kernel interface doesn't generalize well--we could hack it to have
an additional domid_t * parameter but that kind of sucks.
> Also, with a
>variable number of paths, using an array will become quite complicated
>since you won't know how big to allocate the array.
>
>
I was thinking of just adding a param to the message that specified the
number of entries in the array. That solves that problem.
>Also, I'd like to see something like XS_WATCH_TOKEN and XS_WATCH_PATH
>as indexes into the array instead of sprinking 0/1 althrough the code,
>whether we reverse the order or not...
>
>
Yes, I had thought of this myself. I think having xs_read_watch return
the size of the array is the best solution. Returning a zero-terminated
array makes it difficult to determine if the watch has a feature (if you
know the size, you can check for size < XS_WATCH_* to determine if the
watch has a given parameter).
I'm going to working something up and submit it. Rusty can weigh in
when he gets to Cambridge.
Regards,
Anthony Liguori
> christian
>
>
>
>
next prev parent reply other threads:[~2005-10-03 22:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-01 12:17 xm list d flag? Ted Kaczmarek
2005-10-01 13:09 ` NAHieu
2005-10-01 14:40 ` Ewan Mellor
2005-10-01 19:45 ` Anthony Liguori
2005-10-01 20:46 ` Christian Limpach
2005-10-02 1:47 ` Anthony Liguori
2005-10-02 3:29 ` Christian Limpach
2005-10-03 22:58 ` Anthony Liguori [this message]
2005-10-04 0:14 ` Christian Limpach
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=4341B7A4.3050808@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=Christian.Limpach@cl.cam.ac.uk \
--cc=ewan@xensource.com \
--cc=rusty@rustcorp.com.au \
--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.