[Spice-devel] [PATCH usbredir 2/3] We cannot use abort() in the kernel.
Jeremy White
jwhite at codeweavers.com
Wed Jun 17 12:06:18 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 f44df51..eea6330 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