Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: tlug: RedHat head-banging
- To: tlug@example.com
- Subject: Re: tlug: RedHat head-banging
- From: Chris Sekiya <chris@example.com>
- Date: Fri, 19 Mar 1999 12:59:42 +0900 (JST)
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- In-Reply-To: <199903190344.MAA17283@example.com>
- Reply-To: tlug@example.com
- Sender: owner-tlug@example.com
On Fri, 19 Mar 1999, Dmytro Kovalev wrote: > Any ideas how do they find proper kernel revision number? Stock modutils uses this code (edited for clarity): static char *search_module_path(char *base) { static const char default_path[] = ".:" "/linux/modules:" "/lib/modules/%s/fs:" "/lib/modules/%s/net:" (and so on, down the list of possible directories) char *path; struct utsname uts_info; path = (char *)default_path; uname(&uts_info); for (p = strtok(path, ":"); p != NULL ; p = strtok(NULL, ":")) { struct stat sb; len = snprintf(filename, PATH_MAX, p, uts_info.release); len += snprintf(filename+len, PATH_MAX-len, "/%s", base); if (stat(filename, &sb) == 0 && S_ISREG(sb.st_mode)) return filename; snprintf(filename+len, PATH_MAX-len, ".o"); if (stat(filename, &sb) == 0 && S_ISREG(sb.st_mode)) return filename; } ( ... and on it goes ... ) } It's going to go down the list, filling in possible %s with the kernel rev, and attempt to load modules in the cooked pathlist. > If I compile kernel and "make install_modules" they go into > /lib/modules/2.0.36 As it should. If a kernel is changed such that its modules are no longer compatible, that kernel needs to have a different version number. > Which directory then RH will pick up on next reboot? I have no idea. It depends on whether they modified their modutils, etc. -- Chris ------------------------------------------------------------------- Next Nomikai: March 19 (Fri), 19:30 Tengu TokyoEkiMae 03-3275-3691 Next Technical Meeting: April 10 (Sat), 12:30 place: Temple Univ. ------------------------------------------------------------------- more info: http://www.tlug.gr.jp Sponsor: Global Online Japan
- References:
- Re: tlug: RedHat head-banging
- From: Dmytro Kovalev <Dmytro.Kovalev@example.com>
Home | Main Index | Thread Index
- Prev by Date: tlug: Music kit?
- Next by Date: Re: tlug: RedHat head-banging
- Prev by thread: Re: tlug: RedHat head-banging
- Next by thread: Re: tlug: RedHat head-banging
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links