HomeFreeBSD

__sflush(): on write error, if nothing was written, reset FILE state back

Description

__sflush(): on write error, if nothing was written, reset FILE state back

otherwise the data is just dropped. Check for current position equal to
the buffer base at the entry of the function; if not equal, setvbuf()
was done from the write method and it is not our business to override
the decision.

PR: 76398
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D34007

Details

Provenance
kibAuthored on Jan 23 2022, 6:52 AM
Reviewer
markj
Differential Revision
D34007: __sflush(): on write error, if nothing was written, reset FILE state back
Parents
rG59d465e200bb: Bump __FreeBSD_version for LinuxKPI changes
Branches
Unknown
Tags
Unknown

Event Timeline