[RFC PATCH 2/3] Add a hvc backend for systemsim
Ryan Arnold
rsa at us.ibm.com
Tue Dec 20 03:01:24 EST 2005
On Sat, 2005-12-17 at 01:10 +0100, Arnd Bergmann wrote:
> +static int hvc_fss_write_console(uint32_t vtermno, const char *buf, int count)
> +{
> + int ret;
> + ret = callthru3(SIM_WRITE_CONSOLE_CODE, (unsigned long)buf, count, 1);
> + if (ret != 0)
> + return (count - ret); /* is this right? */
> +
> + /* the calling routine expects to receive the number of bytes sent */
> + return count;
> +}
> +
Greetings Arnd,
I added the question "is this right?" because I didn't have
documentation on the exact return value of
callthru3(SIM_WRITE_CONSOLE_CODE...). The return value certainly isn't
the number of bytes sent, hence the reason for the 'return count'. I
suspect that it returns the number of bytes NOT sent. Could you verify
this and then remove the comment?
Ryan S. Arnold
IBM Linux Technology Center
More information about the Linuxppc64-dev
mailing list