diff options
author | Karol Swietlicki <magotari@gmail.com> | 2008-02-05 01:31:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:29 -0500 |
commit | 7b5cc6ee6cf9001775c348bac09814a45f1276b7 (patch) | |
tree | f66ed600277ee1cdba1df31907073020f15d915c /arch/um/drivers | |
parent | 2dc5802a22d68d83ef4c3d616912949a6527bb65 (diff) |
uml: fix mconsole stop
Bring back the functionality of stopping user mode linux with the help of
mconsole.
[jdike - the bug being fixed is that the mconsole file descriptor is already
set O_NONBLOCK or not, depending on whether we want no blocking (the normal
case) or we want blocking (when an mconsole stop is in effect), so the
MSG_DONTWAIT is redundant in the normal case, and wrong when we want to
block.]
Signed-off-by: Karol Swietlicki <magotari@gmail.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/drivers')
-rw-r--r-- | arch/um/drivers/mconsole_user.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/um/drivers/mconsole_user.c b/arch/um/drivers/mconsole_user.c index 430c024a19b0..13af2f03ed84 100644 --- a/arch/um/drivers/mconsole_user.c +++ b/arch/um/drivers/mconsole_user.c | |||
@@ -83,9 +83,8 @@ int mconsole_get_request(int fd, struct mc_request *req) | |||
83 | int len; | 83 | int len; |
84 | 84 | ||
85 | req->originlen = sizeof(req->origin); | 85 | req->originlen = sizeof(req->origin); |
86 | req->len = recvfrom(fd, &req->request, sizeof(req->request), | 86 | req->len = recvfrom(fd, &req->request, sizeof(req->request), 0, |
87 | MSG_DONTWAIT, (struct sockaddr *) req->origin, | 87 | (struct sockaddr *) req->origin, &req->originlen); |
88 | &req->originlen); | ||
89 | if (req->len < 0) | 88 | if (req->len < 0) |
90 | return 0; | 89 | return 0; |
91 | 90 | ||