Re: [PATCH] multiboot-x86: support for non-elf kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Is it desirable for this check to be run for each iteration of the loop.

thats is not really the case. that statemet is executed exactly once.
the first check in the loop body looks for the multiboot header
signature and continues the loop if not found. once that check
passes the iteration ends as we return at the bottom of the loop
body, and there are no other continues.

	for (mbh_offset = 0; mbh_offset <= (len - 12); mbh_offset += 4)
 	{
 		/* Search for a multiboot header */
		mbh = (struct multiboot_header *)(headerbuf + mbh_offset);
 		if (mbh->magic != MULTIBOOT_MAGIC 
 		    || ((mbh->magic+mbh->flags+mbh->checksum) & 0xffffffff))
 		{
			/* Not a multiboot header */
 			continue;
 		}
....

--
cinap

_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux