[PATCH V3 2/5] Add tools for reading and writing from splitblock table

"Zhou, Wenjian/周文剑" zhouwj-fnst at cn.fujitsu.com
Wed Nov 5 02:31:44 PST 2014


On 11/05/2014 12:18 PM, Atsushi Kumagai wrote:
>> +unsigned long long
>> >+read_from_splitblock_table(char *entry)
>> >+{
>> >+	unsigned long long value = 0;
>> >+	int i;
>> >+
>> >+	for (i = splitblock->entry_size; i>  0; i--) {
>> >+		value = value<<  BITPERBYTE;
>> >+		value += *(entry + i - 1)&  0xff;
>> >+	}
> Did you forget to reflect the HATAYAMA-san's comment ?
>

I think it is needed.
For example:
	if *(entry + i - 1) == 0xfa
	without & 0xff:
		it will turn to: value += 0xfffffffffffffffa
	with & 0xff:
		it will be: value += 0xfffffffffffffffa & 0xff

Thanks
Zhou Wenjian



More information about the kexec mailing list