[systemd-devel] [PATCH 1/2] shared/pty: remove unused pty_signal

David Herrmann dh.herrmann at gmail.com
Mon Sep 15 07:59:10 PDT 2014


Hi

On Mon, Sep 15, 2014 at 3:29 PM, Emil Renner Berthing <systemd at esmil.dk> wrote:
> ---
>  src/shared/pty.c | 8 --------
>  src/shared/pty.h | 1 -
>  2 files changed, 9 deletions(-)
>
> diff --git a/src/shared/pty.c b/src/shared/pty.c
> index 2863da4..a3332dd 100644
> --- a/src/shared/pty.c
> +++ b/src/shared/pty.c
> @@ -541,14 +541,6 @@ int pty_write(Pty *pty, const void *buf, size_t size) {
>          return 0;
>  }
>
> -int pty_signal(Pty *pty, int sig) {
> -        assert_return(pty, -EINVAL);
> -        assert_return(pty_is_open(pty), -ENODEV);
> -        assert_return(pty_is_parent(pty), -ENODEV);
> -
> -        return ioctl(pty->fd, TIOCSIG, sig) < 0 ? -errno : 0;
> -}
> -

The main user of shared/pty.c (systemd-consoled) is still being worked
on. The pty implementation was just one of the early works, so I'd
prefer if we keep unused functions for now.

Thanks
David

>  int pty_resize(Pty *pty, unsigned short term_width, unsigned short term_height) {
>          struct winsize ws;
>
> diff --git a/src/shared/pty.h b/src/shared/pty.h
> index a87ceb5..251a99d 100644
> --- a/src/shared/pty.h
> +++ b/src/shared/pty.h
> @@ -71,7 +71,6 @@ int pty_attach_event(Pty *pty, sd_event *event, pty_event_t event_fn, void *even
>  void pty_detach_event(Pty *pty);
>
>  int pty_write(Pty *pty, const void *buf, size_t size);
> -int pty_signal(Pty *pty, int sig);
>  int pty_resize(Pty *pty, unsigned short term_width, unsigned short term_height);
>
>  pid_t pty_fork(Pty **out, sd_event *event, pty_event_t event_fn, void *event_fn_userdata, unsigned short initial_term_width, unsigned short initial_term_height);
> --
> 2.1.0
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list