Fix Plan 9 partial write() return values