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

Re: [Xen-devel] [PATCH] xenbackendd: clean variable in loop

The problem is that console usually comes after vbd, and it executes
the block hotplug script with the console device (because 'type' is
still set from the previous loop), nothing bad happens, just wanted to
get rid of the error message. Since the variable is reused trough the
for loop, I think it's best to clean it at the start/end of the loop,
this makes the code easier to understand (for me). Where do you
exactly suggest to put the initialization?

Thanks, Roger.

2011/7/14 Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>:
> Roger Pau Monnà writes ("[Xen-devel] [PATCH] xenbackendd: clean variable in 
> loop"):
>> Fixed a cleanup of a variable used in a loop that was giving error
>> messages, and added a debug message.
> Thanks, but I'm not entirely clear about the bug you think this is
> fixing.
> Looking at the existing code it seems like the problem is that if the
> loop is repeated and the 2nd device isn't a vbd or a vif, the previous
> type is erroneously reused.
> I think this woudl be better fixed by moving the initialisation of
> type from the top of the function to just before it might first be
> set.
> Ian.

Xen-devel mailing list



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