Irqbalance / irqbalance

The irqbalance source tree - The new official site for irqbalance
http://irqbalance.github.io/irqbalance/
GNU General Public License v2.0
576 stars 139 forks source link

Check `fflush()` return value #304

Closed balrog-kun closed 5 months ago

balrog-kun commented 5 months ago

Since fprintf() may buffer output, as noted in 470a64b19062, fclose()'s error value was also being checked for the write errors. However in 8d7c78304fb9 an fflush() was added in between meaning that these buffered write errors were again unchecked. Some actual errors were not being logged, in my case -ENOSPCs.

Make the fclose and fflush branches look similar.

Fixes: 8d7c78304fb9 ("Flush file before closing")