Complete.Org: Mailing Lists: Archives: linux-help: August 2000:
[linux-help] Re: What is char-major-5?
Home

[linux-help] Re: What is char-major-5?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: linux-help@xxxxxxxxx
Subject: [linux-help] Re: What is char-major-5?
From: Tom Hull <thull@xxxxxxxxxxx>
Date: Thu, 03 Aug 2000 22:26:56 -0500
Reply-to: linux-help@xxxxxxxxx

Nate Bargmann wrote:
> 
> Hello all.
> 
> Looking through syslog I find the following line periodically:
> 
> modprobe: Can't locate module char-major-5
> 
> Firstly, I'm rather curious as to what char-major-5 *is*.  I'm guessing
> it has to do with the serial driver formerly being a module, but is now
> static in the kernel.  I'm jumping to this conclusion after looking at
> /usr/src/linux/Documentation/devices.txt.  Is there a more definitive
> source for these module references (for lack of a better term) that
> go into /etc/modules.conf than grepping the kernel source?

There is nothing more definitive than the source code. In the kernel
source code there are several places where "char-major-%d" module names
are constructed. Evidently means character-special file, major number %d.
Running strings on modprobe (don't have the source handy, but that should
answer the question of why modprobe is looking for this thing) shows the
string "char-major-5" is canned, as well as many others. I don't see
how such names are mapped to driver names, although /boot/module.info
has some examples of "block-major-%d".

As Documentation/devices.txt explains, major number 5 (#define TTY_AUX
in <linux/major.h>) is used for various alternate tty names, such as
/dev/tty, /dev/console, /dev/cua. I think these things (see
drivers/char/tty_io.c) are always configured into the kernel.

The serial driver should be major number 4 (#define TTY). There are
several configuration options for this, depending on the underlying
hardware (see drivers/char/Config.in for variants associated with
CONFIG_SERIAL_CONSOLE). It's not hard to imagine a relationship:
TTY_AUX is basically an alias for TTY, so if you're missing "serial"
driver, TTY_AUX may have nothing to refer to.

BTW, cscope is a good tool for looking around large chunks of code.
See:

    http://cscope.sourceforge.net/

You can, for instance:

    cd /usr/src/linux
    cscope -bkqR
    cscope -d

The first cscope command builds a rather large database (3 files, ~80M).
The second cscope is an interactive, screen-oriented program. See the
man page for details. I use it with emacs, which involves a couple of
extra steps:

    echo "emacsclient -n $*" >/usr/local/bin/emacsclient-n
    chmod +x /usr/local/bin/emacsclient-n
    emacs -f server-start &
    EDITOR=/usr/local/bin/emacsclient-n cscope -d

-- 
/*
 *  Tom Hull * thull@xxxxxxxxxxx * http://www.ocston.org/~thull/
 */

-- This is the linux-help@xxxxxxxxx list.  To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi


[Prev in Thread] Current Thread [Next in Thread]