[igt-dev] [PATCH i-g-t] lib/igt_sysfs: Return errno from igt_sysfs_printf

Katarzyna Dec katarzyna.dec at intel.com
Thu Aug 30 08:12:37 UTC 2018


On Wed, Aug 29, 2018 at 02:22:45PM +0100, Chris Wilson wrote:
> Quoting Katarzyna Dec (2018-08-29 14:13:49)
> > Let's add returning errno on failure instead of -1.
> 
> But not as a positive value and not from that function. vprintf is not
> documented as setting errno.
> -Chris

You're right about positive value, my bet. And after more digging into code
it looks like the only function that could return errno is open(), vprintf/vfprinf
return only negative value. I think it could be better to leave it as it is now.

Kasia



More information about the igt-dev mailing list