how are old-style boot parameters implemented?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  can someone explain how the older boot-time kernel parameters were
implemented?  for example, there is apparently a boot-time parm
"pas16=", which is parsed in the source file drivers/scsi/pas16.c:

...
/*
 * Function : pas16_setup(char *str, int *ints)
 *
 * Purpose : LILO command line initialization of the overrides array,
 *
 * Inputs : str - unused, ints - array of integer parameters with ints[0]
 *      equal to the number of ints.
 *
 */

void __init pas16_setup(char *str, int *ints)
{
    static int commandline_current = 0;
    int i;
    if (ints[0] != 2)
        printk("pas16_setup : usage pas16=io_port,irq\n");
    else
        if (commandline_current < NO_OVERRIDES) {
            overrides[commandline_current].io_port = (unsigned short) ints[1];
            overrides[commandline_current].irq = ints[2];
            for (i = 0; i < NO_BASES; ++i)
                if (bases[i].io_port == (unsigned short) ints[1]) {
                    bases[i].noauto = 1;
                    break;
                }
            ++commandline_current;
        }
}
...

  note that this parameter is not defined by calling __setup() or
early_param(), so what's the connection between saying "pas16=" at
boot time, and how this routine is eventually invoked?

  i realize the comment above implies that this is a LILO thing, but
i've been told that that's rubbish.  so how does this work?  thanks.

rday

-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux