From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v9 02/15] libxc/progress: Extend the progress interface Date: Wed, 15 Apr 2015 11:55:13 +0100 Message-ID: <1429095313.15516.193.camel@citrix.com> References: <1428686167-8279-1-git-send-email-andrew.cooper3@citrix.com> <1428686167-8279-3-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1428686167-8279-3-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Wei Liu , Ian Jackson , Xen-devel List-Id: xen-devel@lists.xenproject.org On Fri, 2015-04-10 at 18:15 +0100, Andrew Cooper wrote: > Not everything which needs reporting as progress comes with a range. Extend > the interface to allow reporting of a single statement. > > The programming interface now looks like: > xc_set_progress_prefix() > set the prefix string to be used > xc_report_progress_single() > report a single action > xc_report_progress_step() > report $X of $Y > > The new programming interface is implemented in a compatible way with the > existing caller interface (by reporting a single action as "0 of 0"). I suppose the underlying motivation here is that there a difference between this new xc_report_progress_step and calling xc_report/v? IOW some difference between the semantics of the logger's ->vmessage and ->progress hooks. What is it though? I suspected the distinction was in the automatic inclusion of xch->currently_progress_reporting into the messages, but you appear to make that non-mandatory below. Speaking of which, I think it should be mandatory now to call xc_set_progress_prefix as it was to call progress_start before, and that both of your new functions should assert. Those who think they want to use xc_report_progress_single without calling xc_set_progress_prefix should be using xc_report() instead. Ian.