Excerpts from Avi Kivity's message of Qua Nov 26 14:00:42 -0200 2008: > Jan Kiszka wrote: > > Avi Kivity wrote: <snip> > >> If the user specified $kerneldir, it should be in the form > >> /lib/modules/$version/build, no? > >> > > > > This is not sufficiently generic. KVM should to accept arbitrary paths > > to kernel directories, not just those special links (which could cause > > problems anyway if the link is set up for the target and makes no sense > > on the build host). > > > > > > Fair enough. This seems to work: > > awk ' / = / { a[$1] = $3 } END { printf("%s.%s.%s%s\n", > a["VERSION"], a["PATCHLEVEL"], a["SUBLEVEL"], a["EXTRAVERSION"]) }' > "$kerneldir/Makefile"
What if CONFIG_LOCALVERSION is set? > > Or alternatively > > awk '/Linux kernel version/ { print $NF }' "$kerneldir/.config" What about `cat "$kerneldir/include/config/kernel.release"`? -- Eduardo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html