提交 b4287df8 编写于 作者: C Chris Metcalf

drivers/tty/hvc/hvc_tile.c: properly return -EAGAIN

We were returning zero if no bytes could be written to the Tilera
hypervisor console device, but this causes the output to be truncated.
By returning -EAGAIN the tty hvc driver will come back and try again,
which gives the semantics we want, and avoids dropping console output.
Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChris Metcalf <cmetcalf@ezchip.com>
上级 5bf6c07a
......@@ -51,7 +51,8 @@ int tile_console_write(const char *buf, int count)
_SIM_CONTROL_OPERATOR_BITS));
return 0;
} else {
return hv_console_write((HV_VirtAddr)buf, count);
/* Translate 0 bytes written to EAGAIN for hvc_console_print. */
return hv_console_write((HV_VirtAddr)buf, count) ?: -EAGAIN;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册