The new libfdisk/gpt test (
4a4a0927) discovered that we read and write
partition attributes wrongly on BE systems.
Our temporarily used char[8] bits are always LE and do not need to be
converted.
CC: Michael Marineau <michael.marineau@coreos.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
assert(res);
*res = NULL;
- attrs = le64_to_cpu(e->attrs);
+ attrs = e->attrs;
if (!attrs)
return 0; /* no attributes at all */
p++;
}
- e->attrs = cpu_to_le64(attrs);
+ e->attrs = attrs;
return 0;
}
if ((uint32_t) i >= le32_to_cpu(gpt->pheader->npartition_entries))
return -EINVAL;
- attrs = le64_to_cpu(gpt->ents[i].attrs);
+ attrs = gpt->ents[i].attrs;
bits = (char *) &attrs;
switch (flag) {
else
clrbit(bits, bit);
- gpt->ents[i].attrs = cpu_to_le64(attrs);
+ gpt->ents[i].attrs = attrs;
if (flag == GPT_FLAG_GUIDSPECIFIC)
fdisk_info(cxt, isset(bits, bit) ?