df: Return non-zero status on write failure.
While here, complete the libxo conversion and switch return value to standard constants.
MFC after: 1 week
Sponsored by: Klara, Inc.
Differential revision: https://reviews.freebsd.org/D38097
(cherry picked from commit c968598479917f52022b86d0089a9835ddcf2799)