Page MenuHomeFreeBSD

printf(): Save errno earlier.
ClosedPublic

Authored by des on Fri, Sep 20, 4:18 PM.
Tags
None
Referenced Files
F95502501: D46718.diff
Sat, Sep 21, 5:33 AM
F95492473: D46718.id143544.diff
Sat, Sep 21, 4:12 AM
F95436300: D46718.diff
Fri, Sep 20, 8:20 PM
F95415272: D46718.id143544.diff
Fri, Sep 20, 5:28 PM
F95414696: D46718.id.diff
Fri, Sep 20, 5:24 PM
F95411781: D46718.diff
Fri, Sep 20, 4:58 PM
Subscribers

Details

Summary

The manual page says %m is replaced with “the string representation of
the error code stored in the errno variable at the beginning of the
call”. However, we don't actually save errno until fairly late in
__vfprintf(). Make sure it is saved before we do anything that
might perturb errno.

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 59541
Build 56428: arc lint + arc unit