linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] [PATCH] uml: Fix stopping uml via mconsole.
@ 2007-11-29 14:47 Karol Swietlicki
  0 siblings, 0 replies; only message in thread
From: Karol Swietlicki @ 2007-11-29 14:47 UTC (permalink / raw)
  To: uml-devel

[I forgot to cc the uml-devel list while sending the patch.]

This patch brings back the functionality of stopping user mode linux
with the help of mconsole.

I tested it for six hours and read the code which could be impacted by
this change, so it should work fine, but I am very inexperienced and
new to the kernel and C, so I could have made a mistake somewhere.

I had two ideas, and this one was the less invasive of the two. If
this is not the right way to fix this, I can send in my second idea in
a few days.

Karol Swietlicki

Signed-off-by: Karol Swietlicki <magotari@gmail.com>
---

diff -rupN orig/arch/um/drivers/mconsole_user.c
linux-2.6.24-rc3-mm2/arch/um/drivers/mconsole_user.c
--- orig/arch/um/drivers/mconsole_user.c        2007-11-29
15:11:56.000000000 +0100
+++ linux-2.6.24-rc3-mm2/arch/um/drivers/mconsole_user.c        2007-11-28
21:39:04.000000000 +0100
@@ -83,9 +83,8 @@ int mconsole_get_request(int fd, struct
       int len;

       req->originlen = sizeof(req->origin);
-       req->len = recvfrom(fd, &req->request, sizeof(req->request),
-                           MSG_DONTWAIT, (struct sockaddr *) req->origin,
-                           &req->originlen);
+       req->len = recvfrom(fd, &req->request, sizeof(req->request), 0,
+                           (struct sockaddr *) req->origin, &req->originlen);
       if (req->len < 0)
               return 0;

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-11-29 14:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-29 14:47 [uml-devel] [PATCH] uml: Fix stopping uml via mconsole Karol Swietlicki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox