From: Jurij Smakov <jurij@wooyd.org>
To: sparclinux@vger.kernel.org
Subject: Re: debian unusable on niagara
Date: Sat, 02 May 2009 10:28:05 +0000 [thread overview]
Message-ID: <20090502102805.GA7054@droopy.oc.cox.net> (raw)
In-Reply-To: <20090423.070943.158757350.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 908 bytes --]
+ attachment for real.
On Sat, May 02, 2009 at 11:25:37AM +0100, Jurij Smakov wrote:
> On Tue, Apr 28, 2009 at 01:44:57AM -0700, David Miller wrote:
> > It won't, most likely because the device name is totally different
> > for Niagara's console device vs. the serial console device used
> > on all other types of boxes.
>
> Installer's rootskel uses the attached code to detect whether console
> is serial or not (by checking whether ioctl(0, TIOCGSERIAL, buffer)
> succeeds). Can you compile and run it on Niagara's serial console, to
> see whether this mechanism detects it correctly?
>
> Best regards,
> --
> Jurij Smakov jurij@wooyd.org
> Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC
--
Jurij Smakov jurij@wooyd.org
Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC
[-- Attachment #2: console-type.c --]
[-- Type: text/x-csrc, Size: 830 bytes --]
/*
* Licensed under GPLv2
*
* Adapted for Debian Installer by Frans Pop <fjp.debian.org> from
* cttyhack from busybox 1.11, which is
*
* Copyright (c) 2007 Denys Vlasenko <vda.linux@googlemail.com>
*/
#include <sys/ioctl.h>
#include <stdio.h>
enum { VT_GETSTATE = 0x5603 }; /* get global vt state info */
int main(int argc, char ** argv)
{
/*
* Use an (oversized) dummy buffer as we're not interested in
* returned values.
* TIOCGSERIAL normally uses serial_struct from <linux/serial.h>
* VT_GETSTATE normally uses vt_stat from <linux/vt.h>
*/
char buffer[1024]; /* filled by ioctl */
if (ioctl(0, TIOCGSERIAL, buffer) == 0) {
/* this is a serial console */
printf("serial\n");
} else if (ioctl(0, VT_GETSTATE, buffer) == 0) {
/* this is linux virtual tty */
printf("virtual\n");
}
return 0;
}
next prev parent reply other threads:[~2009-05-02 10:28 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-23 14:09 debian unusable on niagara David Miller
2009-04-23 14:44 ` David Miller
2009-04-23 14:51 ` David Markey
2009-04-23 15:11 ` Andrew Robert Nicols
2009-04-27 22:29 ` Jurij Smakov
2009-04-28 1:41 ` David Miller
2009-04-28 7:54 ` Jurij Smakov
2009-04-28 7:56 ` David Miller
2009-04-28 7:57 ` David Miller
2009-04-28 8:09 ` Jurij Smakov
2009-04-28 8:44 ` David Miller
2009-05-02 10:25 ` Jurij Smakov
2009-05-02 10:28 ` Jurij Smakov [this message]
2009-05-02 16:53 ` David Miller
2009-05-02 17:04 ` Jurij Smakov
2009-05-02 20:14 ` David Miller
2009-05-02 20:56 ` Jurij Smakov
2009-05-02 21:26 ` David Miller
2009-05-02 22:54 ` Josip Rodin
2009-05-03 0:06 ` David Miller
2009-05-03 11:41 ` Josip Rodin
2009-05-03 13:35 ` Sam Ravnborg
2009-05-03 15:58 ` Josip Rodin
2009-05-03 16:02 ` Sam Ravnborg
2009-05-03 20:09 ` David Miller
2009-05-03 20:10 ` David Miller
2009-05-03 20:11 ` David Miller
2009-05-03 20:13 ` David Miller
2009-05-03 20:44 ` Josip Rodin
2009-05-03 20:50 ` David Miller
2009-05-04 7:40 ` Julien Cristau
2009-05-04 8:29 ` Josip Rodin
2009-05-04 9:12 ` Josip Rodin
2009-05-04 9:34 ` Julien Cristau
2009-05-04 9:57 ` Josip Rodin
2009-05-04 12:15 ` Florian Fainelli
2009-05-04 15:03 ` Josip Rodin
2009-05-04 16:55 ` David Miller
2009-05-04 16:58 ` David Miller
2009-05-04 17:33 ` Josip Rodin
2009-05-04 17:57 ` David Miller
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=20090502102805.GA7054@droopy.oc.cox.net \
--to=jurij@wooyd.org \
--cc=sparclinux@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.