From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zdenek Kabelac Date: Thu, 06 May 2010 10:14:02 +0200 Subject: [PATCH 03/23] API change for args of process_each_lv_in_vg() In-Reply-To: <20100506013908.GL27027@agk-dp.fab.redhat.com> References: <20100506013908.GL27027@agk-dp.fab.redhat.com> Message-ID: <4BE27A4A.7030503@redhat.com> List-Id: To: lvm-devel@redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Dne 6.5.2010 03:39, Alasdair G Kergon napsal(a): > On Wed, Apr 28, 2010 at 02:27:22PM +0200, Zdenek Kabelac wrote: >> Patch adds failed_lvnames to the list of parameters for process_each_lv_in_vg(). >> If the list is not NULL it will be filled with LV names of failing LVs >> during function execution. > > Ack. > >> +++ b/tools/toollib.c >> @@ -86,6 +86,7 @@ int process_each_lv_in_vg(struct cmd_context *cmd, >> struct volume_group *vg, >> const struct dm_list *arg_lvnames, >> const struct dm_list *tags, >> + struct dm_list *failed_lvnames, >> void *handle, >> process_single_lv_fn_t process_single_lv) >> { >> @@ -99,6 +100,9 @@ int process_each_lv_in_vg(struct cmd_context *cmd, >> >> struct lv_list *lvl; >> >> + if (failed_lvnames) >> + dm_list_init(failed_lvnames); > > I'd prefer the caller to initialise it, which is what we tend to do > elsewhere, so that we don't pass 'undefined' values into functions. > Ok Zdenek