[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] dd: call fsync() only once before exiting if conv=fsync is specified
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2017-03-16 20:08:26
Message-ID: CAK1hOcOHWgQMBeE-0bQ50WL9+NWb=2GDG6WOsayMLg+LftmTnw () mail ! gmail ! com
[Download RAW message or body]
Applied, thanks
On Tue, Mar 14, 2017 at 5:44 PM, Rostislav Skudnov <rostislav@tuxera.com> wrote:
> Signed-off-by: Rostislav Skudnov <rostislav@tuxera.com>
> ---
> coreutils/dd.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/coreutils/dd.c b/coreutils/dd.c
> index 5e68087..d89c0ae 100644
> --- a/coreutils/dd.c
> +++ b/coreutils/dd.c
> @@ -532,17 +532,17 @@ int dd_main(int argc UNUSED_PARAM, char **argv)
> if (write_and_stats(ibuf, n, obs, outfile))
> goto out_status;
> }
> -
> - if (G.flags & FLAG_FSYNC) {
> - if (fsync(ofd) < 0)
> - goto die_outfile;
> - }
> }
>
> if (ENABLE_FEATURE_DD_IBS_OBS && oc) {
> if (write_and_stats(obuf, oc, obs, outfile))
> goto out_status;
> }
> +
> + if (G.flags & FLAG_FSYNC) {
> + if (fsync(ofd) < 0)
> + goto die_outfile;
> + }
> if (close(ifd) < 0) {
> die_infile:
> bb_simple_perror_msg_and_die(infile);
> --
> 2.1.4
>
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic