break;
}
+ /* FIXME: what if `size` is far more than 8? Can't the memfd have like, 500 size?
+ * Originally this was simply %s/buf so showing only the first number sounds off */
kdbus_printf(" +%s (%llu bytes) fd=%i size=%llu filesize=%llu '0x%llx'\n",
enum_MSG(item->type), item->size, item->memfd.fd,
(unsigned long long)item->memfd.size,
- (unsigned long long)size, (unsigned long long)(size >= 8 ? *(unsigned long long *)buf : size >= 4 ? *(unsigned *)buf : *buf));
+ (unsigned long long)size, (unsigned long long)(size >= 8 ? *(uint64_t *)buf : size >= 4 ? *(uint32_t *)buf : size >= 2 ? *(uint16_t *)buf : *(uint8_t *)buf));
munmap(buf, item->memfd.size);
break;
}