Skip to contentSkip to conversation

kvm: configure: if all else fails, really infer kernel version from .config

PATCH Applied Mark McLoughlin 3 participants 5 messages Jan 26, 2009 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 kvm: configure: if all else fails, really infer kernel version from .config

---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
configure +1 -1
index 493c178..1fd133c 100755
@@ -126,7 +126,7 @@ if [ -n "$no_uname" ]; then
     elif [ -e "$kerneldir/include/config/kernel.release" ]; then
             depmod_version=`cat "$kerneldir/include/config/kernel.release"`
     elif [ -e "$kerneldir/.config" ]; then
-	depmod_version=$(awk '/Linux kernel version:/ { print $NF }'
+	depmod_version=$(awk '/Linux kernel version:/ { print $NF }' \
 			 "$kerneldir/.config")
     else
         echo
Signature · 1 line
1.6.0.6
#1 lore raw

PATCH 2/2 kvm: configure: --with-patched-kernel doesn't need kernelversion

---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
configure +1 -1
index 1fd133c..c3910cd 100755
@@ -119,7 +119,7 @@ if [ -d "$kerneldir/include2" ]; then
     kernelsourcedir=${kerneldir%/*}/source
 fi
 
-if [ -n "$no_uname" ]; then
+if [ -n "$no_uname" -a "$want_module" ]; then
     if [ -e "$kerneldir/.kernelrelease" ]; then
         depmod_version=`cat "$kerneldir/.kernelrelease"`
 
Signature · 1 line
1.6.0.6
#2 lore raw

Re: [PATCH 2/2] kvm: configure: --with-patched-kernel doesn't need kernelversion

Quoted 1 line · Mark McLoughlin

Why not?

I use it regularly to unequivocally define what kernel tree I'm using. The default
is often not the right choice.

Signature · 5 lines
Glauber  Costa.
"Free as in Freedom"
http://glommer.net

"The less confident you are, the more serious you have to act."
#3 lore raw

Re: [PATCH 2/2] kvm: configure: --with-patched-kernel doesn't need kernelversion

Quoted 8 lines · Glauber Costa
Quoted 1 line · Mark McLoughlin

Why not?

I use it regularly to unequivocally define what kernel tree I'm using. The default
is often not the right choice.

It is only used by depmod when installing kvm.ko ... which we don't do with --with-patched-kernel

Cheers,
Mark.