* [PATCH] Fix return value of persistent_filters_dump if rename failed [not found] <814115096.5040864.1382037894796.JavaMail.root@redhat.com> @ 2013-10-17 19:25 ` Nir Soffer 0 siblings, 0 replies; 3+ messages in thread From: Nir Soffer @ 2013-10-17 19:25 UTC (permalink / raw) To: lvm-devel >From eeae04cf523e0c3050d5c686b29fb53316d3c760 Mon Sep 17 00:00:00 2001 From: Nir Soffer <nsoffer@redhat.com> Date: Thu, 17 Oct 2013 21:18:06 +0300 Subject: [PATCH] Fix return value of persistent_filters_dump if rename failed --- lib/filters/filter-persistent.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/filters/filter-persistent.c b/lib/filters/filter-persistent.c index 14a3480..f068369 100644 --- a/lib/filters/filter-persistent.c +++ b/lib/filters/filter-persistent.c @@ -253,9 +253,11 @@ static int _persistent_filter_dump(struct dev_filter *f, int merge_existing) if (lvm_fclose(fp, tmp_file)) goto_out; - if (rename(tmp_file, pf->file)) + if (rename(tmp_file, pf->file)) { log_error("%s: rename to %s failed: %s", tmp_file, pf->file, strerror(errno)); + goto out; + } r = 1; -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <654944611.5014340.1382034030200.JavaMail.root@redhat.com>]
* [PATCH] Fix return value of persistent_filters_dump if rename failed [not found] <654944611.5014340.1382034030200.JavaMail.root@redhat.com> @ 2013-10-17 18:21 ` Nir Soffer 2013-10-21 9:23 ` Zdenek Kabelac 0 siblings, 1 reply; 3+ messages in thread From: Nir Soffer @ 2013-10-17 18:21 UTC (permalink / raw) To: lvm-devel Hi all, Please review attached patch. Regards, Nir -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Fix-return-value-of-persistent_filters_dump-if-renam.patch Type: text/x-patch Size: 852 bytes Desc: not available URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20131017/49d25bb4/attachment.bin> ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Fix return value of persistent_filters_dump if rename failed 2013-10-17 18:21 ` Nir Soffer @ 2013-10-21 9:23 ` Zdenek Kabelac 0 siblings, 0 replies; 3+ messages in thread From: Zdenek Kabelac @ 2013-10-21 9:23 UTC (permalink / raw) To: lvm-devel Dne 17.10.2013 20:21, Nir Soffer napsal(a): > Hi all, > > Please review attached patch. > > Regards, > Nir > Thanks for the patch - though the final solution will be a bit different. Since from some time log_error should be used only for real-error - while this error is only warning and it's result value is ignored. It's only used for backtracing. So this patch doesn't change the final result of executed command. Zdenek ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-21 9:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <814115096.5040864.1382037894796.JavaMail.root@redhat.com>
2013-10-17 19:25 ` [PATCH] Fix return value of persistent_filters_dump if rename failed Nir Soffer
[not found] <654944611.5014340.1382034030200.JavaMail.root@redhat.com>
2013-10-17 18:21 ` Nir Soffer
2013-10-21 9:23 ` Zdenek Kabelac
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.