This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ #11741] printf should return negative value on I/Oerror
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Mon, 29 Oct 2012 08:46:10 +0530
- Subject: Re: [PATCH][BZ #11741] printf should return negative value on I/Oerror
- References: <20121019152056.50cd355f@spoyarek>
Ping!
http://sourceware.org/ml/libc-alpha/2012-10/msg00500.html
On Fri, 19 Oct 2012 15:20:56 +0530, Siddhesh wrote:
> Hi,
>
> Printing padded strings into a file pointer currently succeeds
> incorrectly when it should be returning a -1. I found a number of
> problems that together contributed to this bug. Attached patch fixes
> it. Tested on Fedora 16 x86_64 and also added this case to the
> current test case. No regressions reported resulting from this patch.
>
> I have also added a copyright notice to the test case I modified. I
> got the start date from the ChangeLog. OK to commit?
>
> Regards,
> Siddhesh
>
> ChangeLog:
>
> [BZ #11741]
> * libio/fileops.c (_IO_new_file_write): Correctly return
> error.
> * libio/iopadn.c (_IO_padn): Likewise.
> * libio/iowpadn.c (_IO_wpadn): Likewise.
> * stdio-common/tst-put-error.c: Add copyright notice.
> (do_test): Add case for printing padded string.
> * stdio-common/vfprintf [!COMPILE_WPRINTF] (PAD): Flag error
> if _IO_padn returned error.
> [COMPILE_WPRINTF] (PAD): Flag error if _IO_wpadn returned
> error.
>