<br><br><div class="gmail_quote">On Sun, Jun 21, 2009 at 10:47 PM, Neil Horman <span dir="ltr"><<a href="mailto:nhorman@redhat.com">nhorman@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">On Fri, Jun 19, 2009 at 12:00:44PM +0530, Indraneel Mukherjee wrote:<br>
> Hi,<br>
><br>
> The file kernel/kexec.c (~ line 1001 in linux-2.6.30) has this code<br>
><br>
> ------snip----<br>
><br>
> if (flags & KEXEC_PRESERVE_CONTEXT)<br>
> image->preserve_context = 1;<br>
><br>
> ------snip----<br>
><br>
> Will this ever be true? The flag KEXEC_PRESERVE_CONTEXT is not even defined<br>
> in kexec-tools-2.0.0.<br>
><br>
> Consequently, all the code inside the condition if(image->preserve_context)<br>
> is also useless?<br>
><br>
> Am i missing something here?<br>
><br>
</div></div>Yes, the code you're looking at in the first definition is part of the kernel,<br>
while you're looking for the definition of KEXEC_PRESERVE_CONTEXT in the<br>
kexec-tools userspace code. You need to look for the definition of<br>
KEXEC_PRESERVE_CONTEXT in the kernel code (you'll find it in<br>
include/linux/kexec.h).</blockquote><div><br>I've seen that bit. I was only trying to understand that code & figure out when does it ever gets executed. My guess is that kexec-tools is the only user of all the code in kernel/kexec.c. So, i started wondering if kexec-tools never sets the flag KEXEC_PRESERVE_CONTEXT, then why was that code even written?<br>
Ans that means we've got some untested code in the kernel :) ?<br><br>Regards,<br>Indro<br><br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
kexec-tools might use it one day, but not using it<br>
doesn't mean we should remove it from the kernel. <br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
Neil<br>
<br>
> Regards,<br>
> Indro<br>
<br>
> _______________________________________________<br>
> kexec mailing list<br>
> <a href="mailto:kexec@lists.infradead.org">kexec@lists.infradead.org</a><br>
> <a href="http://lists.infradead.org/mailman/listinfo/kexec" target="_blank">http://lists.infradead.org/mailman/listinfo/kexec</a><br>
<br>
</blockquote></div><br>