From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Subject: Re: [PATCH] xl: improve vif2 parsing Date: Fri, 20 Aug 2010 14:58:12 +0200 Message-ID: <4C6E7BE4.6090605@amd.com> References: <4C6E6E84.5020704@amd.com> <4C6E6F20.3090405@amd.com> <1282308116.3731.39.camel@qabil.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1282308116.3731.39.camel@qabil.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Gianni Tedesco Cc: xen-devel , Keir Fraser , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Gianni Tedesco wrote: > On Fri, 2010-08-20 at 13:03 +0100, Andre Przywara wrote: >> Andre Przywara wrote: >>> Hi, >>> >>> vif2 parsing relies on counted strncmp() statements. Replace this >>> with a more robust automatic version. >> No, I didn't want to leave this as an exercise to the reader, I am just >> spoiled by git send-email, so forgot to attach the patch. Sorry! >> >>> Signed-off-by: Andre Przywara >>> > > Both patches look good to me. > >>> Regards, >>> Andre. >>> >>> P.S. If you like this, I have seen at least two more instances of the >>> same issue that could be improved this way. >>> > > Can you say where? In main_networkattach() and main_network2attach(). > > You should be aware that disk config parsing is undergoing a rewrite > already so lets not duplicate efforts on that one ;) I hoped you would say something like this. I see that parts of the code has issues: * xl_cmdimpl.c is way too long (and will probably still have to grow) * code duplication in several parameter parsers * not reentrant safe (strtok instead of strtok_r) * Coding style (mostly 80 character limit) So I was hoping that code cleanup was on someone's list, that saves me from fixing many smaller things. Regards, Andre. Btw. I saw that cpuid= is still missing in libxl, I have a version improved over the clumsy xm interface 90% ready, but will probably not able to send it out still this week. -- Andre Przywara AMD-OSRC (Dresden) Tel: x29712