From: Karel Zak <kzak@redhat.com>
To: Werner Fink <werner@suse.de>
Cc: util-linux@vger.kernel.org, Ruediger Meier <sweet_f_a@gmx.de>
Subject: Re: [PATCH 1/4] Avoid that agetty nor sulogin are fooled by a running plymouth
Date: Tue, 13 May 2014 10:56:58 +0200 [thread overview]
Message-ID: <20140513085658.GM8951@x2.net.home> (raw)
In-Reply-To: <1399543765-31106-1-git-send-email-werner@suse.de>
On Thu, May 08, 2014 at 12:09:22PM +0200, Werner Fink wrote:
> The nowadays used plymouth locks the devices used for the system
> console which causes that agetty as well as sulogin can not modify
> the termios settings of e.g. the serial devices of the systenm console.
All applied, thanks!
> + int fd = con->fd, i = (plymouth_command("--ping")) ? 20 : 0;
> +
> + while (i-- > 0) {
> + /*
> + * With plymouth the termios flags become changed after this
> + * function had changed the termios.
> + */
> + memset(&lock, 0, sizeof(struct termios));
> + if (ioctl(fd, TIOCGLCKTRMIOS, &lock) < 0)
> + break;
> + if (!lock.c_iflag && !lock.c_oflag && !lock.c_cflag && !lock.c_lflag)
> + break;
> + if (i == 15 && plymouth_command("quit") != 0)
> + break;
> + sleep(1);
> + }
> + memset(&lock, 0, sizeof(struct termios));
> + ioctl(fd, TIOCSLCKTRMIOS, &lock);
I hope 20s sleep is the worst case and in normal situations we don't
have to call plymouth "quit" from sulogin/agetty.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2014-05-13 8:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-08 10:09 [PATCH 1/4] Avoid that agetty nor sulogin are fooled by a running plymouth Werner Fink
2014-05-08 10:09 ` [PATCH 2/4] Enable sulogin to find a suitable console device even if the first line in /proc/consoles does not have any major and minor number Werner Fink
2014-05-08 10:09 ` [PATCH 3/4] Better support of the special system consoles on S390 Werner Fink
2014-05-08 10:09 ` [PATCH 4/4] Beside virtual consoles support xvc and hvc device lines as well Werner Fink
2014-05-13 8:56 ` Karel Zak [this message]
2014-05-13 10:42 ` [PATCH 1/4] Avoid that agetty nor sulogin are fooled by a running plymouth Dr. Werner Fink
2014-05-13 12:10 ` Ruediger Meier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140513085658.GM8951@x2.net.home \
--to=kzak@redhat.com \
--cc=sweet_f_a@gmx.de \
--cc=util-linux@vger.kernel.org \
--cc=werner@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox