Skip to Content.
Sympa Menu

sm-grimoire-bugs - [SM-Grimoire-Bugs] [Bug 10940] get_kernel_version isn't flexible enough

sm-grimoire-bugs AT lists.ibiblio.org

Subject: SourceMage Grimoire Bug List

List archive

Chronological Thread  
  • From: bugzilla-daemon AT bugs.sourcemage.org
  • To: sm-grimoire-bugs AT lists.ibiblio.org
  • Subject: [SM-Grimoire-Bugs] [Bug 10940] get_kernel_version isn't flexible enough
  • Date: 17 Oct 2006 20:32:20 -0000

http://bugs.sourcemage.org/show_bug.cgi?id=10940





------- Additional Comments From dmlb2000 AT gmail.com 2006-10-17 15:32 -------
> > 1) check for a user controlled var
> > 2) check for sorcery version (something we know will work)
> > 3) check for linux source file in some generic way that it should work
> > 80%
> of
> > the time
>
> Could you write the code for the last part? I don't know what works well
> enough.

I would suggest something like

grep '^#define[[:space:]]*UTS_RELEASE' /usr/src/linux/include/linux/* | cut
-d\
-f3 | sed 's/"//g'

the UTS_RELEASE should only be defined once in those files and that should
work
across versions of the kernel (at least for now).

this would be put in the 'if all else fails' clause.




--
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




Archive powered by MHonArc 2.6.24.

Top of Page