From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 5/5] add FILE arguement to debug functions Date: Fri, 16 May 2014 16:41:55 +0200 Message-ID: <1575992.oUxJQ8gJcF@xps13> References: <20140502234251.707598579@vyatta.com> <20140502234407.841791092@vyatta.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: "Burakov, Anatoly" Return-path: In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 2014-05-06 12:52, Burakov, Anatoly: > Hi Stephen, > > > The DPDK dump functions are useful for remote debugging of an > > applications. But when application runs as a daemon, stdout > > is typically routed to /dev/null. > > > > Instead change all these functions to take a stdio FILE * handle > > instead. An application can then use open_memstream() to capture > > the output. > > Wouldn't it be better to leave old calls as wrappers with the FILE parameter > defaulting to stdout? That way you wouldn't have to change so much code, > keep backwards compatibility with old code, and get the additional > functionality you need. Refactoring code shouldn't be a problem. We didn't commit for API stability yet. Acked-by: Thomas Monjalon