[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How does __setup() work?
* David Wuertele (dave-gnus@bfnet.com) wrote:
> I'm trying to track down why ide_setup() doesn't seem to be called on
> my system. I'm using KGDB to put breakpoints in ide_setup(), but they
> never get hit. I see that ide_setup is defined as:
>
> int __init ide_setup (char *s)
> {
> ...
>
> and there is also a line:
>
> __setup("", ide_setup);
>
> What do these macros do? How can I get KGDB to break in ide_setup()?
take a look at the source (include/linux/init.h). it places code in a
special section, then is used during init/main.c::checksetup() to find
matching setup strings from the kernel boot commandline. it's not going
to be called if you don't have an "idex=xxx" or "hdx=" string on the
commandline. it's also called if you compile ide modular and give it
options during insmod.
cheers,
-chris
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/