config: avoid "write_in_full(fd, buf, len) < len" pattern