On 09/12/2018 06:09 PM, John Ferlan wrote: > Create a common pool refresh failure handling method as the > same code is repeated multiple times. > > Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> > --- > src/storage/storage_driver.c | 38 +++++++++++++++++------------------- > 1 file changed, 18 insertions(+), 20 deletions(-) > > diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c > index 5a8871bd07..8aa3191f7b 100644 > --- a/src/storage/storage_driver.c > +++ b/src/storage/storage_driver.c > @@ -79,6 +79,18 @@ static void storageDriverUnlock(void) > } > > > +static void > +storagePoolRefreshFailCleanup(virStorageBackendPtr backend, > + virStoragePoolObjPtr obj, > + const char *stateFile) > +{ > + if (stateFile) > + ignore_value(unlink(stateFile)); I was about to ask this in 1/5. Is this ignore_value() needed? Quick `git grep' shows we are not consistent. > + if (backend->stopPool) > + backend->stopPool(obj); > +} > + Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list