[PATCH usbredir 2/3] We cannot use abort() in the kernel.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jeremy White <jwhite@xxxxxxxxxxxxxxx>
---
 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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]