linux-um archives
 help / color / mirror / Atom feed
From: "Karol Swietlicki" <magotari@gmail.com>
To: uml-devel <user-mode-linux-devel@lists.sourceforge.net>
Subject: [uml-devel] [PATCH] uml: Fix stopping uml via mconsole.
Date: Thu, 29 Nov 2007 15:47:34 +0100	[thread overview]
Message-ID: <ea9232d10711290647q284f5cf7w94858828b4e7230c@mail.gmail.com> (raw)

[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

                 reply	other threads:[~2007-11-29 14:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea9232d10711290647q284f5cf7w94858828b4e7230c@mail.gmail.com \
    --to=magotari@gmail.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox