The patch titled uml: remove os_isatty has been added to the -mm tree. Its filename is uml-remove-os_isatty.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: uml: remove os_isatty From: Jeff Dike <jdike@xxxxxxxxxxx> os_isatty can be made to disappear by moving maybe_sigio_broken from kernel to user code. This also lets write_sigio_workaround become static. Signed-off-by: Jeff Dike <jdike@xxxxxxxxxxx> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- arch/um/include/os.h | 3 +-- arch/um/kernel/irq.c | 17 ++--------------- arch/um/os-Linux/irq.c | 5 ----- arch/um/os-Linux/sigio.c | 14 +++++++++++++- 4 files changed, 16 insertions(+), 23 deletions(-) diff -puN arch/um/include/os.h~uml-remove-os_isatty arch/um/include/os.h --- a/arch/um/include/os.h~uml-remove-os_isatty +++ a/arch/um/include/os.h @@ -318,7 +318,6 @@ extern void reboot_skas(void); /* irq.c */ extern int os_waiting_for_events(struct irq_fd *active_fds); -extern int os_isatty(int fd); extern int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds); extern void os_free_irq_by_cb(int (*test)(struct irq_fd *, void *), void *arg, struct irq_fd *active_fds, struct irq_fd ***last_irq_ptr2); @@ -330,9 +329,9 @@ extern void os_set_ioignore(void); extern void init_irq_signals(int on_sigstack); /* sigio.c */ -extern void write_sigio_workaround(void); extern int add_sigio_fd(int fd, int read); extern int ignore_sigio_fd(int fd); +extern void maybe_sigio_broken(int fd, int read); /* skas/trap */ extern void sig_handler_common_skas(int sig, void *sc_ptr); diff -puN arch/um/kernel/irq.c~uml-remove-os_isatty arch/um/kernel/irq.c --- a/arch/um/kernel/irq.c~uml-remove-os_isatty +++ a/arch/um/kernel/irq.c @@ -110,19 +110,6 @@ void sigio_handler(int sig, union uml_pt free_irqs(); } -static void maybe_sigio_broken(int fd, int type) -{ - if (os_isatty(fd)) { - if ((type == IRQ_WRITE) && !pty_output_sigio) { - write_sigio_workaround(); - add_sigio_fd(fd, 0); - } else if ((type == IRQ_READ) && !pty_close_sigio) { - write_sigio_workaround(); - add_sigio_fd(fd, 1); - } - } -} - static DEFINE_SPINLOCK(irq_lock); int activate_fd(int irq, int fd, int type, void *dev_id) @@ -221,7 +208,7 @@ int activate_fd(int irq, int fd, int typ /* This calls activate_fd, so it has to be outside the critical * section. */ - maybe_sigio_broken(fd, type); + maybe_sigio_broken(fd, (type == IRQ_READ)); return(0); @@ -318,7 +305,7 @@ void reactivate_fd(int fd, int irqnum) /* This calls activate_fd, so it has to be outside the critical * section. */ - maybe_sigio_broken(fd, irq->type); + maybe_sigio_broken(fd, (irq->type == IRQ_READ)); } void deactivate_fd(int fd, int irqnum) diff -puN arch/um/os-Linux/irq.c~uml-remove-os_isatty arch/um/os-Linux/irq.c --- a/arch/um/os-Linux/irq.c~uml-remove-os_isatty +++ a/arch/um/os-Linux/irq.c @@ -52,11 +52,6 @@ int os_waiting_for_events(struct irq_fd return n; } -int os_isatty(int fd) -{ - return isatty(fd); -} - int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds) { if (pollfds_num == pollfds_size) { diff -puN arch/um/os-Linux/sigio.c~uml-remove-os_isatty arch/um/os-Linux/sigio.c --- a/arch/um/os-Linux/sigio.c~uml-remove-os_isatty +++ a/arch/um/os-Linux/sigio.c @@ -233,7 +233,7 @@ static struct pollfd *setup_initial_poll return p; } -void write_sigio_workaround(void) +static void write_sigio_workaround(void) { unsigned long stack; struct pollfd *p; @@ -314,6 +314,18 @@ out_close1: close(l_write_sigio_fds[1]); } +void maybe_sigio_broken(int fd, int read) +{ + if(!isatty(fd)) + return; + + if((read || pty_output_sigio) && (!read || pty_close_sigio)) + return; + + write_sigio_workaround(); + add_sigio_fd(fd, read); +} + void sigio_cleanup(void) { if(write_sigio_pid != -1){ _ Patches currently in -mm which might be from jdike@xxxxxxxxxxx are uml-clean-up-address-space-limits-code.patch uml-timer-initialization-cleanup.patch uml-remove-some-useless-exports.patch uml-fix-static-binary-segfault.patch uml-remove-useless-declaration.patch uml-signal-initialization-cleanup.patch uml-timer-handler-tidying.patch uml-ifdef-a-mode-specific-function.patch uml-mark-forward_interrupts-as-being-mode-specific.patch uml-remove-spinlock-wrapper-functions.patch uml-remove-os_isatty.patch uml-fix-exitcall-ordering-bug.patch uml-make-some-symbols-static.patch uml-remove-syscall-debugging.patch uml-move-_kernc-files.patch uml-formatting-fixes.patch uml-add-some-eintr-protection.patch uml-remove-unused-variable.patch uml-make-mconsole-version-requests-happen-in-a-process.patch uml-remove-pte_mkexec.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html