From: "Dr. Werner Fink" <werner@suse.de>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: Re: [util-linux] [PATCH 00/13] Initial import of sulogin
Date: Tue, 4 Dec 2012 13:12:13 +0100 [thread overview]
Message-ID: <20121204121213.GA25376@boole.suse.de> (raw)
In-Reply-To: <20121130155726.GA30517@boole.suse.de>
On Fri, Nov 30, 2012 at 04:57:26PM +0100, Werner Fink wrote:
> On Fri, Nov 09, 2012 at 01:09:19PM +0100, Karel Zak wrote:
> > On Fri, Oct 12, 2012 at 04:07:57PM +0200, Dr. Werner Fink wrote:
> > > > Time... (the patch is one huge rewrite, I'd like to split it to more
> > > > patches). I'm busy with some others things, so next week.
> > >
> > > Yep, this missing feature is also known here ;)
> > > Maybe the attached patch help as it only adds the /proc/consoles and
> > > /sys/class/tty/ scanner into common lib and leave sulogin untouched.
> > >
> > > The integration into sulogin.c could then be done later
> >
> > Good idea. I have merged the lib/consoles.c with some changes:
> >
> > - removed all global variables
> > - refactoring (one separate function for each detection method)
> > - add debug messages
> > - fix some disadvantages
> > - add small test program
> >
> > Now we need a patch(s) for sulogin.c. It should be relatively simple
> > task as we already have Philipp's prototype.
> >
> > http://www.spinics.net/lists/util-linux-ng/msg06916.html
> >
> > Any suggestion how to test the code?
I've up and running a VirtualBox guest with a serial as well as a virtual
console. From the compiled consoles test (-DTEST_PROGRAM) I see:
g243:~ # ./consoles /dev/console
/dev/tty7: id=0 (reconnect)
/dev/ttyS0: id=1 (reconnect)
g243:~ # cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-3.4.11-2.16-desktop root=UUID=5ece074f-824b-45b0-8fa6-aa61c06beb87 resume=/dev/disk/by-id/ata-VBOX_HARDDISK_VB96c77b27-f0603953-part1 splash=silent console=ttyS0,115200 console=tty0 showopts
> For such things a VirtualBox or KVM client is usefull, if a serial
> console is used then you can see both of the consoles. In the meanwhile
> I've tried to move from single linked lists to double linked list as
> found in include/list.h. Now the usage of posix_memalign() makes sense
> as with this the area for the structure as well as for the string in the
> structure can be allocated in one step (and also freed in one step).
For the VirtualBox I use a sub directory /dev/vboxtty/ owned and writable by
the group vboxusers. Below this the VirtualBox creates the ttyS0 as a socket
pair and I start a simple script using socat and screen with:
#!/bin/bash
: ${tty:=ttyS0}
dir=/dev/vboxtty
pty=$dir/tty${tty#ttyS}
socat unix-connect:$dir/ttyS0,oobinline pty,link=$pty,b38400,parenb=1,cs8,istrip=0,icanon=1 &
exec screen -O -A -f $pty b38400,parenb=1,cs8,istrip=0,icanon=1
with this one can see the boot messages on both the serial console and on the
window used by the VirtualBox for its own virtual console(s).
Werner
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
next prev parent reply other threads:[~2012-12-04 12:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-28 16:45 [PATCH 00/13] Initial import of sulogin Dave Reisner
2012-02-28 16:45 ` [PATCH 01/13] fstab.5: fix misspelling of deprecated Dave Reisner
2012-02-28 16:45 ` [PATCH 02/13] sulogin: initial import from sysvinit Dave Reisner
2012-02-28 18:45 ` Davidlohr Bueso
2012-02-28 16:45 ` [PATCH 03/13] sulogin.8: refactor manpage Dave Reisner
2012-02-28 16:45 ` [PATCH 04/13] sulogin: whitespace fixes Dave Reisner
2012-02-28 16:45 ` [PATCH 05/13] sulogin: replace older signal() with sigaction() Dave Reisner
2012-02-28 16:45 ` [PATCH 06/13] sulogin: remove CHECK_{DES,MD5} defines Dave Reisner
2012-02-28 16:45 ` [PATCH 07/13] sulogin: remove USE_ONELINE and SANE_TIO defines Dave Reisner
2012-02-28 16:45 ` [PATCH 08/13] sulogin: use size_t for iterator to avoid cast Dave Reisner
2012-02-28 16:45 ` [PATCH 09/13] sulogin: get rid of calls to /bin/sash Dave Reisner
2012-02-28 16:45 ` [PATCH 10/13] sulogin: use pathnames.h for file locations Dave Reisner
2012-02-28 16:45 ` [PATCH 11/13] sulogin: header/include cleanup Dave Reisner
2012-02-28 16:45 ` [PATCH 12/13] sulogin: use a more standard usage output Dave Reisner
2012-02-28 16:45 ` [PATCH 13/13] sulogin: add i18n strings Dave Reisner
2012-02-28 16:48 ` [PATCH 00/13] Initial import of sulogin Dave Reisner
2012-10-12 12:53 ` [util-linux] " Dr. Werner Fink
2012-10-12 13:23 ` Karel Zak
2012-10-12 14:07 ` Dr. Werner Fink
2012-11-09 8:38 ` Karel Zak
2012-11-09 8:45 ` Karel Zak
2012-11-09 12:09 ` Karel Zak
2012-11-30 15:57 ` Dr. Werner Fink
2012-12-04 12:12 ` Dr. Werner Fink [this message]
2012-03-12 14:20 ` sulogin merged into util-linux (Re: [PATCH 00/13] Initial import of sulogin) Karel Zak
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=20121204121213.GA25376@boole.suse.de \
--to=werner@suse.de \
--cc=kzak@redhat.com \
--cc=util-linux@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).