* libxl__device_nextid and holes
@ 2015-03-09 7:58 Olaf Hering
2015-03-09 11:33 ` Wei Liu
0 siblings, 1 reply; 2+ messages in thread
From: Olaf Hering @ 2015-03-09 7:58 UTC (permalink / raw)
To: xen-devel
I wonder if libxl__device_nextid is robust enough to handle holes. If
there are 3 devices (0,1,2) of type X, and device #0 or #1 is removed
with "X-detach", wouldn't the code return nextid==2? The result would be
that the caller will write to the wrong path.
I have not veified this theory in practice.
Olaf
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: libxl__device_nextid and holes
2015-03-09 7:58 libxl__device_nextid and holes Olaf Hering
@ 2015-03-09 11:33 ` Wei Liu
0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2015-03-09 11:33 UTC (permalink / raw)
To: Olaf Hering; +Cc: wei.liu2, xen-devel
On Mon, Mar 09, 2015 at 08:58:38AM +0100, Olaf Hering wrote:
> I wonder if libxl__device_nextid is robust enough to handle holes. If
> there are 3 devices (0,1,2) of type X, and device #0 or #1 is removed
> with "X-detach", wouldn't the code return nextid==2? The result would be
> that the caller will write to the wrong path.
>
> I have not veified this theory in practice.
>
I once had the same question. IIRC I did some experiments and that
function seemed to work fine.
You can verify this by attaching / detaching devices to a domain.
And I think the following line is the meat.
1956 nextid = strtoul(l[nb - 1], NULL, 10) + 1;
Wei.
> Olaf
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-09 11:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-09 7:58 libxl__device_nextid and holes Olaf Hering
2015-03-09 11:33 ` Wei Liu
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.