Re: [Powertop] [PATCH POWERTOP] Remove temporary file created during calibration

Amit Kucheria <amit.kucheria at linaro.org>
Newsgroups dev.linux.lists.powertop
Message-ID <CAP245DWNT1zu8=0ryAN1k2RAbaxfUEsgU24G6pLQ8hv3pmN6wg@mail.gmail.com>
Mohammad,

This fix should go upstream. cc'ing the powertop list.

Regards,
Amit

On Thu, Jun 26, 2014 at 12:27 PM, Mohammad Merajul Islam Molla
<meraj.enigma(a)gmail.com> wrote:
> powertop creates temporary file in /tmp folder during calibration.
> Simply closing does not remove these files.
> Instead use unlink to remove the file.
>
> diff --git a/src/calibrate/calibrate.cpp b/src/calibrate/calibrate.cpp
> index db368e0..1336c3f 100644
> --- a/src/calibrate/calibrate.cpp
> +++ b/src/calibrate/calibrate.cpp
> @@ -242,7 +242,7 @@ static void *burn_disk(void *dummy)
>                 write(fd, buffer, 64*1024);
>                 fdatasync(fd);
>         }
> -       close(fd);
> +       unlink(filename);
>         return NULL;
>  }
>
>
>
> --
> Thanks,
> -Meraj
>
> _______________________________________________
> linaro-dev mailing list
> linaro-dev(a)lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.