On 08/19/2014 05:58 AM, Kevin Wolf wrote: > Am 18.08.2014 um 13:41 hat Michael Tokarev geschrieben: >> Just log to stderr unconditionally, like other similar code does. >> >> >> -DLOG(if (stderr == NULL) { >> - stderr = fopen("vvfat.log", "a"); >> - setbuf(stderr, NULL); >> -}) >> - > > This specific patch isn't as trivial as it might look at the first > sight (in other words: it's wrong). The part that you probably missed is > that stderr isn't the real one when DEBUG is set: > > #undef stderr > #define stderr STDERR > FILE* stderr = NULL; Eeek, that's horrible. I'd rather see code doing freopen("vvfat.log", "a", stderr) than the current horrid mess of redefining stderr away from its normal meaning. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org