Skip to contentSkip to conversation

Subject: [PATCH 56/91] um: take register_winch_irq() into the caller of is_skas_winch()

PATCH Al Viro 1 participant 1 message Aug 18, 2011 User-mode Linux (UML)

lore
Share & tools
lore

Al Viro

author
#0 lore raw
---
 arch/um/drivers/chan_user.c     |    7 ++++++-
 arch/um/os-Linux/skas/process.c |    6 +-----
 2 files changed, 7 insertions(+), 6 deletions(-)
arch/um/drivers/chan_user.c +6 -1
index 7ed06a7..f180813 100644
@@ -281,7 +281,12 @@ void register_winch(int fd, struct tty_struct *tty)
 		return;
 
 	pid = tcgetpgrp(fd);
-	if (!is_skas_winch(pid, fd, tty) && (pid == -1)) {
+	if (is_skas_winch(pid, fd, tty)) {
+		register_winch_irq(-1, fd, -1, tty, 0);
+		return;
+	}
+
+	if (pid == -1) {
 		thread = winch_tramp(fd, tty, &thread_fd, &stack);
 		if (thread < 0)
 			return;
arch/um/os-Linux/skas/process.c +1 -5
index 514683f..3fdac54 100644
@@ -26,11 +26,7 @@
 
 int is_skas_winch(int pid, int fd, void *data)
 {
-	if (pid != getpgrp())
-		return 0;
-
-	register_winch_irq(-1, fd, -1, data, 0);
-	return 1;
+	return pid == getpgrp();
 }
 
 static int ptrace_dump_regs(int pid)
Signature · 1 line
1.7.2.5