[Spice-devel] [PATCH 2/5] We cannot use abort() in the kernel.
Jeremy White
jwhite at codeweavers.com
Tue Jun 30 13:57:39 PDT 2015
Signed-off-by: Jeremy White <jwhite at codeweavers.com>
---
usbredirparser/usbredirparser.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/usbredirparser/usbredirparser.c b/usbredirparser/usbredirparser.c
index 889ba55..58f62c3 100644
--- a/usbredirparser/usbredirparser.c
+++ b/usbredirparser/usbredirparser.c
@@ -1092,8 +1092,14 @@ int usbredirparser_do_write(struct usbredirparser *parser_pub)
/* See usbredirparser_write documentation */
if ((parser->flags & usbredirparser_fl_write_cb_owns_buffer) &&
- w != wbuf->len)
+ w != wbuf->len) {
+#if ! defined(__KERNEL__)
abort();
+#else
+ ret = -1;
+ break;
+#endif
+ }
wbuf->pos += w;
if (wbuf->pos == wbuf->len) {
--
2.1.4
More information about the Spice-devel
mailing list