Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b5cc6ee authored by Karol Swietlicki's avatar Karol Swietlicki Committed by Linus Torvalds
Browse files

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: default avatarKarol Swietlicki <magotari@gmail.com>
Signed-off-by: default avatarJeff Dike <jdike@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2dc5802a
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -83,9 +83,8 @@ int mconsole_get_request(int fd, struct mc_request *req)
	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;