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 19:40:31 -0000

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





------- Additional Comments From iuso AT sourcemage.org 2006-10-17 14:40 -------
(In reply to comment #10)
> I would suggest doing it the way dkowis suggested:

Woot, someone brain-switched me and dkowis. ;)

But to get back to the subject. This is what get_running_kernel_config
appears
to do to retrieve the kernel version:

local KVER
# use proc interface because even inside a uname change invoke this
# still returns the version of the running kernel
if [ -f /proc/sys/kernel/osrelease ] ; then
KVER=$(cat /proc/sys/kernel/osrelease)
else
# apparently you don't have proc mount
KVER=$(uname -r)
fi

Is this approach in your opinion better or worse than the one in
get_kernel_version?

> 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.

One thing I also believe we should do is split get_kernel_version into
get_sorcery_kernel_version and get_running_kernel_version and make
get_kernel_version simply call those. This is because
get_sorcery_kernel_config and get_running_kernel_config also need to know the
proper kernel versions. They could do that by calling these split *_version
functions.

Hope I'm still making sense. What I really only need is for someone
knowledgeable enough to write that running kernel version code, I'll do the
rest.

--
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