buf_copy(): Fail if there's no data to write or nothing to do