Poul-Henning Kamp 5b1deb3ce8 Return length from fwopen() file callback instead of zero.
The symptom is that syslog() fails to log anything but the "ident"
string if LOG_PERROR is specified to openlog(3) and the extensible
printf is in action.

For unclear, likely quaint historical reasons, syslog uses fwopen()
on a stack buffer, rather than using the more straightforward
and faster snprintf().

Along the way, fflush(3) is called, and since the callback writer
function returns zero instead of the length "written", __SERR
naturally gets set on the filedescriptor.

The extensible printf, in difference from the normal printf refuses
to output anything to an __SERR marked filedescriptor, and thus
the actual syslog message is supressed.

MFC:	after 2 weeks
2006-08-07 20:12:18 +00:00
..
2005-01-20 09:17:07 +00:00
2004-07-03 22:30:10 +00:00
2005-01-20 09:17:07 +00:00
2005-02-13 22:25:33 +00:00
2003-07-01 12:30:03 +00:00
2005-02-06 03:23:31 +00:00
2005-03-07 05:00:54 +00:00
2003-04-07 12:55:00 +00:00
2004-07-02 23:52:20 +00:00
2005-11-23 15:41:36 +00:00
2005-01-20 09:17:07 +00:00
2005-01-20 09:17:07 +00:00
2004-06-21 19:30:45 +00:00
2005-02-13 22:25:33 +00:00
2005-05-03 16:20:03 +00:00
2004-07-03 22:30:10 +00:00
2005-01-20 09:17:07 +00:00
2002-12-27 12:15:40 +00:00
2005-02-13 22:25:33 +00:00
2006-01-26 11:15:08 +00:00
2005-02-09 18:07:17 +00:00
2006-05-22 06:53:35 +00:00
2006-06-05 18:22:13 +00:00
2005-02-06 03:23:31 +00:00
2005-03-07 05:00:54 +00:00
2002-12-18 10:13:54 +00:00
2005-01-20 09:17:07 +00:00
2005-01-20 09:17:07 +00:00
2003-01-04 00:15:15 +00:00
2002-12-18 10:13:54 +00:00
2002-10-12 16:13:41 +00:00
2005-01-20 09:17:07 +00:00
2005-01-20 09:17:07 +00:00
2002-12-19 09:40:28 +00:00
2004-07-02 16:45:56 +00:00
2004-07-02 16:45:56 +00:00
2004-07-02 16:45:56 +00:00
2004-07-03 22:30:10 +00:00
2005-01-20 09:17:07 +00:00
2006-05-27 09:04:43 +00:00
2005-02-13 23:45:54 +00:00
2005-01-20 09:17:07 +00:00
2002-11-17 08:54:29 +00:00
2005-06-15 19:04:04 +00:00
2004-12-30 13:09:34 +00:00
2005-01-20 09:17:07 +00:00
2006-07-26 16:56:56 +00:00
2005-06-15 19:04:04 +00:00
2005-05-20 15:39:20 +00:00
2004-07-03 22:30:10 +00:00
2004-07-03 22:30:10 +00:00
2004-07-03 22:30:10 +00:00
2005-01-20 09:17:07 +00:00
2006-04-18 21:37:24 +00:00
2004-06-30 13:55:08 +00:00