Re: [PATCH v2 08/21] bisect: report on fopen() error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Duy,

On Wed, 3 May 2017, Nguyễn Thái Ngọc Duy wrote:

> The main thing to catch here is when fopen() is called on a
> directory. It's safe even without this change because a few lines
> earlier we do check if "filename" is a regular file.
> 
> Regardless, let's stay on the safe side in case somebody changes those
> lines. Unconditionally printing to stderr by warn_on_inaccessible()
> should be fine, because the caller does unconditional fprintf(stderr,
> too, no checking for quiet option or anything.
> 
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>

I appreciate that you mention specifically the use case that triggered my
complaint that in turn prodded you into starting working on this.

However, I think this should be a mere side note in a single commit that
introduces and uses fopen_or_warn().

Ciao,
Dscho

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]